Skip to main content

Module capabilities

Module capabilities 

Source
Expand description

What running a SQLite statement may do (Capabilities), an upper bound: the tables it reads and writes as SQLite resolved them, through views too, and, from the database’s schema, the tables a foreign key’s action writes, the sqlite_sequence an AUTOINCREMENT table’s insert writes, and a trigger’s body, which the engine does not read and so may touch any table.

Constants§

SCHEMA_QUERY
One row ('trigger', table) for each trigger, ('autoincrement', table) for each table with an AUTOINCREMENT key, ('virtual', table, sql) for each virtual table, and ('key', child, parent, on update, on delete) for each foreign key.

Functions§

of_command
What a command (DDL, a PRAGMA, a transaction’s control) does, by its first keyword.
of_statement
What a statement may do as far as the statement alone says: the tables it reads, through views too, and writes, and the functions it calls. refine adds what the schema says.
refine
The statement’s capabilities, with what the database’s schema adds: a trigger on a table it writes runs code the engine does not read, and so does a virtual table of a module the application registers; a write to a built-in virtual table writes the tables that hold its index, which the statement does not name; a foreign key’s action writes the table that refers to it, and its check reads the other side; an AUTOINCREMENT table’s insert counts in sqlite_sequence.