import SQL dump

This commit is contained in:
Jan Prochazka
2022-04-18 14:52:01 +02:00
parent a75e931fd5
commit 95fb5d51c5
3 changed files with 32 additions and 9 deletions

View File

@@ -13,7 +13,11 @@ class ImportStream extends stream.Transform {
this.driver = driver;
}
async _transform(chunk, encoding, cb) {
await this.driver.script(this.pool, chunk);
try {
await this.driver.script(this.pool, chunk);
} catch (err) {
this.emit('error', err.message);
}
cb();
}
}