MCPcopy Index your code
hub / github.com/sequelize/sequelize / begin

Method begin

src/transaction.js:158–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156 }
157
158 async begin() {
159 const queryInterface = this.sequelize.getQueryInterface();
160
161 if ( this.sequelize.dialect.supports.settingIsolationLevelDuringTransaction ) {
162 await queryInterface.startTransaction(this, this.options);
163 return queryInterface.setIsolationLevel(this, this.options.isolationLevel, this.options);
164 }
165
166 await queryInterface.setIsolationLevel(this, this.options.isolationLevel, this.options);
167
168 return queryInterface.startTransaction(this, this.options);
169 }
170
171 cleanup() {
172 // Don'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