MCPcopy
hub / github.com/sequelize/sequelize / begin

Method begin

lib/transaction.js:150–161  ·  lib/transaction.js::Transaction.begin
()

Source from the content-addressed store, hash-verified

148 }
149
150 async begin() {
151 const queryInterface = this.sequelize.getQueryInterface();
152
153 if ( this.sequelize.dialect.supports.settingIsolationLevelDuringTransaction ) {
154 await queryInterface.startTransaction(this, this.options);
155 return queryInterface.setIsolationLevel(this, this.options.isolationLevel, this.options);
156 }
157
158 await queryInterface.setIsolationLevel(this, this.options.isolationLevel, this.options);
159
160 return queryInterface.startTransaction(this, this.options);
161 }
162
163 cleanup() {
164 class="cm">// Donclass="st">'t release the connection if there's a parent transaction or

Callers 1

prepareEnvironmentMethod · 0.95

Calls 3

getQueryInterfaceMethod · 0.80
startTransactionMethod · 0.80
setIsolationLevelMethod · 0.80

Tested by

no test coverage detected