()
| 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 |
no test coverage detected