To run Sequelize.js delete query with Node.js, we call the destroy
method.
For instance, we write
Model.destroy({
where: {
// criteria
},
});
to call Model.destroy
with an object with the where
property set to the criteria for the entries we want to delete.