Skip to content

Commit 5420399

Browse files
committed
Fix libsql function
1 parent 023be23 commit 5420399

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

cpp/DBHostObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace react = facebook::react;
2020
void DBHostObject::flush_pending_reactive_queries(
2121
const std::shared_ptr<jsi::Value> &resolve) {
2222
invoker->invokeAsync(
23-
[this, resolve]() { resolve->asObject(rt).asFunction(rt).call(rt, {}); });
23+
[this, resolve](jsi::Runtime &rt) { resolve->asObject(rt).asFunction(rt).call(rt, {}); });
2424
}
2525
#else
2626
void DBHostObject::flush_pending_reactive_queries(

cpp/OPSqlite.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void install(jsi::Runtime &rt,
110110
});
111111

112112
#ifdef OP_SQLITE_USE_LIBSQL
113-
auto open_remote = HOST_STATIC_FN("openRemote") {
113+
auto open_remote = HFN(=) {
114114
jsi::Object options = args[0].asObject(rt);
115115

116116
std::string url = options.getProperty(rt, "url").asString(rt).utf8(rt);
@@ -124,7 +124,7 @@ void install(jsi::Runtime &rt,
124124
return jsi::Object::createFromHostObject(rt, db);
125125
});
126126

127-
auto open_sync = HOST_STATIC_FN("openSync") {
127+
auto open_sync = HFN(=) {
128128
jsi::Object options = args[0].asObject(rt);
129129
std::string name = options.getProperty(rt, "name").asString(rt).utf8(rt);
130130
std::string path = std::string(_base_path);
@@ -162,7 +162,7 @@ void install(jsi::Runtime &rt,
162162
if (!location.empty()) {
163163
if (location == ":memory:") {
164164
path = ":memory:";
165-
} else if (location.rfind("/", 0) == 0) {
165+
} else if (location.rfind('/', 0) == 0) {
166166
path = location;
167167
} else {
168168
path = path + "/" + location;

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
},
4747
"op-sqlite": {
4848
"libsql": false,
49-
"sqlcipher": true,
50-
"iosSqlite": false,
49+
"sqlcipher": false,
50+
"iosSqlite": true,
5151
"fts5": true,
5252
"rtree": true,
5353
"crsqlite": false,

0 commit comments

Comments
 (0)