Sirannon documentation

Sirannon is an open source library that puts real SQLite on every runtime, with replication, failover, offline device sync, change data capture, and a database for every user and every AI agent.

Getting started

2 guides

Core features

11 guides

Queries and transactions17 min readExecute parameterised SQL, read columns that share a name, commit related writes together, and copy the write-ahead log into the database file.Bulk load6 min readImport rows in one transaction, choose the import's durability, and handle a failure to restore the configured writer settings.Change data capture7 min readSubscribe to committed row changes, filter by row membership, capture changes through migrations, and handle replacement writes and schema changes.Live queries6 min readMaintain a query result from committed changes and receive updates locally, over WebSocket, or through React hooks.Migrations12 min readApply versioned schema changes, copy a table that foreign keys refer to, verify the SQL, and share a migration set across databases and devices.SQLite extensions3 min readLoad a trusted compiled extension into a database's current and later connections.Hooks, metrics, and lifecycle5 min readGuard statements with query hooks, collect statement metrics, and open tenant databases through a restricted resolver.Usage metering5 min readMeasure the rows that SQLite reads and writes for each tenant, including failed statements and live-query reads.Execution time limits8 min readStop a statement that takes too long, roll back its transaction, and recognise each refusal of a time limit.Integer fidelity4 min readPreserve SQLite integers outside JavaScript's safe number range and account for Expo's numeric limits.Writer worker6 min readMove SQLite writes to a worker thread and distinguish a rejected write from an uncertain outcome.

Backups

5 guides

Networked access

11 guides

Server18 min readServe registered database operations over HTTP and WebSocket with authentication, request limits, column reads, checkpoints, and graceful shutdown.Registered operations7 min readDefine server-side SQL, derive ownership arguments from authentication, and call reads and writes through typed references.Shared operations4 min readServe one operation set across tenant databases while authorising each database before automatic opening.Code generation5 min readGenerate typed operation references and a registry digest from the same definitions that the server serves.Client SDK10 min readCall registered reads and writes, maintain live results, read column details, and recover WebSocket subscriptions after a disconnect.Python client13 min readCall registered reads and writes from Python, keep a query result current, read column details, and route calls across a replication group.Go client16 min readCall registered reads and writes from Go, keep a query result current, read column details, and route calls across a replication group.Value encoding over JSON6 min readPreserve large integers and binary columns over HTTP and WebSocket, with SDK, Python, and Go decoding examples.Subscription resumption7 min readResume retained changes with a sequence and epoch, and reload application state when replay is unavailable.Device sync13 min readKeep a local database usable offline and synchronise its writes with an authenticated server.Device sync recovery7 min readLoad a first snapshot, recover an expired cursor, and keep device schemas compatible with the server.

AI agents

9 guides

Distributed

3 guides

Operations

5 guides