ffffng/server/utils/databaseUtil.js
2018-12-18 00:29:20 +01:00

12 lines
258 B
JavaScript

'use strict';
const _ = require('lodash')
module.exports = {
inCondition (field, list) {
return {
query: '(' + field + ' IN (' + _.join(_.times(list.length, _.constant('?')), ', ') + '))',
params: list
}
}
}