Closed theorib closed 4 months ago
I don't see any way to pass a sync interval in the C headers so I don't think it is possible. However I just opened a PR that enables the sync
call so you can replicate a sync interval in pure JS easily.
Released in version 6.2.11
It looks like the latest commit on libsql's repo exposes the sync_interval
property on the C Bindings via libsql_open_sync_with_config
.
Released in 7.0.1
Describe the bug: When using op-sqlite with libsql (and Turso), the
openSync
method does not sync the Embedded Replica (local database) with the remote database. This renders the embedded replica unusable.A few more things affect the implementation and usage of
openSync
to effectively use embedded replicas with op-sqlite:sync()
method to manually sync the embedded replica with the remote database.openSync
, there is no way to set thesyncInterval
to automatically sync data to your embedded replica using libsql's the periodic sync feature.I would happily open a PR but I'm not versed in C++ , I'm more than happy to help debug and test.
Versions:
Reproducible example Clone the GitHub repo and follow the instructions outlined on the
README.md
file to get the a sample database running with Turso: https://github.com/theorib/op-sqlite-turso-expo-react-native.git