()
| 172 | } |
| 173 | |
| 174 | async rollback(): Promise<void> { |
| 175 | if (this.#finished) { |
| 176 | throw new Error('Transaction already finished') |
| 177 | } |
| 178 | |
| 179 | try { |
| 180 | if (this.#begun) { |
| 181 | await this.#session.query('ROLLBACK') |
| 182 | } |
| 183 | this.#finished = true |
| 184 | } catch (error) { |
| 185 | throw convertDriverError(error) |
| 186 | } finally { |
| 187 | this.#session.close() |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | async createSavepoint(name: string): Promise<void> { |
| 192 | await this.executeRaw({ sql: `SAVEPOINT ${name}`, args: [], argTypes: [] }) |
nothing calls this directly
no test coverage detected