8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3430c51 commit a93ef9dCopy full SHA for a93ef9d
lib/protocol/Protocol.js
@@ -336,6 +336,14 @@ Protocol.prototype._dequeue = function(sequence) {
336
return;
337
}
338
339
+ if (sequence !== this._queue[0]) {
340
+ var idx = this._queue.indexOf(sequence);
341
+ if (idx > 0) {
342
+ this._queue.splice(idx, 1)
343
+ }
344
+ return;
345
346
+
347
this._queue.shift();
348
349
var sequence = this._queue[0];
lib/protocol/sequences/Query.js
@@ -24,12 +24,29 @@ function Query(options, callback) {
24
this._fields = [];
25
this._index = 0;
26
this._loadError = null;
27
+ this._started = false;
28
29
30
Query.prototype.start = function() {
31
+ this._started = true;
32
this.emit('packet', new Packets.ComQueryPacket(this.sql));
33
};
34
35
+Query.prototype.started = function() {
36
+ return this._started;
37
+}
38
39
+Query.prototype.ended = function() {
40
+ return this._ended;
41
42
43
+Query.prototype.dequeue = function() {
44
+ if (this._started) {
45
+ throw new Error('Query already started.');
46
47
+ this.end()
48
49
50
Query.prototype.determinePacket = function determinePacket(byte, parser) {
51
var resultSet = this._resultSet;
52