Skip to content

postgrelize / and

Function: and() ​

and(...conditions): WhereOptions

Defined in: src/expressions/logic.ts:15

Combines conditions with AND (Sequelize v6 and), for use inside where.

Parameters ​

conditions ​

...readonly WhereOptions[]

Conditions to combine.

Returns ​

WhereOptions

A { [Op.and]: conditions } condition usable as where.

Example ​

ts
await User.findAll({ where: and({ age: { [Op.gt]: 18 } }, { active: true }) });

Released under the MIT License.