mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 07:16:01 +00:00
loading schemas indicator + error reporting
This commit is contained in:
@@ -159,6 +159,8 @@ const driver = {
|
||||
const defaultSchemaRows = await this.query(dbhan, 'SELECT SCHEMA_NAME() as name');
|
||||
const defaultSchema = defaultSchemaRows.rows[0]?.name;
|
||||
|
||||
logger.debug(`Loaded ${rows.length} mssql schemas`);
|
||||
|
||||
return rows.map(x => ({
|
||||
...x,
|
||||
isDefault: x.schemaName == defaultSchema,
|
||||
|
||||
@@ -280,6 +280,8 @@ const drivers = driverBases.map(driverBase => ({
|
||||
const defaultSchemaRows = await this.query(dbhan, 'SHOW SEARCH_PATH;');
|
||||
const searchPath = defaultSchemaRows.rows[0]?.search_path?.replace('"$user",', '')?.trim();
|
||||
|
||||
logger.debug(`Loaded ${schemaRows.rows.length} postgres schemas`);
|
||||
|
||||
const schemas = schemaRows.rows.map(x => ({
|
||||
schemaName: x.schema_name,
|
||||
objectId: x.object_id,
|
||||
|
||||
Reference in New Issue
Block a user