Skip to content

Commit

Permalink
Fix QueryCompiler tests to pass the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmanfadhil committed Aug 11, 2020
1 parent 051f469 commit 3647def
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/guide/query-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ If you want to select only unique values, you can enable distinct select by usin
db.table("users").select("email").distinct();
```

## Grouping

In SQL, you can group records using `GROUP BY` syntax.

## Sorting

You can sort a column using `order`.
Expand Down
6 changes: 3 additions & 3 deletions src/querycompiler_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,17 +575,17 @@ testQueryCompiler("`groupBy` should exclude duplicates", {
}, {
mysql: {
text:
"SELECT `users`.`*` FROM `users` GROUP BY `users`.`email`, `users`.`age`;",
"SELECT `users`.* FROM `users` GROUP BY `users`.`email`, `users`.`age`;",
values: [],
},
sqlite: {
text:
"SELECT `users`.`*` FROM `users` GROUP BY `users`.`email`, `users`.`age`;",
"SELECT `users`.* FROM `users` GROUP BY `users`.`email`, `users`.`age`;",
values: [],
},
postgres: {
text:
'SELECT "users"."*" FROM "users" GROUP BY `users`."email", `users`."age";',
'SELECT "users".* FROM "users" GROUP BY "users"."email", "users"."age";',
values: [],
},
});
Expand Down

0 comments on commit 3647def

Please sign in to comment.