()
| 95 | } |
| 96 | |
| 97 | async commit(): Promise<void> { |
| 98 | debug(`[js::commit]`) |
| 99 | |
| 100 | try { |
| 101 | await this.client.query({ sql: 'COMMIT' }) |
| 102 | } catch (err) { |
| 103 | this.onError(err) |
| 104 | } finally { |
| 105 | this.cleanup?.() |
| 106 | await this.client.end() |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | async rollback(): Promise<void> { |
| 111 | debug(`[js::rollback]`) |