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

Commit b095535e by Mick Hansen

Handle sql event aswell

1 parent 55e21437
Showing with 4 additions and 5 deletions
...@@ -41,12 +41,11 @@ module.exports = (function() { ...@@ -41,12 +41,11 @@ module.exports = (function() {
} }
CustomEventEmitter.prototype.proxy = function(emitter) { CustomEventEmitter.prototype.proxy = function(emitter) {
this.on('error', function (err) { ['success', 'error', 'sql'].each(function (eventKey) {
emitter.emit('error', err) this.on(eventKey, function (result) {
}) emitter.emit(eventKey, result)
this.on('success', function (result) {
emitter.emit('success', result)
}) })
}.bind(this))
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!