From 8b6656a590c9da795300e69f2195878fca496ddf Mon Sep 17 00:00:00 2001 From: Alex Shumsky Date: Tue, 19 Oct 2021 13:02:37 +0300 Subject: [PATCH] Allow eager start of the next queued query execution in Statement::All --- src/statement.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/statement.cc b/src/statement.cc index 1981df954..e9de46d11 100644 --- a/src/statement.cc +++ b/src/statement.cc @@ -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()) { @@ -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) {