gdb: add support for slice argument in where statement

This commit is contained in:
John
2018-12-17 10:52:44 +08:00
parent c5e9686a95
commit 7a8bd96edc
6 changed files with 92 additions and 27 deletions

View File

@ -10,7 +10,7 @@ func main() {
// 开启调试模式以便于记录所有执行的SQL
db.SetDebug(true)
r, _ := db.Table("test").Where("id IN (?,?)", 1,2).All()
r, _ := db.Table("test").Where("id IN (?)", []interface{}{1, 2}).All()
if r != nil {
fmt.Println(r.ToList())
}