I'm using Node.js, MySQL and Sequelize. I'd like to insert some 10k rows into a table at once. The table has custom primaryKey
field, that is being set manually. The data are downloaded from web and are overlapping.
I'd like to have a version of bulkCreate
that wouldn't fail if any of the rows in data have unique keys that are already present in the table. Such kind of things is done in MySQL via INSERT ... ON DUPLICATE KEY UPDATE
construct.
How do I do it in Sequelize?