neutral schema cond

This commit is contained in:
Jan Prochazka 2024-09-19 17:57:24 +02:00
parent ddd2b1d96b
commit 643c49e985
2 changed files with 6 additions and 5 deletions

View File

@ -57,10 +57,11 @@ class Analyser extends DatabaseAnalyser {
createQuery(resFileName, typeFields, replacements = {}) {
const query = super.createQuery(sql[resFileName], typeFields, replacements);
const dbname = this.pool._database_name;
const schemaCondition = isCompositeDbName(dbname)
? `= '${splitCompositeDbName(dbname).schema}' `
: ' IS NOT NULL ';
// const dbname = this.pool._database_name;
// const schemaCondition = isCompositeDbName(dbname)
// ? `= '${splitCompositeDbName(dbname).schema}' `
// : ' IS NOT NULL ';
const schemaCondition = ' IS NOT NULL ';
return query.replace(/=SCHEMA_NAME_CONDITION/g, schemaCondition);
}

View File

@ -89,7 +89,7 @@ const drivers = driverBases.map(driverBase => ({
await this.query(client, 'SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY');
}
client._database_name = database;
// client._database_name = database;
return client;
},
async close(pool) {