Skip to main content

Module vtab

Module vtab 

Source
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§

ColumnContext
A context object passed to VirtualTableCursor::column for writing the column value.
IndexConstraint
A single constraint from the WHERE clause that the planner is considering.
IndexConstraintUsage
Per-constraint usage information set by best_index.
IndexInfo
Information exchanged between the query planner and virtual table during index selection.
IndexOrderBy
A single ORDER BY term from the query.
ShadowTablePolicy
Policy returned by a module when the core asks whether a table name is a shadow table of a virtual table instance.
TransactionalVtabState
Snapshot-backed transaction/savepoint state for mutable virtual tables.
VtabModuleMetadata
Module-level metadata that future catalog and defensive checks can consult without hard-coding FTS5-specific behavior in unrelated layers.
VtabRiskLevel
Defensive/risk metadata analogous to SQLite’s vtab safety flags.

Enums§

ConstraintOp
Comparison operator for an index constraint.
ShadowTableAccess
Access decision for a shadow-table operation class.
ShadowTableKind
Classification for a schema object named by a virtual-table module.
VtabIntegrityPolicy
Integrity surface advertised by a module.
VtabLifecyclePolicy
Lifecycle shape a module exposes to the connection/catalog layer.

Traits§

ErasedVtabCursor
A type-erased virtual table cursor.
ErasedVtabInstance
A type-erased virtual table instance.
VirtualTable
A virtual table module.
VirtualTableCursor
A cursor for scanning a virtual table.
VtabModuleFactory
A type-erased virtual table module factory.

Functions§

module_factory_from
Create a VtabModuleFactory from a VirtualTable type.