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

Commit be208e8c by Nuno Sousa

Fix connection uuid on sql log

1 parent 532c05e5
......@@ -27,7 +27,7 @@ module.exports = (function() {
this.sql = sql;
if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql);
this.sequelize.log('Executing (' + this.client.uuid + '): ' + this.sql);
}
var resultSet = [],
......
......@@ -32,7 +32,7 @@ module.exports = (function() {
, rows = [];
if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql);
this.sequelize.log('Executing (' + this.client.uuid + '): ' + this.sql);
}
return new Promise(function(resolve, reject) {
......@@ -45,7 +45,7 @@ module.exports = (function() {
query.on('error', function(err) {
receivedError = true;
err.sql = sql;
promise.emit('sql', sql, self.options.uuid);
promise.emit('sql', sql, self.client.uuid);
reject(err);
});
......@@ -54,7 +54,7 @@ module.exports = (function() {
return;
}
promise.emit('sql', self.sql, self.options.uuid);
promise.emit('sql', self.sql, self.client.uuid);
resolve([rows, sql, result]);
});
}).spread(function(rows, sql, result) {
......
......@@ -30,7 +30,7 @@ module.exports = (function() {
this.sql = sql;
if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.options.uuid + '): ' + this.sql);
this.sequelize.log('Executing (' + this.database.uuid + '): ' + this.sql);
}
return new Utils.Promise(function(resolve) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!