MCPcopy
hub / github.com/sequelize/sequelize / _whereBind

Method _whereBind

src/dialects/abstract/query-generator.js:2623–2636  ·  view source on GitHub ↗
(binding, key, value, options)

Source from the content-addressed store, hash-verified

2621 }
2622
2623 _whereBind(binding, key, value, options) {
2624 if (_.isPlainObject(value)) {
2625 value = Utils.getComplexKeys(value).map(prop => {
2626 const item = value[prop];
2627 return this.whereItemQuery(key, { [prop]: item }, options);
2628 });
2629 } else {
2630 value = value.map(item => this.whereItemQuery(key, item, options));
2631 }
2632
2633 value = value.filter(item => item && item.length);
2634
2635 return value.length ? `(${value.join(binding)})` : undefined;
2636 }
2637
2638 _whereJSON(key, value, options) {
2639 const items = [];

Callers 1

whereItemQueryMethod · 0.95

Calls 1

whereItemQueryMethod · 0.95

Tested by

no test coverage detected