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

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) {
options = options || {}
this.config = {
database: database,
username: username,
password: password
password: password,
host : options.host || 'localhost',
port : options.port || 3306
}
this.tables = {}
this.options = options || {}
this.options = options
}
var classMethods = {
......@@ -154,7 +157,7 @@ Sequelize.prototype = {
var fields = [],
values = [],
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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!