tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
9.54k stars 252 forks source link

Feature Request: Expose `sync_interval` parameter in libsql's C bindings #1561

Closed theorib closed 2 months ago

theorib commented 2 months ago

Currently, there is no exposed sync_interval parameter in libsql's C bindings, which limits the flexibility of custom implementations built from source when using libsql's embedded replicas.

It would be beneficial to expose a sync_interval parameter in the C bindings, similar to how it's implemented in the TypeScript/JavaScript client API for libSQL. This would allow C implementations to configure automatic periodic sync.

For reference, the TypeScript/JavaScript client API for libSQL allows setting a sync interval like so:

const client = createClient({
  url: 'file:path/to/db-file.db',
  authToken: '...',
  syncUrl: '...',
  syncInterval: 60,
});