mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 09:53:59 +00:00
code cleanup
This commit is contained in:
@@ -137,16 +137,6 @@ const drivers = driverBases.map(driverBase => ({
|
|||||||
options.done();
|
options.done();
|
||||||
// return stream;
|
// 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) {
|
async getVersion(client) {
|
||||||
const { rows } = await this.query(client, 'SELECT version()');
|
const { rows } = await this.query(client, 'SELECT version()');
|
||||||
const { version } = rows[0];
|
const { version } = rows[0];
|
||||||
@@ -155,14 +145,6 @@ const drivers = driverBases.map(driverBase => ({
|
|||||||
versionText: (version || '').replace(/\s*\(.*$/, ''),
|
versionText: (version || '').replace(/\s*\(.*$/, ''),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// async analyseFull(pool) {
|
|
||||||
// const analyser = new PostgreAnalyser(pool, this);
|
|
||||||
// return analyser.fullAnalysis();
|
|
||||||
// },
|
|
||||||
// async analyseIncremental(pool, structure) {
|
|
||||||
// const analyser = new PostgreAnalyser(pool, this);
|
|
||||||
// return analyser.incrementalAnalysis(structure);
|
|
||||||
// },
|
|
||||||
async readQuery(client, sql, structure) {
|
async readQuery(client, sql, structure) {
|
||||||
const query = new pgQueryStream(sql, undefined, { rowMode: 'array' });
|
const query = new pgQueryStream(sql, undefined, { rowMode: 'array' });
|
||||||
|
|
||||||
@@ -209,9 +191,6 @@ const drivers = driverBases.map(driverBase => ({
|
|||||||
|
|
||||||
return pass;
|
return pass;
|
||||||
},
|
},
|
||||||
// createDumper() {
|
|
||||||
// return new PostgreDumper(this);
|
|
||||||
// },
|
|
||||||
async writeTable(pool, name, options) {
|
async writeTable(pool, name, options) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return createBulkInsertStreamBase(this, stream, pool, name, options);
|
return createBulkInsertStreamBase(this, stream, pool, name, options);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const redshiftDriver = {
|
|||||||
dialect,
|
dialect,
|
||||||
engine: 'red@dbgate-plugin-postgres',
|
engine: 'red@dbgate-plugin-postgres',
|
||||||
title: 'Amazon Redshift',
|
title: 'Amazon Redshift',
|
||||||
defaultPort: 5432,
|
defaultPort: 5439,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = [postgresDriver, cockroachDriver, redshiftDriver];
|
module.exports = [postgresDriver, cockroachDriver, redshiftDriver];
|
||||||
|
|||||||
Reference in New Issue
Block a user