sequalize operators code example
Example 1: sequelize order by
order: [["createdAt", "DESC"]]
Example 2: in in sequelize
await Tag.findAll({
where: {
id: {
[Sequelize.Op.in]: [1, 2, 3, 4]
}
}
});
order: [["createdAt", "DESC"]]
await Tag.findAll({
where: {
id: {
[Sequelize.Op.in]: [1, 2, 3, 4]
}
}
});