Skip to content

Commit

Permalink
Fix libsql compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Oct 15, 2024
1 parent f366161 commit e556bf2
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions cpp/DBHostObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,41 +111,6 @@ void DBHostObject::auto_register_update_hook() {
if (shouldFire) {
pending_reactive_queries.insert(query_ptr);
}

// if (!shouldFire) {
// continue;
// }
//
// std::vector<DumbHostObject> results;
// std::shared_ptr<std::vector<SmartHostObject>> metadata =
// std::make_shared<std::vector<SmartHostObject>>();
//
// 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<std::vector<DumbHostObject>>(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);
// });
// }
}
};

Expand All @@ -159,7 +124,7 @@ DBHostObject::DBHostObject(jsi::Runtime &rt, std::string &url,
std::string &auth_token,
std::shared_ptr<react::CallInvoker> invoker,
std::shared_ptr<ThreadPool> 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) {
Expand Down

0 comments on commit e556bf2

Please sign in to comment.