introduced dbhandle instead of overwriting 3rd party client's fields

This commit is contained in:
SPRINX0\prochazka
2024-09-20 10:27:03 +02:00
parent 6b8b511d0d
commit 48d4374346
26 changed files with 387 additions and 371 deletions

View File

@@ -24,7 +24,7 @@ class Analyser extends DatabaseAnalyser {
createQuery(resFileName, typeFields, replacements = {}) {
let res = sql[resFileName];
res = res.replace('#DATABASE#', this.pool.__dbgate_database_name__);
res = res.replace('#DATABASE#', this.dbhan.database);
return super.createQuery(res, typeFields, replacements);
}
@@ -82,8 +82,8 @@ class Analyser extends DatabaseAnalyser {
async _computeSingleObjectId() {
const { pureName } = this.singleObjectFilter;
const resId = await this.driver.query(
this.pool,
`SELECT uuid as id FROM system.tables WHERE database = '${this.pool.__dbgate_database_name__}' AND name='${pureName}'`
this.dbhan,
`SELECT uuid as id FROM system.tables WHERE database = '${this.dbhan.database}' AND name='${pureName}'`
);
this.singleObjectId = resId.rows[0]?.id;
}