Merge pull request #22 from steegi/enable_ioc_in_hook
Enable Inversion of Control in connector hooks
This commit is contained in:
commit
60f0dc2a0c
|
@ -405,7 +405,7 @@ SQLConnector.prototype.execute = function(sql, params, options, callback) {
|
||||||
options: options
|
options: options
|
||||||
};
|
};
|
||||||
this.notifyObserversAround('execute', context, function(context, done) {
|
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) {
|
if (!err && info != null) {
|
||||||
context.res = info;
|
context.res = info;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue