J
J
jenya77712018-04-03 17:08:39
PostgreSQL
jenya7771, 2018-04-03 17:08:39

How to update multiple rows in sequelize database with one query?

Hello, how can I update several rows in the database with one request, if there are conditions for each update, for example like this

[{where: {
  is: 1
},
data: {
  color: red
}},
{where: {
  is: 2
},
data: {
  color: red2
}},
{where: {
  is: 3
},
data: {
  color: red22
}}]

I know that you can create in this way bulkCreate.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question