libSQL Swift Reference
libsql
as a package dependency in XCode using this repo:
sync
function allows you to sync manually the local database with the remote counterpart:
syncInterval
parameter allows you to set an interval for automatic
synchronization of the database in the background:
readYourWrites
parameter configures the database connection to ensure
that writes are immediately visible to subsequent read operations initiated by
the same connection. This is enabled by default, and is particularly
important in distributed systems to ensure consistency from the perspective of
the writing process.
You can disable this behavior by passing false
to the function:
query()
to invoke a SQL statement, as well as
optional arguments:
prepare()
and then execute it with
query()
: