Expand description
Extension API for the C-free oxisqlite engine: write new SQL
functionality in pure Rust, no C, in the spirit of sqlite3 extensions.
Provides the scalar, AggregateDerive, and VTabModuleDerive macros
(scalar/aggregate functions, virtual tables), an optional vfs-gated VFS
interface, and the register_extension! macro that plugs it all in.
Macros§
- register_
extension - Register your extension with ‘core’ by providing the relevant functions
Structs§
- AggCtx
- Conn
- core database connection public fields for core only
- Connection
- Public API for methods to allow extensions to query other tables for the connection that opened the VTable. This value and its resources are cleaned up when the VTable is dropped, so there is no need to manually close the connection.
- Constraint
Info - The primary argument to xBestIndex, which describes a constraint in a query involving a virtual table.
- Constraint
Usage - Returned from xBestIndex to describe how the virtual table can use the constraints in the WHERE clause of a query.
- ExtIndex
Info - FFI representation of IndexInfo.
- Extension
Api - Extension
ApiRef - Index
Info - The internal (core) representation of an ‘index’ on a virtual table. Returned from xBestIndex and then processed and passed to VFilter.
- Order
ByInfo - Describes an ORDER BY clause in a query involving a virtual table. Passed along with the constraints to xBestIndex.
- Statement
- Prepared statement for querying a core database connection public API for extensions Statements can be manually closed.
- Stmt
- Internal/core use only Extensions should not import or use this type directly
- VTab
Create Result - VTab
Module Impl - Value
Enums§
- Constraint
Op - Result
Code - Error type is of type ExtError which can be either a user defined error or an error code
- Step
Result - StepResult is used to represent the state of a query as it is exposed to the public API of a connection in a virtual table extension. the IO variant is always handled internally and therefore is not included here.
- VTab
Kind - Value
Type
Traits§
Type Aliases§
Attribute Macros§
- scalar
- Declare a scalar function for your extension. This requires the name: #[scalar(name = “example”)] of what you wish to call your function with.
Derive Macros§
- Aggregate
Derive - Define an aggregate function for your extension by deriving AggregateDerive on a struct that implements the AggFunc trait.
- VTab
Module Derive - Macro to derive a VTabModule for your extension. This macro will generate the necessary functions to register your module with core. You must implement the VTabModule, VTable, and VTabCursor traits.