I am using the Delete Query in the NodeJs project, but it not returning the row length, OR I am not able to identify whether the query has been executed or not.
I’m sorry @wawane7256, this is sequelize isn’t it?
As I say still learning this myself, and have only really used Magic methods in sequelize. I have to say I think I might have preferred using raw queries.
The one thing that does standout though is
"DELETE FROM `table` WHERE `column` = :value", { replacements: { value: "value" }
Shouldn’t table be an actual table name, column be a column name? Also shouldn’t value be an actual value rather than “value”? — maybe one passed in on req
I guess it would be helpful to see an example of your table.
A bit out of my depth here, maybe someone else with more experience can better advise.
I don’t think there is an issue with your syntax. I think it’s more likely an issue with your query and the replacement value.
I am hazarding a guess `table` should be your actual table name, `column` should be an actual column name in the table, and “value” should be a matching value. e.g. `table` could be `users`, column could be `id`and value could be 5 (req.params.id)
As I say an example of the table you are using would help.