@@ -142,24 +142,21 @@ void DBHostObject::auto_register_update_hook() {
142142#ifdef OP_SQLITE_USE_LIBSQL
143143// Remote connection constructor
144144DBHostObject::DBHostObject (jsi::Runtime &rt, std::string &url,
145- std::string &auth_token,
146- std::shared_ptr<react::CallInvoker> invoker)
147- : db_name(url), invoker(std::move(invoker)), rt(rt) {
145+ std::string &auth_token)
146+ : db_name(url), rt(rt) {
148147 _thread_pool = std::make_shared<ThreadPool>();
149148 db = opsqlite_libsql_open_remote (url, auth_token);
150149
151150 create_jsi_functions ();
152151}
153152
154153// Sync connection constructor
155- DBHostObject::DBHostObject (jsi::Runtime &rt,
156- std::shared_ptr<react::CallInvoker> invoker,
157- std::string &db_name, std::string &path,
158- std::string &url, std::string &auth_token,
159- int sync_interval, bool offline,
160- std::string &encryption_key,
154+ DBHostObject::DBHostObject (jsi::Runtime &rt, std::string &db_name,
155+ std::string &path, std::string &url,
156+ std::string &auth_token, int sync_interval,
157+ bool offline, std::string &encryption_key,
161158 std::string &remote_encryption_key)
162- : db_name(db_name), invoker(std::move(invoker)), rt(rt) {
159+ : db_name(db_name), rt(rt) {
163160
164161 _thread_pool = std::make_shared<ThreadPool>();
165162
@@ -173,13 +170,11 @@ DBHostObject::DBHostObject(jsi::Runtime &rt,
173170#endif
174171
175172DBHostObject::DBHostObject (jsi::Runtime &rt, std::string &base_path,
176- std::shared_ptr<react::CallInvoker> invoker,
177173 std::string &db_name, std::string &path,
178174 std::string &crsqlite_path,
179175 std::string &sqlite_vec_path,
180176 std::string &encryption_key)
181- : base_path(base_path), invoker(std::move(invoker)), db_name(db_name),
182- rt (rt) {
177+ : base_path(base_path), db_name(db_name), rt(rt) {
183178 _thread_pool = std::make_shared<ThreadPool>();
184179
185180#ifdef OP_SQLITE_USE_SQLCIPHER
@@ -617,13 +612,12 @@ void DBHostObject::create_jsi_functions() {
617612 return jsi::String::createFromUtf8 (rt, result);
618613 });
619614
620- function_map[" flushPendingReactiveQueries" ] =
621- HOSTFN (" flushPendingReactiveQueries" ) {
615+ function_map[" flushPendingReactiveQueries" ] = HFN (this ) {
622616 auto promiseCtr = rt.global ().getPropertyAsFunction (rt, " Promise" );
623- auto promise = promiseCtr.callAsConstructor (rt, HOSTFN ( " executor " ) {
617+ auto promise = promiseCtr.callAsConstructor (rt, HFN ( this ) {
624618 auto resolve = std::make_shared<jsi::Value>(rt, args[0 ]);
625619
626- auto task = [&rt, this , resolve]() {
620+ auto task = [this , resolve]() {
627621 flush_pending_reactive_queries (resolve);
628622 };
629623
0 commit comments