Isolations levels can be set per-transaction by passing options.isolationLevel to sequelize.transaction.
Default to REPEATABLE_READ but you can override the default isolation level by passing options.isolationLevel in new Sequelize.
The possible isolations levels to use when starting a transaction:
try { awaitsequelize.transaction({isolationLevel:Sequelize.Transaction.SERIALIZABLE}, transaction=> { // your transactions }); // transaction has been committed. Do something after the commit if required. } catch(err) { // do something with the err. }
Isolations levels can be set per-transaction by passing
options.isolationLevel
tosequelize.transaction
. Default toREPEATABLE_READ
but you can override the default isolation level by passingoptions.isolationLevel
innew Sequelize
.The possible isolations levels to use when starting a transaction:
Pass in the desired level as the first argument: