Expand description
Create virtual tables.
To create a virtual table, define the virtual table module and then register it on each connection it will be used from. The sqlite3_ext_vtab macro is used to define the virtual table module. It can be registered using Connection::create_module.
There are 3 base types of virtual tables:
- StandardModule is a virtual table which is created using the CREATE VIRTUAL TABLE command.
- EponymousModule is a virtual table which is available ambiently in the database connection without being explicitly created.
- EponymousOnlyModule is similar to EponymousModule, but CREATE VIRTUAL TABLE is explicitly forbidden for these modules.
In addition to the base type of virtual table, there are several traits which can be implemented to add behavior.
- VTab is required to be implemented by all virtual tables.
- CreateVTab indicates that the table supports CREATE VIRTUAL TABLE.
- UpdateVTab indicates that the table supports INSERT/UPDATE/DELETE.
- TransactionVTab indicates that the table supports ROLLBACK.
- FindFunctionVTab indicates that the table overrides certain SQL functions when they operate on the table.
- RenameVTab indicates that the table supports ALTER TABLE RENAME TO.
Structs§
- Change
Info - Information about an INSERT/UPDATE/DELETE on a virtual table.
- Column
Context - Describes the run-time environment of the VTabCursor::column method.
- Eponymous
Module - Describes an eponymous virtual table.
- Eponymous
Only Module - Declare an eponymous-only virtual table.
- Index
Info - Information about a query plan.
- Index
Info Constraint - Index
Info Constraint Iterator - Index
Info Order By - Index
Info Order ByIterator - Standard
Module - Declare a virtual table.
- VTab
Connection - A wrapper around Connection that supports configuring virtual table implementations.
- VTab
Function List - A collection of methods overloaded by a virtual table.
Enums§
- Change
Type - Indicates the type of modification that is being applied to the virtual table.
- Conflict
Mode - Indicates the ON CONFLICT mode for the SQL statement currently being executed.
- Constraint
Op - Distinct
Mode - Describes the requirements of the virtual table query.
Traits§
- CreateV
Tab - A non-eponymous virtual table that supports CREATE VIRTUAL TABLE.
- Find
FunctionV Tab - A virtual table that overloads some functions.
- Module
- A virtual table module.
- RenameV
Tab - A virtual table that supports ALTER TABLE RENAME.
- TransactionV
Tab - A virtual table that supports ROLLBACK.
- UpdateV
Tab - A virtual table that supports INSERT/UPDATE/DELETE.
- VTab
- A virtual table.
- VTab
Cursor - Implementation of the cursor type for a virtual table.
- VTab
Transaction - Implementation of the transaction type for a virtual table.