Skip to content

Commit

Permalink
added support for connectionTimeoutMillis and statement_timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
hem-brahmbhatt committed Apr 10, 2018
1 parent f2a432d commit 10c9d62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion definitions/npm/pg_v7.x.x/flow_v0.28.x-/pg_v7.x.x.js
Expand Up @@ -40,6 +40,7 @@ declare module pg {
min: number,
refreshIdle: boolean,
idleTimeoutMillis: number,
connectionTimeoutMillis: number,
reapIntervalMillis: number,
returnToHead: boolean,
priorityRange: number,
Expand All @@ -66,7 +67,9 @@ declare module pg {
// fallback value for the application_name configuration parameter
// default value: false
fallback_application_name?: string,

// max milliseconds any query using this connection will execute for before timing out in error. false=unlimited
// default value: false
statement_timeout?: boolean | number,
// pg-pool
Client: mixed,
Promise: mixed,
Expand Down
2 changes: 2 additions & 0 deletions definitions/npm/pg_v7.x.x/test_pg_v7.x.x.js
Expand Up @@ -178,7 +178,9 @@ const pool = new pg.Pool({
host: 'localhost',
database: 'testdb',
max: 10,
statement_timeout: false,
idleTimeoutMillis: 1000,
connectionTimeoutMillis: 1000
});

// use pool
Expand Down

0 comments on commit 10c9d62

Please sign in to comment.