Skip to content

Instantly share code, notes, and snippets.

View andradenathan's full-sized avatar

Nathan Andrade andradenathan

  • 10:34 (UTC -03:00)
View GitHub Profile
@andradenathan
andradenathan / sequelize_op.js
Created March 11, 2021 17:16
Sequelize operators - EJCM Node.js Sequelize Class
const Op = Sequelize.Op
[Op.and]: [{a: 5}, {b: 6}] // (a = 5) AND (b = 6)
[Op.or]: [{a: 5}, {a: 6}] // (a = 5 OR a = 6)
[Op.gt]: 6, // > 6
[Op.gte]: 6, // >= 6
[Op.lt]: 10, // < 10
[Op.lte]: 10, // <= 10
[Op.ne]: 20, // != 20
[Op.eq]: 3, // = 3