Skip to content

Commit 8b6656a

Browse files
committed
Allow eager start of the next queued query execution in Statement::All
1 parent 1cd51ea commit 8b6656a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/statement.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,10 @@ void Statement::Work_AfterAll(napi_env e, napi_status status, void* data) {
579579

580580
if (stmt->status != SQLITE_DONE) {
581581
Error(baton.get());
582+
STATEMENT_END();
582583
}
583584
else {
585+
STATEMENT_END();
584586
// Fire callbacks.
585587
Napi::Function cb = baton->callback.Value();
586588
if (!cb.IsUndefined() && cb.IsFunction()) {
@@ -607,8 +609,6 @@ void Statement::Work_AfterAll(napi_env e, napi_status status, void* data) {
607609
}
608610
}
609611
}
610-
611-
STATEMENT_END();
612612
}
613613

614614
Napi::Value Statement::Each(const Napi::CallbackInfo& info) {

0 commit comments

Comments
 (0)