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

Commit 4b217374 by Sascha Depold

Recovered previously implemented behavior

1 parent 28e9bc36
...@@ -19,7 +19,9 @@ module.exports = (function() { ...@@ -19,7 +19,9 @@ module.exports = (function() {
Query.prototype.run = function(sql) { Query.prototype.run = function(sql) {
this.sql = sql this.sql = sql
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql) if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql)
}
var resultSet = [], var resultSet = [],
errorDetected = false, errorDetected = false,
......
...@@ -19,7 +19,9 @@ module.exports = (function() { ...@@ -19,7 +19,9 @@ module.exports = (function() {
Query.prototype.run = function(sql) { Query.prototype.run = function(sql) {
this.sql = sql this.sql = sql
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql) if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql)
}
this.client.query(this.sql, function(err, results, fields) { this.client.query(this.sql, function(err, results, fields) {
this.emit('sql', this.sql) this.emit('sql', this.sql)
......
...@@ -27,7 +27,9 @@ module.exports = (function() { ...@@ -27,7 +27,9 @@ module.exports = (function() {
, query = this.client.query(sql) , query = this.client.query(sql)
, rows = [] , rows = []
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql) if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql)
}
query.on('row', function(row) { query.on('row', function(row) {
rows.push(row) rows.push(row)
......
...@@ -26,7 +26,9 @@ module.exports = (function() { ...@@ -26,7 +26,9 @@ module.exports = (function() {
this.sql = sql this.sql = sql
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql) if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql)
}
var columnTypes = {} var columnTypes = {}
this.database.serialize(function() { this.database.serialize(function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!