Skip to content

Commit

Permalink
Allow eager start of the next queued query execution in Statement::All
Browse files Browse the repository at this point in the history
  • Loading branch information
alex3d committed Oct 19, 2021
1 parent 918052b commit 1d767d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,10 @@ void Statement::Work_AfterAll(napi_env e, napi_status status, void* data) {

if (stmt->status != SQLITE_DONE) {
Error(baton.get());
STATEMENT_END();
}
else {
STATEMENT_END();
// Fire callbacks.
Napi::Function cb = baton->callback.Value();
if (!cb.IsUndefined() && cb.IsFunction()) {
Expand All @@ -607,8 +609,6 @@ void Statement::Work_AfterAll(napi_env e, napi_status status, void* data) {
}
}
}

STATEMENT_END();
}

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

0 comments on commit 1d767d4

Please sign in to comment.