From 8762196028b640abe8e0f2e49e5c310de9e3fecf Mon Sep 17 00:00:00 2001 From: Frank Steegmans Date: Sun, 21 Jun 2015 17:54:21 +0200 Subject: [PATCH] Enable Inversion of Control in connector hooks through modifications of the context object. --- lib/sql.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sql.js b/lib/sql.js index a94b8e1..2da4127 100644 --- a/lib/sql.js +++ b/lib/sql.js @@ -405,7 +405,7 @@ SQLConnector.prototype.execute = function(sql, params, options, callback) { options: options }; this.notifyObserversAround('execute', context, function(context, done) { - self.executeSQL(sql, params, options, function(err, info) { + self.executeSQL(context.req.sql, context.req.params, context.options, function(err, info) { if (!err && info != null) { context.res = info; }