[−][src]Trait rusqlite::vtab::VTab
feature = "vtab"
Virtual table instance trait.
Safety
The first item in a struct implementing VTab must be
rusqlite::sqlite3_vtab
, and the struct must be #[repr(C)]
.
ⓘThis example is not tested
#[repr(C)] struct MyTab { /// Base class. Must be first base: ffi::sqlite3_vtab, /* Virtual table implementations will typically add additional fields */ }
(See SQLite doc)
Associated Types
type Aux
[src]
Client data passed to Connection::create_module
.
type Cursor: VTabCursor
[src]
Specific cursor implementation
Required methods
pub fn connect(
db: &mut VTabConnection,
aux: Option<&Self::Aux>,
args: &[&[u8]]
) -> Result<(String, Self)>
[src]
db: &mut VTabConnection,
aux: Option<&Self::Aux>,
args: &[&[u8]]
) -> Result<(String, Self)>
Establish a new connection to an existing virtual table.
(See SQLite doc)
pub fn best_index(&self, info: &mut IndexInfo) -> Result<()>
[src]
Determine the best way to access the virtual table. (See SQLite doc)
pub fn open(&'vtab self) -> Result<Self::Cursor>
[src]
Create a new cursor used for accessing a virtual table. (See SQLite doc)