libSQL PHP Reference
use Libsql\Database
to access the Database
object.
url
and authToken
.
path
, url
and authToken
.
Embedded replicas can sync from the remote URL and delegate writes to the
remote primary database:
sync_interval
function allows you to set an interval for automatic synchronization of the database in the background:
sync
function allows you to sync manually the local database with the
remote counterpart:
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
:
query()
to invoke a
SQL statement, as well as optional arguments:
prepare()
, bind parameters, and then
query it: