Skip to content

postgrelize / or

Function: or() ​

or(...conditions): WhereOptions

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

Combines conditions with OR (Sequelize v6 or), for use inside where.

Parameters ​

conditions ​

...readonly WhereOptions[]

Conditions to combine.

Returns ​

WhereOptions

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

Example ​

ts
await User.findAll({ where: or({ role: 'admin' }, { role: 'owner' }) });

Released under the MIT License.