@opengis/fastify-table 2.0.138 → 2.0.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"getPG.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/getPG.ts"],"names":[],"mappings":"AAQA,iBAAS,KAAK,CAAC,KAAK,GAAE,GAAQ,OAyD7B;AAMD,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"getPG.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/pg/funcs/getPG.ts"],"names":[],"mappings":"AAQA,iBAAS,KAAK,CAAC,KAAK,GAAE,GAAQ,OA+D7B;AAOD,eAAe,KAAK,CAAC"}
@@ -21,13 +21,17 @@ function getPG(param = {}) {
21
21
  "client";
22
22
  if (pgClients[name])
23
23
  return pgClients[name];
24
+ const statementTimeout = timeout ?? config.pg?.statement_timeout;
24
25
  const dbConfig = {
26
+ name,
25
27
  user: user || config.pg?.user || "postgres",
26
28
  password: password || config.pg?.password || "postgres",
27
29
  host: host || config.pg?.host,
28
30
  port: port || config.pg?.port,
29
31
  database: db || database || config.pg?.db || config.pg?.database,
30
- statement_timeout: timeout || config.pg?.statement_timeout || 10000,
32
+ statement_timeout: typeof statementTimeout === "boolean" && !statementTimeout
33
+ ? false
34
+ : statementTimeout || 10000,
31
35
  connectionTimeoutMillis: connectionTimeout || config.pg?.connectionTimeoutMillis || 5000,
32
36
  };
33
37
  if (!dbConfig.database) {
@@ -41,5 +45,6 @@ function getPG(param = {}) {
41
45
  }
42
46
  if (config.pg) {
43
47
  getPG({ name: "client" });
48
+ getPG({ name: "stream", statement_timeout: false });
44
49
  }
45
50
  export default getPG;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.0.138",
3
+ "version": "2.0.139",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [