title | description |
---|---|
Data & Connections |
Learn how data consistency and connections work with Turso databases. |
Turso, an extension of libSQL (a SQLite fork), modifies the consistency model due to its network-accessible and replicated nature, deviating from SQLite's strictly serializable standard.
Database operations begin with a client establishing either an HTTP or websocket connection to a database. Following this, an internal SQLite database connection is set up within the server to facilitate the operations.
Database operations are tightly controlled to maintain order and data integrity.
- All operations are linearizable, maintaining an ordered history.
- Writes are fully serialized, with subsequent writes awaiting transaction completion.
- Users should exercise caution with long-running or abandoned transactions to prevent blocking other writes.
- Transactions in libSQL, encompassing both batch and interactive transactions, adhere to SQLite's transaction semantics.
- libSQL provides snapshot isolation for read operations, ensuring immediate visibility of writes within the same process. This guarantees serializability and isolation from other transactions.