select improvements
This commit is contained in:
@@ -45,6 +45,15 @@ func TestSelect(t *testing.T) {
|
||||
Args: []any{1234},
|
||||
String: "select name, email from customer where id = ?",
|
||||
},
|
||||
{
|
||||
In: Select("customer").Where("age > ?", 18).OrderBy("age desc", "name asc"),
|
||||
Args: []any{18},
|
||||
String: "select * from customer where age > ? order by age desc, name asc",
|
||||
},
|
||||
{
|
||||
In: Select("customer").Distinct(true).Columns("age"),
|
||||
String: "select distinct age from customer",
|
||||
},
|
||||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
|
||||
Reference in New Issue
Block a user