Skip to content

Commit

Permalink
Give sync interval a default value when opening a sync connection to …
Browse files Browse the repository at this point in the history
…libsql
  • Loading branch information
ospfranco committed Oct 23, 2024
1 parent 10003f4 commit 26bffaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cpp/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ void install(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> invoker,
std::string url = options.getProperty(rt, "url").asString(rt).utf8(rt);
std::string auth_token =
options.getProperty(rt, "authToken").asString(rt).utf8(rt);
int sync_interval =
static_cast<int>(options.getProperty(rt, "syncInterval").asNumber());
int sync_interval = 0 if (options.hasProperty(rt, "syncInterval")) {

Check failure on line 134 in cpp/bindings.cpp

View workflow job for this annotation

GitHub Actions / test-ios-libsql

expected ';' at end of declaration
sync_interval =
static_cast<int>(options.getProperty(rt, "syncInterval").asNumber());
}
std::string location;

if (options.hasProperty(rt, "location")) {
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ type OPSQLiteProxy = {
authToken: string;
name: string;
location?: string;
syncInterval?: number;
}) => DB;
isSQLCipher: () => boolean;
isLibsql: () => boolean;
Expand Down

0 comments on commit 26bffaf

Please sign in to comment.