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

Commit 47efc3ab by Daniel Schwartz

adding protocol

1 parent be00bda0
......@@ -44,15 +44,18 @@ module.exports = (function() {
this.isConnecting = true
this.isConnected = false
var conStr = 'tcp://<%= user %>:<%= password %>@<%= host %>:<%= port %>/<%= database %>'
var conStr = '<%= protocol %>://<%= user %>:<%= password %>@<%= host %>:<%= port %>/<%= database %>'
conStr = Utils._.template(conStr)({
user: this.config.username,
password: this.config.password,
database: this.config.database,
host: this.config.host,
port: this.config.port
port: this.config.port,
protocol: this.config.protocol
})
console.log(conStr);
var pg = require("pg")
this.client = new pg.Client(conStr)
......
......@@ -15,6 +15,7 @@ module.exports = (function() {
dialect: 'mysql',
host: 'localhost',
port: 3306,
protocol: 'tcp',
define: {},
query: {},
sync: {},
......@@ -37,7 +38,8 @@ module.exports = (function() {
password: (( (["", null, false].indexOf(password) > -1) || (typeof password == 'undefined')) ? null : password),
host : this.options.host,
port : this.options.port,
pool : this.options.pool
pool : this.options.pool,
protocol: this.options.protocol
}
var ConnectorManager = require("./dialects/" + this.options.dialect + "/connector-manager")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!