code completion supports schemas

This commit is contained in:
Jan Prochazka
2022-02-03 17:22:35 +01:00
parent 94ec41d95f
commit 2958eb372a
3 changed files with 57 additions and 35 deletions

View File

@@ -74,6 +74,7 @@ class MsSqlAnalyser extends DatabaseAnalyser {
const schemaRows = await this.driver.query(this.pool, this.createQuery('getSchemas'));
const indexesRows = await this.driver.query(this.pool, this.createQuery('indexes', ['tables']));
const indexcolsRows = await this.driver.query(this.pool, this.createQuery('indexcols', ['tables']));
const defaultSchemaRows = await this.driver.query(this.pool, 'SELECT SCHEMA_NAME() as name');
const schemas = schemaRows.rows;
@@ -150,6 +151,7 @@ class MsSqlAnalyser extends DatabaseAnalyser {
procedures,
functions,
schemas,
defaultSchema: defaultSchemaRows.rows[0] ? defaultSchemaRows.rows[0].name : undefined,
};
}