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

Commit 7199ff80 by Daniel Durante

Default ports are now declared in the ConnectorManager.

1 parent 6a36ca11
......@@ -12,6 +12,7 @@ module.exports = (function() {
this.sequelize = sequelize
this.client = null
this.config = config || {}
this.config.port = this.config.port || 3306
this.disconnectTimeoutId = null
this.queue = []
this.activeQueue = []
......
......@@ -4,10 +4,11 @@ var Query = require("./query")
module.exports = (function() {
var ConnectorManager = function(sequelize, config) {
this.sequelize = sequelize
this.client = null
this.config = config || {}
this.pooling = (!!this.config.poolCfg && (this.config.poolCfg.maxConnections > 0))
this.pg = this.config.native ? require('pg').native : require('pg')
this.client = null
this.config = config || {}
this.config.port = this.config.port || 5432
this.pooling = (!!this.config.poolCfg && (this.config.poolCfg.maxConnections > 0))
this.pg = this.config.native ? require('pg').native : require('pg')
// set pooling parameters if specified
if (this.pooling) {
......
......@@ -69,7 +69,6 @@ module.exports = (function() {
this.options = Utils._.extend({
dialect: 'mysql',
host: 'localhost',
port: 3306,
protocol: 'tcp',
define: {},
query: {},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!