[][src]Trait rusqlite::vtab::VTab

pub trait VTab: Sized {
    type Aux;
    type Cursor: VTabCursor;
    fn connect(
        db: &mut VTabConnection,
        aux: Option<&Self::Aux>,
        args: &[&[u8]]
    ) -> Result<(String, Self)>;
fn best_index(&self, info: &mut IndexInfo) -> Result<()>;
fn open(&self) -> Result<Self::Cursor>; }

Virtual table instance trait.

Implementations must be like:

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

Loading content...

Required methods

fn connect(
    db: &mut VTabConnection,
    aux: Option<&Self::Aux>,
    args: &[&[u8]]
) -> Result<(String, Self)>

Establish a new connection to an existing virtual table.

(See SQLite doc)

fn best_index(&self, info: &mut IndexInfo) -> Result<()>

Determine the best way to access the virtual table. (See SQLite doc)

fn open(&self) -> Result<Self::Cursor>

Create a new cursor used for accessing a virtual table. (See SQLite doc)

Loading content...

Implementors

Loading content...