Expand description
Create virtual tables.
Follow these steps to create your own virtual table:
- Write implementation of
VTabandVTabCursortraits. - Create an instance of the
Modulestructure specialized forVTabimpl. from step 1. - Register your
Modulestructure usingConnection::create_module. - Run a
CREATE VIRTUAL TABLEcommand that specifies the new module in theUSINGclause.
(See SQLite doc)
Modules§
- array
- Array Virtual Table.
Structs§
- Connection
Ref - A reference to a connection handle with a lifetime bound to context.
- Context
- Context is used by
VTabCursor::columnto specify the cell value. - Filters
- Wrapper to
VTabCursor::filterarguments, the values requested byVTab::best_index. - InValues
- IN values
- 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_indexmethod. - Inserts
- Wrapper to
UpdateVTab::insertarguments - Module
- Virtual table module
- OrderBy
- A column of the ORDER BY clause.
- Order
ByIter feature = "vtab"- Updates
- Wrapper to
UpdateVTab::updatearguments - VTab
Connection feature = "vtab"- Value
Iter Valuesiterator.- Values
- Wrapper to
ffi::sqlite3_values - sqlite3_
vtab - sqlite3_
vtab_ cursor
Enums§
- Conflict
Mode - Conflict resolution modes
- Distinct
Mode - Determine if a virtual table query is DISTINCT
- 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 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
- 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: