[][src]Trait rusqlite::vtab::VTabCursor

pub unsafe trait VTabCursor: Sized {
    fn filter(
        &mut self,
        idx_num: c_int,
        idx_str: Option<&str>,
        args: &Values
    ) -> Result<()>;
fn next(&mut self) -> Result<()>;
fn eof(&self) -> bool;
fn column(&self, ctx: &mut Context, i: c_int) -> Result<()>;
fn rowid(&self) -> Result<i64>; }

feature = "vtab" Virtual table cursor trait.

Implementations must be like:

This example is not tested
#[repr(C)]
struct MyTabCursor {
   /// Base class. Must be first
   base: ffi::sqlite3_vtab_cursor,
   /* Virtual table implementations will typically add additional fields */
}

(See SQLite doc)

Required methods

fn filter(
    &mut self,
    idx_num: c_int,
    idx_str: Option<&str>,
    args: &Values
) -> Result<()>

Begin a search of a virtual table. (See SQLite doc)

fn next(&mut self) -> Result<()>

Advance cursor to the next row of a result set initiated by filter. (See SQLite doc)

fn eof(&self) -> bool

Must return false if the cursor currently points to a valid row of data, or true otherwise. (See SQLite doc)

fn column(&self, ctx: &mut Context, i: c_int) -> Result<()>

Find the value for the i-th column of the current row. i is zero-based so the first column is numbered 0. May return its result back to SQLite using one of the specified ctx. (See SQLite doc)

fn rowid(&self) -> Result<i64>

Return the rowid of row that the cursor is currently pointing at. (See SQLite doc)

Loading content...

Implementors

Loading content...