Isolation levels and advanced configuration
In this section, we will be covering the different isolation levels and configuration options available from Sequelize for every type of transaction. For managed transactions, the method signature looks like this: sequelize.transaction(options, callback)
. The unmanaged transaction signature is sequelize.transaction(options)
.
Here is a list of configurable options for both transaction types:
type
—A SQLite option to set the transaction type. Possible values areDEFERRED
(the default),IMMEDIATE
, andEXCLUSIVE
. Refer to https://www.sqlite.org/lang_transaction.html.isolationLevel
—Sets the transaction’s isolation level. The following explanations are under the context of MySQL but should be applicable to other database management systems (DBMS) with minute differences. There are four available levels for Sequelize, as outlined here:READ_UNCOMMITTED
—Reads data using non-locking mechanisms. This could...