Expand description
Virtual table and cursor traits (§9.3).
Virtual tables expose external data sources as SQL tables. They follow the SQLite xCreate/xConnect/xBestIndex/xFilter/xNext protocol.
These traits are open (user-implementable). Extension authors implement them to create custom virtual table modules.
§Cx on I/O Methods
Methods that perform I/O accept &Cx for cancellation and deadline
propagation. Lightweight accessors (eof, column, rowid) do not
require &Cx since they operate on already-fetched row data.
Structs§
- Column
Context - A context object passed to
VirtualTableCursor::columnfor writing the column value. - Index
Constraint - A single constraint from the WHERE clause that the planner is considering.
- Index
Constraint Usage - Per-constraint usage information set by
best_index. - Index
Info - Information exchanged between the query planner and virtual table during index selection.
- Index
Order By - A single ORDER BY term from the query.
- Shadow
Table Policy - Policy returned by a module when the core asks whether a table name is a shadow table of a virtual table instance.
- Transactional
Vtab State - Snapshot-backed transaction/savepoint state for mutable virtual tables.
- Vtab
Module Metadata - Module-level metadata that future catalog and defensive checks can consult without hard-coding FTS5-specific behavior in unrelated layers.
- Vtab
Risk Level - Defensive/risk metadata analogous to SQLite’s vtab safety flags.
Enums§
- Constraint
Op - Comparison operator for an index constraint.
- Shadow
Table Access - Access decision for a shadow-table operation class.
- Shadow
Table Kind - Classification for a schema object named by a virtual-table module.
- Vtab
Integrity Policy - Integrity surface advertised by a module.
- Vtab
Lifecycle Policy - Lifecycle shape a module exposes to the connection/catalog layer.
Traits§
- Erased
Vtab Cursor - A type-erased virtual table cursor.
- Erased
Vtab Instance - A type-erased virtual table instance.
- Virtual
Table - A virtual table module.
- Virtual
Table Cursor - A cursor for scanning a virtual table.
- Vtab
Module Factory - A type-erased virtual table module factory.
Functions§
- module_
factory_ from - Create a
VtabModuleFactoryfrom aVirtualTabletype.