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

Commit 6fccaa8d by Mick Hansen

log 'default' if no transaction

1 parent 0b4eaeae
...@@ -27,7 +27,7 @@ module.exports = (function() { ...@@ -27,7 +27,7 @@ module.exports = (function() {
this.sql = sql; this.sql = sql;
if (this.options.logging !== false) { if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.connection.uuid + '): ' + this.sql); this.sequelize.log('Executing (' + (this.connection.uuid || 'default') + '): ' + this.sql);
} }
var promise = new Utils.Promise(function(resolve, reject) { var promise = new Utils.Promise(function(resolve, reject) {
......
...@@ -48,7 +48,7 @@ module.exports = (function() { ...@@ -48,7 +48,7 @@ module.exports = (function() {
, rows = []; , rows = [];
if (this.options.logging !== false) { if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.client.uuid + '): ' + this.sql); this.sequelize.log('Executing (' + (this.client.uuid || 'default') + '): ' + this.sql);
} }
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
......
...@@ -31,7 +31,7 @@ module.exports = (function() { ...@@ -31,7 +31,7 @@ module.exports = (function() {
this.sql = sql; this.sql = sql;
if (this.options.logging !== false) { if (this.options.logging !== false) {
this.sequelize.log('Executing (' + this.database.uuid + '): ' + this.sql); this.sequelize.log('Executing (' + (this.database.uuid || 'default') + '): ' + this.sql);
} }
return new Utils.Promise(function(resolve) { 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!