mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 06:46:00 +00:00
schemaList moved from dbinfo to separate request
This commit is contained in:
@@ -79,12 +79,6 @@ class MsSqlAnalyser extends DatabaseAnalyser {
|
||||
this.singleObjectId = resId.rows[0].id;
|
||||
}
|
||||
|
||||
async readSchemaList() {
|
||||
const schemaRows = await this.analyserQuery('getSchemas');
|
||||
const schemas = schemaRows.rows;
|
||||
return schemas;
|
||||
}
|
||||
|
||||
async _runAnalysis() {
|
||||
this.feedback({ analysingMessage: 'Loading tables' });
|
||||
const tablesRows = await this.analyserQuery('tables', ['tables']);
|
||||
|
||||
@@ -150,6 +150,10 @@ const driver = {
|
||||
getAccessTokenFromAuth: (connection, req) => {
|
||||
return req?.user?.msentraToken;
|
||||
},
|
||||
async listSchemas(pool) {
|
||||
const { rows } = await this.query(pool, 'select schema_id as objectId, name as schemaName from sys.schemas');
|
||||
return rows;
|
||||
},
|
||||
};
|
||||
|
||||
driver.initialize = dbgateEnv => {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
module.exports = `select schema_id as objectId, name as schemaName from sys.schemas`;
|
||||
@@ -8,7 +8,6 @@ const loadSqlCode = require('./loadSqlCode');
|
||||
const views = require('./views');
|
||||
const programmables = require('./programmables');
|
||||
const viewColumns = require('./viewColumns');
|
||||
const getSchemas = require('./getSchemas');
|
||||
const indexes = require('./indexes');
|
||||
const indexcols = require('./indexcols');
|
||||
|
||||
@@ -22,7 +21,6 @@ module.exports = {
|
||||
views,
|
||||
programmables,
|
||||
viewColumns,
|
||||
getSchemas,
|
||||
indexes,
|
||||
indexcols,
|
||||
tableSizes,
|
||||
|
||||
Reference in New Issue
Block a user