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

Commit a5853524 by Sascha Depold

you can now use non default port and host

1 parent 1f20a846
Showing with 6 additions and 3 deletions
var Sequelize = function(database, username, password, options) { var Sequelize = function(database, username, password, options) {
options = options || {}
this.config = { this.config = {
database: database, database: database,
username: username, username: username,
password: password password: password,
host : options.host || 'localhost',
port : options.port || 3306
} }
this.tables = {} this.tables = {}
this.options = options || {} this.options = options
} }
var classMethods = { var classMethods = {
...@@ -154,7 +157,7 @@ Sequelize.prototype = { ...@@ -154,7 +157,7 @@ Sequelize.prototype = {
var fields = [], var fields = [],
values = [], values = [],
self = this, self = this,
connection = require(__dirname + "/../nodejs-mysql-native/client").createTCPClient() connection = require(__dirname + "/../nodejs-mysql-native/index").createTCPClient(this.options.host, this.options.port)
connection.auto_prepare = true connection.auto_prepare = true
connection connection
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!