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

Method _whereBind

lib/dialects/abstract/query-generator.js:2446–2459  ·  lib/dialects/abstract/query-generator.js::QueryGenerator._whereBind
(binding, key, value, options)

Source from the content-addressed store, hash-verified

2444 }
2445
2446 _whereBind(binding, key, value, options) {
2447 if (_.isPlainObject(value)) {
2448 value = Utils.getComplexKeys(value).map(prop => {
2449 const item = value[prop];
2450 return this.whereItemQuery(key, { [prop]: item }, options);
2451 });
2452 } else {
2453 value = value.map(item => this.whereItemQuery(key, item, options));
2454 }
2455
2456 value = value.filter(item => item && item.length);
2457
2458 return value.length ? `(${value.join(binding)})` : undefined;
2459 }
2460
2461 _whereJSON(key, value, options) {
2462 const items = [];

Callers 1

whereItemQueryMethod · 0.95

Calls 1

whereItemQueryMethod · 0.95

Tested by

no test coverage detected