Docs / SQLite

← Databases

SQLite

SQLite runs inside the app (rusqlite with SQLite built in): no server, no host, no user, no password, nothing to download.

Connect

Choose SQLite and give the path of the file, or paste a URL:

You pasteMeaning
sqlite:///home/ana/app.dbthe file /home/ana/app.db
sqlite:///C:/data/app.dba file on a Windows drive
sqlite:///:memory:an in-memory database
file:app.db?mode=ro in the path fielda SQLite URI, passed to SQLite as written

The file is created when it does not exist but its folder does, as an empty database. A missing folder is an error (more likely a typo or a drive not mounted), and so is a relative path that does not exist: give the full path. A file that is not a SQLite database is refused when you connect.

A read-only connection (and a read-only agent) opens the file read-only, so SQLite itself refuses a write. SSL, SSH and proxy settings do not apply to an embedded database.

Privileges

The operating system's: the app needs to read the file, and to write it and its folder (for the journal) to change anything. A busy file is waited for before an error.

What works

Agents

Read-only agents and read-only connections open the file read-only, and run their queries with query_only. estimate_change has no row estimate to give on SQLite. See Agents and the CLI.

Known limits

Tested on

The conformance suite runs on the SQLite built into the app, including transactions, plans, table editing, the rebuild that keeps AUTOINCREMENT, and files opened read-only.

See also: Connecting, Troubleshooting.