Expand description
SQLite databases, read only.
A database is a file of tables: one with a single table opens it; several make a
home place listing tables by path inside the file (app.db/users); --table
picks by name. Tables are read in place (open_table): windows by the table’s
key (so the last page costs what the first does), sidebar filters and sort run as
WHERE/ORDER BY (see crate::formats::pushdown), counts via count(*), whole-view
reads in batches; nothing is copied to disk.
Nothing is written: read only, query_only, defensive mode, untrusted schema, no
extension loading, no triggers. A WAL database with -wal is read through it
(SQLite may create -shm); one without is read immutable=1. A database needing a
write to read (a hot journal, or -wal without -shm in a read-only directory) is
refused rather than misread.
Structs§
- Hold
- Held by a dataset read in place: dropped, whatever SQLite is running for it stops.
- Opened
- A table opened in place, as the dataset takes it.
- Table
- One table of a database, as its schema describes it.
Enums§
- Affinity
- How SQLite reads a declared type: the affinity rules of its documentation, in
order, so
VARCHAR(10)is text andPOINT(holding “INT”) an integer. - Pick
- What opening a database without
--tablefinds: its one table of its own, or the names of several, which the home screen lists.
Constants§
- MAGIC
- The first sixteen bytes of every SQLite 3 database.
- SCAN_
NAME - The name a SQLite scan carries in a plan.
Functions§
- detail
- The Info panel’s SQLite tab for
path’s listedtables: page size, versions, and each table’s kind, columns andANALYZErow estimate. Reads no table (counting all would scan the database). - looks_
like - Whether
head, the first bytes of a file, begins a SQLite database. - open_
table - Open
tableof databasefile(shown asdisplay) in place: its frame, the pushdown for filters and sort, and the hold that stops its statements when released.othersare the other tables, for Info. - pick
- The table
wantednames amongtables, or the database’s one table of its own when nothing is named.displaynames the database in errors. - schema_
preview - The columns
tableopens with, read from its first rows the way the open decides them, for the home screen’s preview. Gives up after a moment. - tables
- The tables and views of the database at
path, SQLite’s own included, in the order they were created; the schema table last.