Skip to content

Commit

Permalink
Merge pull request sequelize#1722 from jseppi/patch-1
Browse files Browse the repository at this point in the history
Use pgModule in require of ConnectionParmaters
  • Loading branch information
mickhansen committed May 7, 2014
2 parents 7b2a137 + 4febe72 commit e0d6245
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dialects/postgres/connector-manager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var Query = require("./query")
, Utils = require("../../utils")
, ConnectionParameters = require('pg/lib/connection-parameters')

module.exports = (function() {
var ConnectorManager = function(sequelize, config) {
Expand All @@ -20,6 +19,7 @@ module.exports = (function() {
this.pendingQueries = 0
this.clientDrained = true
this.maxConcurrentQueries = (this.config.maxConcurrentQueries || 50)
this.ConnectionParameters = require(pgModule + '/lib/connection-parameters')

this.onProcessExit = function () {
this.disconnect()
Expand Down Expand Up @@ -83,7 +83,7 @@ module.exports = (function() {
this.isConnected = false

var uri = this.sequelize.getQueryInterface().QueryGenerator.databaseConnectionUri(this.config)
, config = new ConnectionParameters(uri)
, config = new this.ConnectionParameters(uri)

// set pooling parameters if specified
if (this.pooling) {
Expand Down

0 comments on commit e0d6245

Please sign in to comment.