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

Commit b095535e by Mick Hansen

Handle sql event aswell

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