pub struct IndexInfo {
pub constraints: Vec<IndexConstraint>,
pub order_by: Vec<IndexOrderBy>,
pub constraint_usage: Vec<IndexConstraintUsage>,
pub idx_num: i32,
pub idx_str: Option<String>,
pub order_by_consumed: bool,
pub estimated_cost: f64,
pub estimated_rows: i64,
}Expand description
Information exchanged between the query planner and virtual table during index selection.
The planner fills constraints and order_by. The vtab fills
constraint_usage, idx_num, idx_str, order_by_consumed,
estimated_cost, and estimated_rows.
Fields§
§constraints: Vec<IndexConstraint>WHERE clause constraints the planner is considering.
order_by: Vec<IndexOrderBy>ORDER BY terms from the query.
constraint_usage: Vec<IndexConstraintUsage>How each constraint maps to filter arguments (vtab fills this).
idx_num: i32Integer identifier for the chosen index strategy.
idx_str: Option<String>Optional string identifier for the chosen index strategy.
order_by_consumed: boolWhether the vtab guarantees the output is already sorted.
estimated_cost: f64Estimated cost of the scan (lower is better).
estimated_rows: i64Estimated number of rows returned.
Implementations§
Source§impl IndexInfo
impl IndexInfo
Sourcepub fn new(
constraints: Vec<IndexConstraint>,
order_by: Vec<IndexOrderBy>,
) -> Self
pub fn new( constraints: Vec<IndexConstraint>, order_by: Vec<IndexOrderBy>, ) -> Self
Create a new IndexInfo with the given constraints and order-by terms.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexInfo
impl RefUnwindSafe for IndexInfo
impl Send for IndexInfo
impl Sync for IndexInfo
impl Unpin for IndexInfo
impl UnsafeUnpin for IndexInfo
impl UnwindSafe for IndexInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more