Skip to main content

Module database

Module database 

Source
Expand description

Connections to the application’s Turso Cloud database.

Only libSQL’s remote client is compiled (HTTP, pure Rust): there is no database engine in the application. Configure it with TURSO_DATABASE_URL (e.g. libsql://shop-acme.turso.io) and TURSO_AUTH_TOKEN.

Structs§

Database
A shareable handle to the database. Cheap to clone.
DatabaseConfig
Where to connect: a database URL and its auth token.

Constants§

SETUP_HINT
How to get a database URL and token, shown when they are missing.
TOKEN_ENV
Environment variable holding the database auth token.
URL_ENV
Environment variable holding the database URL.