0

I am trying to delete all my records from a table using sequelize but saw that there are two possible functions to use: queryInterface.bulkDelete and queryInterface.destroy . Can someone tell me what are the differences between these two and which one should I use? The documentation does not do a great job apparently.

tnkh
  • 1,749
  • 2
  • 14
  • 30
  • 1
    Is it queryInterface.destroy? Are you sure about that? Because as I know, destroy is a method for model instaces. Which removes the instace from DB. queryInterface.bulkDelete is sending a new query to remove more than one data from DB – Mansur Jun 25 '20 at 07:54
  • What version of sequelize are you using? There is no `destroy` method on `QueryInterface` – Lin Du Dec 04 '20 at 06:28

0 Answers0