postgre incremental analysis, fixed mysql incremental analysis

This commit is contained in:
Jan Prochazka
2020-09-28 11:33:25 +02:00
parent fbd963bfb1
commit a88e38dcf7
14 changed files with 194 additions and 53 deletions

View File

@@ -97,6 +97,16 @@ const driver = {
return stream;
},
async analyseSingleObject(pool, name, typeField = 'tables') {
const analyser = new PostgreAnalyser(pool, this);
analyser.singleObjectFilter = { ...name, typeField };
const res = await analyser.fullAnalysis();
return res.tables[0];
},
// @ts-ignore
analyseSingleTable(pool, name) {
return this.analyseSingleObject(pool, name, 'tables');
},
async getVersion(client) {
const { rows } = await this.query(client, 'SELECT version()');
const { version } = rows[0];