Commit 7b1623f3 by Orlando Vazquez

finalize statement before starting next query

parent 6160c3c1
...@@ -88,11 +88,14 @@ Database.prototype.executeQuery = function(sql, bindings, queryCallback) { ...@@ -88,11 +88,14 @@ Database.prototype.executeQuery = function(sql, bindings, queryCallback) {
statement.finalize(function () { statement.finalize(function () {
self.db.prepare(statement.tail, onPrepare); self.db.prepare(statement.tail, onPrepare);
}); });
return;
} }
// if there are any queries queued, let them know it's safe to go statement.finalize(function () {
self.db.emit("ready"); // if there are any queries queued, let them know it's safe to go
queryCallback(undefined, rows); self.db.emit("ready");
queryCallback(undefined, rows);
});
} }
function doStep(statement) { function doStep(statement) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment