mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 21:55:59 +00:00
introduced dbhandle instead of overwriting 3rd party client's fields
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user