sql.sqlite
import sql.sqlite
sqldoes not re-export this module, so it is reached only by importing it directly.
The SQLite adapter.
SQLite is a database that is a file. There is no server to run, no port to open and no user to create, which is what makes it the right choice for an application that ships with its data, a test suite that wants a real database per run, and anything that would otherwise have invented a file format of its own.
Reach it through sql, which is what makes the same program work
against another engine later:
import sql
var db = sql.open('sqlite://./app.db')
The module underneath is here for the parts of SQLite that have no equivalent anywhere else: incremental blob access, online backup, functions and collations written in Zuri, and the hooks that report what the engine is doing.
Submodules
| Module | Reached as | Summary |
|---|---|---|
sql.sqlite.backup | sql.sqlite.backup.* | Copying a live SQLite database without stopping it. |
sql.sqlite.blob | sql.sqlite.blob.* | Reading and writing a single blob-valued cell a piece at a time. |
sql.sqlite.connection | sql.sqlite.connection.* | A SQLite connection, as the layer above the adapters sees one. |
sql.sqlite.cursor | sql.sqlite.cursor.* | Reading a SQLite result one row at a time. |
sql.sqlite.driver | sql.sqlite.driver.* | Opening SQLite databases: reading a connection string, choosing the open flags, and putting a new connection… |
sql.sqlite.errors | sql.sqlite.errors.* | Turning SQLite’s result codes into the shared error classes. |
sql.sqlite.schema | import sql.sqlite.schema | Introspection for SQLite, which answers through pragmas rather than through catalogue tables. |
sql.sqlite.statement | sql.sqlite.statement.* | A SQLite statement compiled once and run many times. |
sql.sqlite.types | sql.sqlite.types.* | Reading SQLite values back as the types a column was declared to hold. |
Constants
DRIVER
sql.sqlite.DRIVER
The driver instance sql registers for this engine.
A driver holds no state of its own, so one serves every connection.
Functions
connect()
sql.sqlite.connect(dsn) -> SqliteConnection
Opens a SQLite database directly, without going through sql.
Useful when a program has settled on SQLite and wants the adapter’s own
extras without the indirection. Anything meant to stay portable should
use sql.open() instead.
Parameters
dsn(string|dict) — A path, asqlite:string, or options.
Returns SqliteConnection
2026, Richard Ore and Zuri contributors