Comparing version 3.1.0 to 3.2.0
@@ -24,14 +24,18 @@ var EventEmitter = require('events').EventEmitter; | ||
var count = keys.length; | ||
keys.forEach(function(key) { | ||
var pool = self.pools.all[key]; | ||
delete self.pools.all[key]; | ||
pool.drain(function() { | ||
pool.destroyAllNow(function() { | ||
count--; | ||
if(count === 0) { | ||
self.emit('end'); | ||
} | ||
if(count === 0) { | ||
self.emit('end'); | ||
} else { | ||
keys.forEach(function(key) { | ||
var pool = self.pools.all[key]; | ||
delete self.pools.all[key]; | ||
pool.drain(function() { | ||
pool.destroyAllNow(function() { | ||
count--; | ||
if(count === 0) { | ||
self.emit('end'); | ||
} | ||
}); | ||
}); | ||
}); | ||
}); | ||
} | ||
}; | ||
@@ -38,0 +42,0 @@ |
@@ -20,6 +20,6 @@ var EventEmitter = require('events').EventEmitter; | ||
name: name, | ||
max: defaults.poolSize, | ||
idleTimeoutMillis: defaults.poolIdleTimeout, | ||
reapIntervalMillis: defaults.reapIntervalMillis, | ||
log: defaults.poolLog, | ||
max: clientConfig.poolSize || defaults.poolSize, | ||
idleTimeoutMillis: clientConfig.poolIdleTimeout || defaults.poolIdleTimeout, | ||
reapIntervalMillis: clientConfig.reapIntervalMillis || defaults.reapIntervalMillis, | ||
log: clientConfig.poolLog || defaults.poolLog, | ||
create: function(cb) { | ||
@@ -26,0 +26,0 @@ var client = new pools.Client(clientConfig); |
@@ -14,3 +14,4 @@ var types = require('pg-types'); | ||
this.RowCtor = null; | ||
if(rowMode == "array") { | ||
this.rowAsArray = rowMode == "array"; | ||
if(this.rowAsArray) { | ||
this.parseRow = this._parseRowAsArray; | ||
@@ -97,5 +98,7 @@ } | ||
} | ||
this.RowCtor = Function("parsers", "rowData", ctorBody); | ||
if(!this.rowAsArray) { | ||
this.RowCtor = Function("parsers", "rowData", ctorBody); | ||
} | ||
}; | ||
module.exports = Result; |
{ | ||
"name": "pg.js", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "node-postgres without the bindings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62494
1979