mirror of
https://gitee.com/johng/gf
synced 2026-07-08 14:39:50 +08:00
gdb: add support for slice argument in where statement
This commit is contained in:
@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user