pg-promise 10.15.1 → 10.15.3

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.
package/lib/query.js CHANGED
@@ -160,8 +160,8 @@ function $query(ctx, query, values, qrm, config) {
160
160
  if (npm.utils.isConnectivityError(err)) {
161
161
  ctx.db.client.$connectionError = err;
162
162
  }
163
- err.query = err.query ?? query;
164
- err.params = err.params ?? params;
163
+ err.query = err.query || query;
164
+ err.params = err.params || params;
165
165
  error = err;
166
166
  } else {
167
167
  multiResult = Array.isArray(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-promise",
3
- "version": "10.15.1",
3
+ "version": "10.15.3",
4
4
  "description": "PostgreSQL interface for Node.js",
5
5
  "main": "lib/index.js",
6
6
  "typings": "typescript/pg-promise.d.ts",
@@ -261,6 +261,9 @@ declare namespace pg {
261
261
  // https://github.com/brianc/node-postgres/blob/master/packages/pg-pool/index.js#L61
262
262
  // NOTE: We declare only what can be used from pg-promise
263
263
  interface IPool extends EventEmitter {
264
+
265
+ connect(): Promise<IClient>;
266
+
264
267
  end(): Promise<undefined>;
265
268
 
266
269
  end(cb: (err: Error) => any): any;
@@ -298,6 +301,8 @@ declare namespace pg {
298
301
 
299
302
  query<T>(config: any): Promise<IResult<T>>
300
303
 
304
+ release();
305
+
301
306
  connectionParameters: IConnectionParameters
302
307
  database: string
303
308
  user: string