mirror of
https://github.com/knex/knex.git
synced 2025-12-29 07:59:31 +00:00
Merge pull request #390 from bhirt-bpl/master
fix for using a pgConnectionString
This commit is contained in:
commit
1bdf35cafa
@ -102,6 +102,14 @@ Client_PG.prototype.prepBindings = function(bindings, tz) {
|
||||
Client_PG.prototype.acquireRawConnection = Promise.method(function(callback) {
|
||||
var connection = new pg.Client(this.connectionSettings);
|
||||
var client = this;
|
||||
|
||||
this.connectionSettings = {
|
||||
user : connection.connectionParameters.user,
|
||||
database : connection.connectionParameters.database,
|
||||
port : connection.connectionParameters.port,
|
||||
host : connection.connectionParameters.host,
|
||||
};
|
||||
|
||||
return new Promise(function(resolver, rejecter) {
|
||||
connection.connect(function(err, connection) {
|
||||
if (err) return rejecter(err);
|
||||
@ -142,4 +150,4 @@ Client_PG.prototype.positionBindings = function(sql) {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = Client_PG;
|
||||
module.exports = Client_PG;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user