Documentation
¶
Overview ¶
Package libsql implements a store provider backed by libSQL — the SQLite-compatible engine behind Turso. The wire SQL dialect matches SQLite, so this provider reuses the SQLite schema and repository implementations: only the registration, DSN passthrough, and database/sql driver name change.
Two deployment shapes are supported:
Remote (Turso, custom libSQL servers): libsql://my-db.turso.io?authToken=eyJ...
Local file (libSQL embedded; behaves like SQLite for compatibility tests and offline-first deployments): libsql:///absolute/path/to/local.db
The pure-Go libsql-client-go driver keeps CGO_ENABLED=0 — Chronos's pinned default. Operators who want an embedded libSQL build with CGO can blank-import a different driver in their fork; this provider does not depend on CGO.
Per Mnemos ADR 0001 §3, every provider exposes a `?namespace=` query param. libSQL has no per-tenant schema concept and each remote database already represents a tenant boundary, so namespace is validated (so typos surface) and otherwise ignored — matching Mnemos's libsql posture for the same reason.