node-postgres/lib/pool-factory.js
Brian C aeb0c759f5 Remove fallbacks for unsupported Node versions (#1304) (#1313)
* Add client connectionString tests (#1310)

* Remove redundant tests

* Add client connectionString test

Add test to ensure { connectionString } is respected as an argument to the client constructor

* Add test for connection string property

Also fixed some legacy require statements.

* Normalize native error properties

Map native error properties to the same property names we use for errors from the JS driver.

Fixes #972
Fixes #938
2017-06-08 21:53:47 -05:00

18 lines
369 B
JavaScript

var Client = require('./client');
var util = require('util');
var Pool = require('pg-pool');
module.exports = function(Client) {
var BoundPool = function(options) {
var config = { Client: Client };
for (var key in options) {
config[key] = options[key];
}
Pool.call(this, config);
};
util.inherits(BoundPool, Pool);
return BoundPool;
};