Skip to content

Commit

Permalink
#3367 Add interface for PG Connection object (#3372)
Browse files Browse the repository at this point in the history
  • Loading branch information
timorthi authored and kibertoad committed Oct 26, 2019
1 parent 1c65562 commit d806ec0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions types/index.d.ts
Expand Up @@ -1616,6 +1616,8 @@ declare namespace Knex {
| MySqlConnectionConfig
| MsSqlConnectionConfig
| OracleDbConnectionConfig
| PgConnectionConfig
| RedshiftConnectionConfig
| Sqlite3ConnectionConfig
| SocketConnectionConfig;
pool?: PoolConfig;
Expand Down Expand Up @@ -1755,6 +1757,23 @@ declare namespace Knex {
connectString?: string;
}

// Config object for pg: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/pg/index.d.ts
interface PgConnectionConfig {
user?: string;
database?: string;
password?: string;
port?: number;
host?: string;
connectionString?: string;
keepAlive?: boolean;
stream?: stream.Duplex;
statement_timeout?: false | number;
connectionTimeoutMillis?: number;
keepAliveInitialDelayMillis?: number;
}

type RedshiftConnectionConfig = PgConnectionConfig;

/** Used with SQLite3 adapter */
interface Sqlite3ConnectionConfig {
filename: string;
Expand Down

0 comments on commit d806ec0

Please sign in to comment.