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

Commit 897d2531 by Sascha Depold

made uuid printing more generic

1 parent 8b344597
...@@ -20,7 +20,7 @@ module.exports = (function() { ...@@ -20,7 +20,7 @@ module.exports = (function() {
this.sql = sql this.sql = sql
if (this.options.logging !== false) { if (this.options.logging !== false) {
this.options.logging('Executing: ' + this.sql) this.options.logging('Executing (' + this.options.uuid + '): ' + this.sql)
} }
var resultSet = [], var resultSet = [],
......
...@@ -27,7 +27,7 @@ module.exports = (function() { ...@@ -27,7 +27,7 @@ module.exports = (function() {
, rows = [] , rows = []
if (this.options.logging !== false) { if (this.options.logging !== false) {
this.options.logging('Executing: ' + this.sql) this.options.logging('Executing (' + this.options.uuid + '): ' + this.sql)
} }
query.on('row', function(row) { query.on('row', function(row) {
......
...@@ -26,7 +26,7 @@ module.exports = (function() { ...@@ -26,7 +26,7 @@ module.exports = (function() {
this.sql = sql this.sql = sql
if (this.options.logging !== false) { if (this.options.logging !== false) {
this.options.logging('Executing: ' + this.sql) this.options.logging('Executing (' + this.options.uuid + '): ' + this.sql)
} }
var columnTypes = {} var columnTypes = {}
......
...@@ -28,11 +28,12 @@ TransactionManager.prototype.getConnectorManager = function(uuid) { ...@@ -28,11 +28,12 @@ TransactionManager.prototype.getConnectorManager = function(uuid) {
} }
TransactionManager.prototype.query = function(sql, callee, options) { TransactionManager.prototype.query = function(sql, callee, options) {
var uuid = 'default' options = options || {}
options.uuid = 'default'
if (options && options.transaction) { if (options.transaction) {
uuid = options.transaction.id options.uuid = options.transaction.id
} }
return this.getConnectorManager(uuid).query(sql, callee, options) return this.getConnectorManager(options.uuid).query(sql, callee, options)
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!