Skip to main content

VectorCursor

Struct VectorCursor 

Source
pub struct VectorCursor {
    pub mode: CursorMode,
    pub num_metadata_cols: usize,
    pub db: *const VTabConnection,
    pub config: *const VectorTableConfig,
    pub state: Arc<RefCell<IndexState>>,
}

Fields§

§mode: CursorMode§num_metadata_cols: usize§db: *const VTabConnection

Safety: valid for the vtab lifetime — SQLite keeps the connection alive.

§config: *const VectorTableConfig

Safety: valid for the vtab lifetime — VectorTable owns the config.

§state: Arc<RefCell<IndexState>>

Trait Implementations§

Source§

impl VTabCursor for VectorCursor

Source§

fn filter( &mut self, index_num: i32, _index_str: Option<&str>, args: &mut [&mut ValueRef], ) -> Result<()>

Begin a search of the virtual table. This method is always invoked after creating the cursor, before any other methods of this trait. After calling this method, the cursor should point to the first row of results (or eof should return true to indicate there are no results). Read more
Source§

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

Move the cursor one row forward.
Source§

fn eof(&mut self) -> bool

Check if the cursor currently points beyond the end of the valid results.
Source§

fn column(&mut self, idx: usize, ctx: &ColumnContext) -> Result<()>

Fetch the column numbered idx for the current row. The indexes correspond to the order the columns were declared by VTab::connect. The output value must be assigned to the context using ColumnContext::set_result. If no result is set, SQL NULL is returned. If this method returns an Err value, the SQL statement will fail, even if a result had been set before the failure.
Source§

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

Fetch the rowid for the current row.
Source§

impl Send for VectorCursor

Source§

impl Sync for VectorCursor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.