Skip to content
This repository was archived by the owner on Jun 14, 2019. It is now read-only.

Commit 60f703c

Browse files
committed
more test cases
1 parent 0d73aa4 commit 60f703c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

builder_select_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ func TestBuilder_Limit(t *testing.T) {
150150
assert.EqualValues(t, 0, len(args))
151151
fmt.Println(sql, args)
152152

153+
// simple with where -- MsSQL style
154+
sql, args, err = Dialect(MSSQL).Select("a", "b", "c").PK("id").From("table1").
155+
Where(Eq{"a": "3"}).OrderBy("a ASC").Limit(5, 10).ToSQL()
156+
assert.NoError(t, err)
157+
assert.EqualValues(t, 3, len(args))
158+
fmt.Println(sql, args)
159+
153160
// raise error
154161
sql, args, err = Dialect(MSSQL).Select("a", "b", "c").From("table1").
155162
OrderBy("a ASC").Limit(5, 10).ToSQL()

0 commit comments

Comments
 (0)