MCPcopy Index your code
hub / github.com/sequelize/sequelize / combineWheresWithAnd

Function combineWheresWithAnd

src/model.js:4733–4749  ·  view source on GitHub ↗
(whereA, whereB)

Source from the content-addressed store, hash-verified

4731}
4732
4733function combineWheresWithAnd(whereA, whereB) {
4734 const unpackedA = unpackAnd(whereA);
4735
4736 if (unpackedA === undefined) {
4737 return whereB;
4738 }
4739
4740 const unpackedB = unpackAnd(whereB);
4741
4742 if (unpackedB === undefined) {
4743 return whereA;
4744 }
4745
4746 return {
4747 [Op.and]: _.flatten([unpackedA, unpackedB])
4748 };
4749}
4750
4751Object.assign(Model, associationsMixin);
4752Hooks.applyTo(Model, true);

Callers 1

_mergeFunctionMethod · 0.85

Calls 1

unpackAndFunction · 0.85

Tested by

no test coverage detected