mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 02:06:01 +00:00
SYNC: Merge pull request #7 from dbgate/feature/applog
This commit is contained in:
@@ -45,26 +45,26 @@ class Analyser extends DatabaseAnalyser {
|
||||
}
|
||||
|
||||
async _runAnalysis() {
|
||||
this.feedback({ analysingMessage: 'Loading tables' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00230 Loading tables' });
|
||||
const tables = await this.analyserQuery('tableList', ['tables'], { $owner: this.dbhan.database });
|
||||
this.feedback({ analysingMessage: 'Loading columns' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00231 Loading columns' });
|
||||
const columns = await this.analyserQuery('columns', ['tables', 'views'], { $owner: this.dbhan.database });
|
||||
|
||||
this.feedback({ analysingMessage: 'Loading primary keys' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00232 Loading primary keys' });
|
||||
const pkColumns = await this.analyserQuery('primaryKeys', ['tables'], { $owner: this.dbhan.database });
|
||||
|
||||
//let fkColumns = null;
|
||||
|
||||
this.feedback({ analysingMessage: 'Loading foreign keys' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00233 Loading foreign keys' });
|
||||
const fkColumns = await this.analyserQuery('foreignKeys', ['tables'], { $owner: this.dbhan.database });
|
||||
this.feedback({ analysingMessage: 'Loading views' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00234 Loading views' });
|
||||
const views = await this.analyserQuery('views', ['views'], { $owner: this.dbhan.database });
|
||||
|
||||
this.feedback({ analysingMessage: 'Loading materialized views' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00235 Loading materialized views' });
|
||||
const matviews = this.driver.dialect.materializedViews
|
||||
? await this.analyserQuery('matviews', ['matviews'], { $owner: this.dbhan.database })
|
||||
: null;
|
||||
this.feedback({ analysingMessage: 'Loading routines' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00236 Loading routines' });
|
||||
const routines = await this.analyserQuery('routines', ['procedures', 'functions'], {
|
||||
$owner: this.dbhan.database,
|
||||
});
|
||||
@@ -91,15 +91,15 @@ class Analyser extends DatabaseAnalyser {
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
this.feedback({ analysingMessage: 'Loading indexes' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00237 Loading indexes' });
|
||||
const indexes = await this.analyserQuery('indexes', ['tables'], { $owner: this.dbhan.database });
|
||||
this.feedback({ analysingMessage: 'Loading unique names' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00238 Loading unique names' });
|
||||
|
||||
const triggers = await this.analyserQuery('triggers', undefined, { $owner: this.dbhan.database });
|
||||
this.feedback({ analysingMessage: 'Loading triggers' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00239 Loading triggers' });
|
||||
|
||||
const uniqueNames = await this.analyserQuery('uniqueNames', ['tables'], { $owner: this.dbhan.database });
|
||||
this.feedback({ analysingMessage: 'Finalizing DB structure' });
|
||||
this.feedback({ analysingMessage: 'DBGM-00240 Finalizing DB structure' });
|
||||
|
||||
const fkColumnsMapped = fkColumns.rows.map(x => ({
|
||||
pureName: x.pure_name,
|
||||
|
||||
Reference in New Issue
Block a user