📜  whereIn knex - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:10.282000             🧑  作者: Mango

代码示例1
const myArray = [1,2,3]
knex.raw('select * from users where id in (' + myArray.map(_ => '?').join(',') + ')', [...myArray]);
// query will become: select * from users where id in (?, ?, ?) with bindings [1,2,3]