Struct rusqlite::vtab::IndexInfo

source ·
pub struct IndexInfo(/* private fields */);
Available on crate feature vtab only.
Expand description

Pass information into and receive the reply from the VTab::best_index method.

(See SQLite doc)

Implementations§

source§

impl IndexInfo

source

pub fn constraints_and_usages(&mut self) -> IndexConstraintAndUsageIter<'_>

Iterate on index constraint and its associated usage.

source

pub fn constraints(&self) -> IndexConstraintIter<'_>

Record WHERE clause constraints.

source

pub fn order_bys(&self) -> OrderByIter<'_>

Information about the ORDER BY clause.

source

pub fn num_of_order_by(&self) -> usize

Number of terms in the ORDER BY clause

source

pub fn constraint_usage( &mut self, constraint_idx: usize ) -> IndexConstraintUsage<'_>

Information about what parameters to pass to VTabCursor::filter.

source

pub fn set_idx_num(&mut self, idx_num: c_int)

Number used to identify the index

source

pub fn set_idx_str(&mut self, idx_str: &str)

String used to identify the index

source

pub fn set_order_by_consumed(&mut self, order_by_consumed: bool)

True if output is already ordered

source

pub fn set_estimated_cost(&mut self, estimated_ost: f64)

Estimated cost of using this index

source

pub fn set_estimated_rows(&mut self, estimated_rows: i64)

Estimated number of rows returned.

source

pub fn set_idx_flags(&mut self, flags: IndexFlags)

Mask of SQLITE_INDEX_SCAN_* flags.

source

pub fn col_used(&self) -> u64

Mask of columns used by statement

source

pub fn collation(&self, constraint_idx: usize) -> Result<&str>

Available on crate feature modern_sqlite only.

Determine the collation for a virtual table constraint

Trait Implementations§

source§

impl Debug for IndexInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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>,

§

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>,

§

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.