mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
code cleanup
This commit is contained in:
parent
21ceaecec6
commit
06a028a093
@ -137,16 +137,6 @@ const drivers = driverBases.map(driverBase => ({
|
||||
options.done();
|
||||
// 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];
|
||||
@ -155,14 +145,6 @@ const drivers = driverBases.map(driverBase => ({
|
||||
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) {
|
||||
const query = new pgQueryStream(sql, undefined, { rowMode: 'array' });
|
||||
|
||||
@ -209,9 +191,6 @@ const drivers = driverBases.map(driverBase => ({
|
||||
|
||||
return pass;
|
||||
},
|
||||
// createDumper() {
|
||||
// return new PostgreDumper(this);
|
||||
// },
|
||||
async writeTable(pool, name, options) {
|
||||
// @ts-ignore
|
||||
return createBulkInsertStreamBase(this, stream, pool, name, options);
|
||||
|
@ -41,7 +41,7 @@ const redshiftDriver = {
|
||||
dialect,
|
||||
engine: 'red@dbgate-plugin-postgres',
|
||||
title: 'Amazon Redshift',
|
||||
defaultPort: 5432,
|
||||
defaultPort: 5439,
|
||||
};
|
||||
|
||||
module.exports = [postgresDriver, cockroachDriver, redshiftDriver];
|
||||
|
Loading…
Reference in New Issue
Block a user