tursodatabase / libsql

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

Improve database connection builder API? #1635

Open penberg opened 1 month ago

penberg commented 1 month ago

The new_remote_replica() and new_local_replica() names are weird because in both cases the replica is local. The difference is just with how they are synced.

My proposal is to keep new_local() and new_remote() but add additional with_remote_sync() and with_file_sync() methods to the builder for local database variant.

LucioFranco commented 1 month ago

I think that makes a lot of sense, lets line this up for the next breaking release.