Skip to content

Commit

Permalink
test: add field.ALL.Count().As() unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1v3r committed Dec 21, 2023
1 parent ca7b7b6 commit 1ce6f19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions field/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ func TestExpr_Build(t *testing.T) {
Expr: field.NewAsterisk("user").Count(),
Result: "COUNT(`user`.*)",
},
{
Expr: field.ALL.Count().As("num"),
Result: "COUNT(*) AS `num`",
},
{
Expr: field.NewAsterisk("user").Distinct().Count(),
Result: "COUNT(DISTINCT `user`.*)",
Expand Down

0 comments on commit 1ce6f19

Please sign in to comment.