@inheritDoc
(dump: string)
| 198 | |
| 199 | /** @inheritDoc */ |
| 200 | override async executeDump(dump: string): Promise<void> { |
| 201 | await this.ensureConnection(); |
| 202 | const lines = dump.split('\n').filter(i => i.trim()); |
| 203 | |
| 204 | for (let line of lines) { |
| 205 | if (line.startsWith('--')) { |
| 206 | continue; |
| 207 | } |
| 208 | |
| 209 | line = this.stripTrailingSemicolon(line); |
| 210 | |
| 211 | const raw = CompiledQuery.raw(line); |
| 212 | const now = Date.now(); |
| 213 | |
| 214 | try { |
| 215 | await this.getClient().executeQuery(raw); |
| 216 | } catch (e) { |
| 217 | this.logQuery(line, { took: Date.now() - now, level: 'error', query: line }); |
| 218 | throw e; |
| 219 | } |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | /** |
| 224 | * Oracle routines acquire their own pool connection with `autoCommit: true` (refcursor binds |
nothing calls this directly
no test coverage detected