mysql-robin
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -25,2 +25,3 @@ var Parser = require('./Parser'); | ||
this._handshakeSequence = null; | ||
this._querySequence = null; | ||
this._destroyed = false; | ||
@@ -41,3 +42,3 @@ this._queue = []; | ||
Protocol.prototype.query = function(options, cb) { | ||
return this._enqueue(new Sequences.Query(options, cb)); | ||
return this._querySequence = this._enqueue(new Sequences.Query(options, cb)); | ||
}; | ||
@@ -69,2 +70,3 @@ | ||
Protocol.prototype.pause = function() { | ||
this._querySequence.emit('pause'); | ||
this._parser.pause(); | ||
@@ -74,2 +76,3 @@ }; | ||
Protocol.prototype.resume = function() { | ||
this._querySequence.emit('resume'); | ||
this._parser.resume(); | ||
@@ -76,0 +79,0 @@ }; |
@@ -158,2 +158,11 @@ var Sequence = require('./Sequence'); | ||
}); | ||
self.on('pause', function () { | ||
stream.pause(); | ||
}); | ||
self.on('resume', function () { | ||
stream.resume(); | ||
}); | ||
stream.on('data', function (data) { | ||
@@ -165,3 +174,2 @@ self.emit('packet', new Packets.LocalDataFilePacket(data)); | ||
}); | ||
stream.on('error', function (err) { | ||
@@ -168,0 +176,0 @@ self._loadError = err; |
@@ -7,3 +7,3 @@ { | ||
"description": "A node.js driver for mysql. It is written in JavaScript, does not require compiling, and is 100% MIT licensed.", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"repository": { | ||
@@ -10,0 +10,0 @@ "url": "" |
183262
102
4455