Expand description
Create virtual tables.
Follow these steps to create your own virtual table:
- Write implementation of
VTab
andVTabCursor
traits. - Create an instance of the
Module
structure specialized forVTab
impl. from step 1. - Register your
Module
structure usingConnection::create_module
. - Run a
CREATE VIRTUAL TABLE
command that specifies the new module in theUSING
clause.
(See SQLite doc)
Structs§
- Context
- Context is used by
VTabCursor::column
to specify the cell value. - Index
Constraint - WHERE clause constraint.
- Index
Constraint AndUsage Iter - Iterate on index constraint and its associated usage.
- Index
Constraint Iter feature = "vtab"
- Index
Constraint Usage - Information about what parameters to pass to
VTabCursor::filter
. - Index
Flags - Virtual table scan flags See Function Flags for details.
- Index
Info - Pass information into and receive the reply from the
VTab::best_index
method. - Module
- Virtual table module
- OrderBy
- A column of the ORDER BY clause.
- Order
ByIter feature = "vtab"
- VTab
Connection feature = "vtab"
- Value
Iter Values
iterator.- Values
- Wrapper to
VTabCursor::filter
arguments, the values requested byVTab::best_index
. - sqlite3_
vtab - sqlite3_
vtab_ cursor
Enums§
- Index
Constraint Op - Index constraint operator. See Virtual Table Constraint Operator Codes for details.
- VTab
Config - Virtual table configuration options
- VTab
Kind - Virtual table kind
Traits§
- CreateV
Tab - Read-only virtual table instance trait.
- TransactionV
Tab - Writable virtual table instance trait with transaction support trait.
- UpdateV
Tab - Writable virtual table instance trait.
- VTab
- Eponymous-only virtual table instance trait.
- VTab
Cursor - Virtual table cursor trait.
Functions§
- dequote
- Dequote string
- eponymous_
only_ module - Create an eponymous only virtual table implementation.
- escape_
double_ quote - Escape double-quote (
"
) character occurrences by doubling them (""
). - parameter
<param_name>=['"]?<param_value>['"]?
=>(<param_name>, <param_value>)
- parse_
boolean - The boolean can be one of:
- read_
only_ module - Create a read-only virtual table implementation.
- update_
module - Create a modifiable virtual table implementation.
- update_
module_ with_ tx - Create a modifiable virtual table implementation with support for transactions.