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

refactor: use Record to type objects

This commit is contained in:
2024-01-19 18:03:20 +01:00
parent eb5d3f14f1
commit 8928510fb5
40 changed files with 70 additions and 81 deletions

View File

@ -88,8 +88,8 @@ export class PostgreSQLClient extends BaseClient {
private _keepaliveTimer: NodeJS.Timer;
private _keepaliveMs: number;
protected _connection?: pg.Client | pg.Pool;
private types: {[key: string]: string} = {};
private _arrayTypes: {[key: string]: string} = {
private types: Record<string, string> = {};
private _arrayTypes: Record<string, string> = {
_int2: 'SMALLINT',
_int4: 'INTEGER',
_int8: 'BIGINT',
@ -656,7 +656,7 @@ export class PostgreSQLClient extends BaseClient {
let createSql = '';
const sequences = [];
const columnsSql = [];
const arrayTypes: {[key: string]: string} = {
const arrayTypes: Record<string, string> = {
_int2: 'smallint',
_int4: 'integer',
_int8: 'bigint',