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

Commit 495bcca5 by Sascha Depold

added option for disabling logging

1 parent 4e43ca2e
Showing with 3 additions and 1 deletions
require(__dirname + "/SequelizeHelper")
require(__dirname + "/SequelizeTable")
Sequelize = function(database, username, password) {
Sequelize = function(database, username, password, options) {
this.config = {
database: database,
username: username,
password: password
}
this.tables = {}
this.options = options || {}
}
var classMethods = {
......@@ -113,6 +114,7 @@ Sequelize.prototype = {
connection
.auth(this.config.database, this.config.username, this.config.password)
.addListener('authorized', function() {
if(!self.options.disableLogging)
SequelizeHelper.log("Executing the query: " + queryString)
connection
.execute(queryString)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!