不要怂,就是干,撸起袖子干!

Commit e0d62456 by Mick Hansen

Merge pull request #1722 from jseppi/patch-1

Use pgModule in require of ConnectionParmaters
2 parents 7b2a1370 4febe729
Showing with 2 additions and 2 deletions
var Query = require("./query") var Query = require("./query")
, Utils = require("../../utils") , Utils = require("../../utils")
, ConnectionParameters = require('pg/lib/connection-parameters')
module.exports = (function() { module.exports = (function() {
var ConnectorManager = function(sequelize, config) { var ConnectorManager = function(sequelize, config) {
...@@ -20,6 +19,7 @@ module.exports = (function() { ...@@ -20,6 +19,7 @@ module.exports = (function() {
this.pendingQueries = 0 this.pendingQueries = 0
this.clientDrained = true this.clientDrained = true
this.maxConcurrentQueries = (this.config.maxConcurrentQueries || 50) this.maxConcurrentQueries = (this.config.maxConcurrentQueries || 50)
this.ConnectionParameters = require(pgModule + '/lib/connection-parameters')
this.onProcessExit = function () { this.onProcessExit = function () {
this.disconnect() this.disconnect()
...@@ -83,7 +83,7 @@ module.exports = (function() { ...@@ -83,7 +83,7 @@ module.exports = (function() {
this.isConnected = false this.isConnected = false
var uri = this.sequelize.getQueryInterface().QueryGenerator.databaseConnectionUri(this.config) var uri = this.sequelize.getQueryInterface().QueryGenerator.databaseConnectionUri(this.config)
, config = new ConnectionParameters(uri) , config = new this.ConnectionParameters(uri)
// set pooling parameters if specified // set pooling parameters if specified
if (this.pooling) { if (this.pooling) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!