data duplicator fix

This commit is contained in:
Jan Prochazka
2023-02-17 10:00:21 +01:00
parent 1ab58a491a
commit 6b783027e5
4 changed files with 20 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ const dialect = {
export async function runCommandOnDriver(pool, driver: EngineDriver, cmd: (dmp: SqlDumper) => void): Promise<void> {
const dmp = driver.createDumper();
cmd(dmp as any);
// console.log('CMD:', dmp.s);
await driver.query(pool, dmp.s, { discardResult: true });
}
@@ -33,6 +34,7 @@ export async function runQueryOnDriver(
): Promise<QueryResult> {
const dmp = driver.createDumper();
cmd(dmp as any);
// console.log('QUERY:', dmp.s);
return await driver.query(pool, dmp.s);
}