mirror of
https://github.com/dbgate/dbgate
synced 2024-11-12 22:55:31 +00:00
neutral schema cond
This commit is contained in:
parent
ddd2b1d96b
commit
643c49e985
@ -57,10 +57,11 @@ class Analyser extends DatabaseAnalyser {
|
|||||||
|
|
||||||
createQuery(resFileName, typeFields, replacements = {}) {
|
createQuery(resFileName, typeFields, replacements = {}) {
|
||||||
const query = super.createQuery(sql[resFileName], typeFields, replacements);
|
const query = super.createQuery(sql[resFileName], typeFields, replacements);
|
||||||
const dbname = this.pool._database_name;
|
// const dbname = this.pool._database_name;
|
||||||
const schemaCondition = isCompositeDbName(dbname)
|
// const schemaCondition = isCompositeDbName(dbname)
|
||||||
? `= '${splitCompositeDbName(dbname).schema}' `
|
// ? `= '${splitCompositeDbName(dbname).schema}' `
|
||||||
: ' IS NOT NULL ';
|
// : ' IS NOT NULL ';
|
||||||
|
const schemaCondition = ' IS NOT NULL ';
|
||||||
|
|
||||||
return query.replace(/=SCHEMA_NAME_CONDITION/g, schemaCondition);
|
return query.replace(/=SCHEMA_NAME_CONDITION/g, schemaCondition);
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ const drivers = driverBases.map(driverBase => ({
|
|||||||
await this.query(client, 'SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY');
|
await this.query(client, 'SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY');
|
||||||
}
|
}
|
||||||
|
|
||||||
client._database_name = database;
|
// client._database_name = database;
|
||||||
return client;
|
return client;
|
||||||
},
|
},
|
||||||
async close(pool) {
|
async close(pool) {
|
||||||
|
Loading…
Reference in New Issue
Block a user