Skip to Content

SQLite

Collection SQLITE and Delivery SQLITE_EXEC. Unlike the other three, there is no server: the connection is the path to a file.

Connection

There is no host, port or user — the connection is the path to the .db file as the CMS server sees it (inside a mounted volume, when running in a container). Access control is the filesystem’s, which is why this is the only one of the four types with no password field at all.

Options specific to this connection:

OptionWhat it does
Read-onlyOpens the database without write permission. A Delivery (or post-collection command) on this connection fails instead of writing — use it when another system owns the file
Create file if missingOff, a nonexistent path is an error. On, CMS creates the database — use it only when CMS owns the file
WAL modeOff by default. Allows readers concurrent with a writer. It is stored in the file itself and applies to every other process that opens it — including after you turn the option off here
Lock timeoutHow long an execution waits for the write lock before failing with database is locked

SQLite allows one writer at a time for the whole file (not per row or table). Frequent Collections and Deliveries on the same .db, or an external process writing alongside, compete for that lock — size the timeout accordingly and consider WAL. Avoid a .db on a network share (SMB/NFS): locking depends on guarantees those filesystems do not provide.

WAL is explicitly opt-in, not the default. It needs shared memory — a mapped -shm file — which network shares, some container filesystems and externally mounted volumes do not provide. Switched on over one of those, the database fails with a raw driver I/O error that helps nobody understand what happened. So the default is the traditional mode, and when that error does happen the CMS translates it, naming WAL as the suspect and where to turn it off.

Since every database is a file, commands that reach other files or the engine itself — ATTACH, VACUUM INTO, PRAGMA, load_extension — are blocked in the Collection and Delivery fields, along with the DDL/DCL already barred in the other dialects.

Vocabulary blocked in this dialect

On top of the DDL/DCL barred in every dialect, this one blocks:

ATTACH, DETACH, PRAGMA, VACUUM, REINDEX, LOAD_EXTENSION, READFILE, WRITEFILE

The full check — leading verb, chained statements and the neutralisation of comments and literals — is described in what CMS blocks in SQL fields.

The behaviour shared by all four databases — result modes, marking what has been read and placeholders — is described in Databases.