From f40f919b5a1045c67c73da2e7a1b592fde4af84e Mon Sep 17 00:00:00 2001 From: Joel Venable <30368779+JoelVenable@users.noreply.github.com> Date: Thu, 21 Apr 2022 07:15:31 -0500 Subject: [PATCH 1/3] Update type definitions for pg connection --- types/index.d.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index e4429595de..6df00a3426 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2570,17 +2570,22 @@ export declare namespace Knex { interface PgConnectionConfig { user?: string; database?: string; - password?: string; + password?: string | (() => string | Promise); port?: number; host?: string; connectionString?: string; keepAlive?: boolean; stream?: stream.Duplex; statement_timeout?: false | number; - connectionTimeoutMillis?: number; - keepAliveInitialDelayMillis?: number; + parseInputDatesAsUTC?: boolean; ssl?: boolean | ConnectionOptions; + query_timeout?: number; + keepAliveInitialDelayMillis?: number; + idle_in_transaction_session_timeout?: number; application_name?: string; + connectionTimeoutMillis?: number; + types?: CustomTypesConfig; + options?: string; } type RedshiftConnectionConfig = PgConnectionConfig; From 647fde8b93559f8a7a9125d2c808912c38543073 Mon Sep 17 00:00:00 2001 From: Joel Venable <30368779+JoelVenable@users.noreply.github.com> Date: Thu, 21 Apr 2022 07:57:36 -0500 Subject: [PATCH 2/3] Update custom types config --- types/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 6df00a3426..dfb467dcca 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2584,10 +2584,16 @@ export declare namespace Knex { idle_in_transaction_session_timeout?: number; application_name?: string; connectionTimeoutMillis?: number; - types?: CustomTypesConfig; + types?: PgCustomTypesConfig; options?: string; } + type PgGetTypeParser = (oid: number, format: string) => any + + interface PgCustomTypesConfig { + getTypeParser: PgGetTypeParser; + } + type RedshiftConnectionConfig = PgConnectionConfig; /** Used with SQLite3 adapter */ From 91ebb1a7d580360207c85e372e740f32ff27ea26 Mon Sep 17 00:00:00 2001 From: Igor Savin Date: Sun, 22 May 2022 15:06:09 +0300 Subject: [PATCH 3/3] Update types/index.d.ts --- types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index dfb467dcca..139e0d5d97 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2588,7 +2588,7 @@ export declare namespace Knex { options?: string; } - type PgGetTypeParser = (oid: number, format: string) => any + type PgGetTypeParser = (oid: number, format: string) => any; interface PgCustomTypesConfig { getTypeParser: PgGetTypeParser;