1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

refactor: db exporter ts refactor

This commit is contained in:
2022-04-15 23:13:23 +02:00
parent 6adc93e1cd
commit ce0f278caf
12 changed files with 198 additions and 104 deletions

View File

@ -24,7 +24,6 @@ export class PostgreSQLClient extends AntaresCore {
private _runningConnections: Map<string, number>;
private _connectionsToCommit: Map<string, pg.Client | pg.PoolClient>;
protected _connection?: pg.Client | pg.Pool;
protected _params: pg.ClientConfig & {schema: string; ssl?: mysql.SslOptions; ssh?: SSHConfig; readonly: boolean};
private types: {[key: string]: string} = {};
private _arrayTypes: {[key: string]: string} = {
_int2: 'SMALLINT',
@ -36,6 +35,8 @@ export class PostgreSQLClient extends AntaresCore {
_varchar: 'CHARACTER VARYING'
}
_params: pg.ClientConfig & {schema: string; ssl?: mysql.SslOptions; ssh?: SSHConfig; readonly: boolean};
constructor (args: antares.ClientParams) {
super(args);
@ -173,6 +174,10 @@ export class PostgreSQLClient extends AntaresCore {
}
}
getCollations (): null[] {
return [];
}
async getStructure (schemas: Set<string>) {
/* eslint-disable camelcase */
interface ShowTableResult {