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

Commit c7d40186 by Mick Hansen

Merge pull request #1548 from sequelize/feature/fix-location-of-connector-manager

Move connector-manager to the correct location
2 parents 911724dd e449fbb4
...@@ -112,7 +112,7 @@ module.exports = (function() { ...@@ -112,7 +112,7 @@ module.exports = (function() {
if (connection) { if (connection) {
connection.queryType = 'write' connection.queryType = 'write'
} }
done(err, connection) done(err, connection)
}, self.config.replication.write) }, self.config.replication.write)
}, },
...@@ -152,11 +152,11 @@ module.exports = (function() { ...@@ -152,11 +152,11 @@ module.exports = (function() {
return return
}.bind(this); }.bind(this);
process.on('exit', this.onProcessExit) process.on('exit', this.onProcessExit)
} }
Utils._.extend(ConnectorManager.prototype, require("../connector-manager").prototype) Utils._.extend(ConnectorManager.prototype, require("../abstract/connector-manager").prototype)
ConnectorManager.prototype.query = function(sql, callee, options) { ConnectorManager.prototype.query = function(sql, callee, options) {
if (!this.isConnected && !this.pool) { if (!this.isConnected && !this.pool) {
...@@ -287,7 +287,7 @@ module.exports = (function() { ...@@ -287,7 +287,7 @@ module.exports = (function() {
client client
.on('error', function (err) { .on('error', function (err) {
self.isConnecting = false self.isConnecting = false
done(err) done(err)
}) })
.on('connect', function () { .on('connect', function () {
......
...@@ -153,11 +153,11 @@ module.exports = (function() { ...@@ -153,11 +153,11 @@ module.exports = (function() {
return return
}.bind(this); }.bind(this);
process.on('exit', this.onProcessExit) process.on('exit', this.onProcessExit)
} }
Utils._.extend(ConnectorManager.prototype, require("../connector-manager").prototype); Utils._.extend(ConnectorManager.prototype, require("../abstract/connector-manager").prototype);
ConnectorManager.prototype.query = function(sql, callee, options) { ConnectorManager.prototype.query = function(sql, callee, options) {
if (this.useQueue) { if (this.useQueue) {
...@@ -185,7 +185,7 @@ module.exports = (function() { ...@@ -185,7 +185,7 @@ module.exports = (function() {
setTimeout(function() { setTimeout(function() {
if (self.pendingQueries === 0){ if (self.pendingQueries === 0){
self.disconnect.call(self); self.disconnect.call(self);
} }
}, 100); }, 100);
} }
} }
......
...@@ -27,7 +27,7 @@ module.exports = (function() { ...@@ -27,7 +27,7 @@ module.exports = (function() {
process.on('exit', this.onProcessExit) process.on('exit', this.onProcessExit)
} }
Utils._.extend(ConnectorManager.prototype, require("../connector-manager").prototype) Utils._.extend(ConnectorManager.prototype, require("../abstract/connector-manager").prototype)
ConnectorManager.prototype.endQuery = function() { ConnectorManager.prototype.endQuery = function() {
var self = this var self = this
......
...@@ -14,7 +14,7 @@ module.exports = (function() { ...@@ -14,7 +14,7 @@ module.exports = (function() {
} }
} }
Utils._.extend(ConnectorManager.prototype, require("../connector-manager").prototype) Utils._.extend(ConnectorManager.prototype, require("../abstract/connector-manager").prototype)
ConnectorManager.prototype.connect = function() { ConnectorManager.prototype.connect = function() {
var emitter = new (require('events').EventEmitter)() var emitter = new (require('events').EventEmitter)()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!