pg 8.7.3 → 8.8.0

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/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # node-postgres
2
2
 
3
3
  [![Build Status](https://secure.travis-ci.org/brianc/node-postgres.svg?branch=master)](http://travis-ci.org/brianc/node-postgres)
4
- [![Dependency Status](https://david-dm.org/brianc/node-postgres.svg?path=packages/pg)](https://david-dm.org/brianc/node-postgres?path=packages/pg)
5
4
  <span class="badge-npmversion"><a href="https://npmjs.org/package/pg" title="View this project on NPM"><img src="https://img.shields.io/npm/v/pg.svg" alt="NPM version" /></a></span>
6
5
  <span class="badge-npmdownloads"><a href="https://npmjs.org/package/pg" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/pg.svg" alt="NPM downloads" /></a></span>
7
6
 
package/lib/client.js CHANGED
@@ -403,6 +403,9 @@ class Client extends EventEmitter {
403
403
  if (params.statement_timeout) {
404
404
  data.statement_timeout = String(parseInt(params.statement_timeout, 10))
405
405
  }
406
+ if (params.lock_timeout) {
407
+ data.lock_timeout = String(parseInt(params.lock_timeout, 10))
408
+ }
406
409
  if (params.idle_in_transaction_session_timeout) {
407
410
  data.idle_in_transaction_session_timeout = String(parseInt(params.idle_in_transaction_session_timeout, 10))
408
411
  }
@@ -103,6 +103,7 @@ class ConnectionParameters {
103
103
  this.application_name = val('application_name', config, 'PGAPPNAME')
104
104
  this.fallback_application_name = val('fallback_application_name', config, false)
105
105
  this.statement_timeout = val('statement_timeout', config, false)
106
+ this.lock_timeout = val('lock_timeout', config, false)
106
107
  this.idle_in_transaction_session_timeout = val('idle_in_transaction_session_timeout', config, false)
107
108
  this.query_timeout = val('query_timeout', config, false)
108
109
 
package/lib/defaults.js CHANGED
@@ -54,6 +54,10 @@ module.exports = {
54
54
  // false=unlimited
55
55
  statement_timeout: false,
56
56
 
57
+ // Abort any statement that waits longer than the specified duration in milliseconds while attempting to acquire a lock.
58
+ // false=unlimited
59
+ lock_timeout: false,
60
+
57
61
  // Terminate any session with an open transaction that has been idle for longer than the specified duration in milliseconds
58
62
  // false=unlimited
59
63
  idle_in_transaction_session_timeout: false,
package/lib/query.js CHANGED
@@ -135,7 +135,14 @@ class Query extends EventEmitter {
135
135
  return this.handleError(this._canceledDueToError, con)
136
136
  }
137
137
  if (this.callback) {
138
- this.callback(null, this._results)
138
+ try {
139
+ this.callback(null, this._results)
140
+ }
141
+ catch(err) {
142
+ process.nextTick(() => {
143
+ throw err
144
+ })
145
+ }
139
146
  }
140
147
  this.emit('end', this._results)
141
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg",
3
- "version": "8.7.3",
3
+ "version": "8.8.0",
4
4
  "description": "PostgreSQL client - pure javascript & libpq with the same API",
5
5
  "keywords": [
6
6
  "database",
@@ -23,19 +23,19 @@
23
23
  "buffer-writer": "2.0.0",
24
24
  "packet-reader": "1.0.0",
25
25
  "pg-connection-string": "^2.5.0",
26
- "pg-pool": "^3.5.1",
26
+ "pg-pool": "^3.5.2",
27
27
  "pg-protocol": "^1.5.0",
28
28
  "pg-types": "^2.1.0",
29
29
  "pgpass": "1.x"
30
30
  },
31
31
  "devDependencies": {
32
- "async": "0.9.0",
32
+ "async": "2.6.4",
33
33
  "bluebird": "3.5.2",
34
34
  "co": "4.6.0",
35
35
  "pg-copy-streams": "0.3.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "pg-native": ">=2.0.0"
38
+ "pg-native": ">=3.0.1"
39
39
  },
40
40
  "peerDependenciesMeta": {
41
41
  "pg-native": {
@@ -53,5 +53,5 @@
53
53
  "engines": {
54
54
  "node": ">= 8.0.0"
55
55
  },
56
- "gitHead": "4fa7ee891a456168a75695ac026792136f16577f"
56
+ "gitHead": "c99fb2c127ddf8d712500db2c7b9a5491a178655"
57
57
  }