Skip to main content

Module directive

Module directive 

Source
Expand description

Statements the session carries out itself rather than compiling.

Invariant: a directive is a decision, already resolved, with nothing left to look up. Binding a DROP TABLE resolves the name and refuses a missing one here; what reaches the session is “free this root page and remove this sqlite_schema row”, not a name it has to resolve again.

Transaction control and DDL are here rather than in the bytecode for a reason the TDD’s own DDL protocol describes: their steps are catalog publication, cookie invalidation and lock transitions, none of which the machine’s register-and-cursor model expresses. They still run inside the same transaction machinery as DML - the statement savepoint, the journal and the commit are identical - which is what the protocol actually requires. The row-touching part of DDL is ordinary storage work and goes through the same pager as everything else.

Structs§

AddedColumnRisk
What an added column would do to rows that already exist.
CreateIndexSpec
Everything a CREATE INDEX statement names.
IndexKeyColumn
One key column of an index being created.

Enums§

AlterKind
What an ALTER TABLE does, with every name already resolved.
BeginKind
How an explicit BEGIN acquires its rights.
Directive
A statement the session carries out.
IfNotExists
Whether a CREATE declared IF NOT EXISTS.
PragmaArgument
What a PRAGMA was given.
Uniqueness
Whether a CREATE INDEX declared UNIQUE.