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

pub 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>; }

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

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

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

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

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)

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

Implementors