diff --git a/cpp/DBHostObject.cpp b/cpp/DBHostObject.cpp index 8b3174aa..c2772b58 100644 --- a/cpp/DBHostObject.cpp +++ b/cpp/DBHostObject.cpp @@ -111,41 +111,6 @@ void DBHostObject::auto_register_update_hook() { if (shouldFire) { pending_reactive_queries.insert(query_ptr); } - - // if (!shouldFire) { - // continue; - // } - // - // std::vector results; - // std::shared_ptr> metadata = - // std::make_shared>(); - // - // auto status = opsqlite_execute_prepared_statement(db_name, - // query->stmt, - // &results, - // metadata); - // - // if (status.type == SQLiteError) { - // invoker->invokeAsync( - // [this, callback = query->callback, status = - // std::move(status)] { - // auto errorCtr = rt.global().getPropertyAsFunction(rt, - // "Error"); auto error = errorCtr.callAsConstructor( - // rt, jsi::String::createFromUtf8(rt, status.message)); - // callback->asObject(rt).asFunction(rt).call(rt, error); - // }); - // } else { - // invoker->invokeAsync( - // [this, - // results = - // std::make_shared>(results), - // callback = query->callback, metadata, status = - // std::move(status)] { - // auto jsiResult = - // createResult(rt, status, results.get(), metadata); - // callback->asObject(rt).asFunction(rt).call(rt, jsiResult); - // }); - // } } }; @@ -159,7 +124,7 @@ DBHostObject::DBHostObject(jsi::Runtime &rt, std::string &url, std::string &auth_token, std::shared_ptr invoker, std::shared_ptr thread_pool) - : db_name(url), invoker(js_call_invoker), thread_pool(thread_pool), rt(rt) { + : db_name(url), invoker(invoker), thread_pool(thread_pool), rt(rt) { BridgeResult result = opsqlite_libsql_open_remote(url, auth_token); if (result.type == SQLiteError) {