Module sqlite3_ext::vtab

source ·
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.

  • 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

Information about an INSERT/UPDATE/DELETE on a virtual table.
Describes the run-time environment of the VTabCursor::column method.
Describes an eponymous virtual table.
Declare an eponymous-only virtual table.
Information about a query plan.
Declare a virtual table.
A wrapper around Connection that supports configuring virtual table implementations.
A collection of methods overloaded by a virtual table.

Enums

Indicates the type of modification that is being applied to the virtual table.
Indicates the ON CONFLICT mode for the SQL statement currently being executed.
Describes the requirements of the virtual table query.

Traits

A non-eponymous virtual table that supports CREATE VIRTUAL TABLE.
A virtual table that overloads some functions.
A virtual table module.
A virtual table that supports ALTER TABLE RENAME.
A virtual table that supports ROLLBACK.
A virtual table that supports INSERT/UPDATE/DELETE.
A virtual table.
Implementation of the cursor type for a virtual table.
Implementation of the transaction type for a virtual table.