code cleanup

This commit is contained in:
Jan Prochazka
2021-05-15 18:08:12 +02:00
parent 21ceaecec6
commit 06a028a093
2 changed files with 1 additions and 22 deletions

View File

@@ -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);

View File

@@ -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];