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

Commit 2945ed03 by Mick Hansen

undo change

1 parent e44912e9
Showing with 5 additions and 1 deletions
...@@ -919,19 +919,23 @@ module.exports = (function() { ...@@ -919,19 +919,23 @@ module.exports = (function() {
emitter emitter
.query .query
.proxy(emitter)
.success(function(obj) { .success(function(obj) {
if (options.success) { if (options.success) {
options.success(obj) options.success(obj)
} }
this.emit(methodName, null) this.emit(methodName, null)
emitter.emit('success', obj)
}.bind(this)) }.bind(this))
.error(function(err) { .error(function(err) {
if (options.error) { if (options.error) {
options.error(err) options.error(err)
} }
this.emit(methodName, err) this.emit(methodName, err)
emitter.emit('error', err)
}.bind(this)) }.bind(this))
.on('sql', function(sql) {
emitter.emit('sql', sql)
})
}.bind(this) }.bind(this)
if (!!emitter) { if (!!emitter) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!