not connected deploy test

This commit is contained in:
Jan Prochazka
2024-10-01 10:37:05 +02:00
parent 87aa60bc3e
commit 3ec7f651c1
5 changed files with 74 additions and 10 deletions

View File

@@ -8,10 +8,14 @@ async function executeQuery({ connection = undefined, systemConnection = undefin
logger.info({ sql }, `Execute query`);
if (!driver) driver = requireEngineDriver(connection);
const pool = systemConnection || (await connectUtility(driver, connection, 'script'));
const dbhan = systemConnection || (await connectUtility(driver, connection, 'script'));
logger.info(`Connected.`);
await driver.script(pool, sql);
await driver.script(dbhan, sql);
if (!systemConnection) {
await driver.close(dbhan);
}
}
module.exports = executeQuery;