Sometimes, we want to delete items with Sequelize.js.
In this article, we’ll look at how to delete items with Sequelize.js.
How to delete items with Sequelize.js?
To delete items with Sequelize.js, we can use the destroy method.
For instance, we write
Model.destroy({
where: {
// ...
}
})
to call Model.destroy with an object that has the where property to specify which items we want to delete.
Conclusion
To delete items with Sequelize.js, we can use the destroy method.