Reputation: 2538
I want to toggle a particular column with type boolean
in postgres using sequelize. I do not want to use the sequelize.query()
option, yet, I want it done in one call. Is this possible?
Upvotes: 1
Views: 3159
Reputation: 41
You can use Sequelize.literal
model.update({ name: Sequelize.literal('NOT name') }, { where: { id } });
Upvotes: 4