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 Jun 7, 2022
1 parent 1cd51ea commit 8b6656a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/statement.cc
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 8b6656a

Please sign in to comment.