pub struct IndexQuery {
pub constraints: Vec<ConstraintSpec>,
pub order_by: Vec<OrderSpec>,
pub usage: Vec<ConstraintUsage>,
pub index_number: i32,
pub index_string: String,
pub ordered: bool,
pub estimated_cost: f64,
pub estimated_rows: i64,
}Expand description
The question put to a module’s best_index, and the answer written back.
Fields§
§constraints: Vec<ConstraintSpec>The constraints the query can offer.
order_by: Vec<OrderSpec>The ordering the query would like.
usage: Vec<ConstraintUsage>What the module decided about each constraint, in the same order.
index_number: i32The plan number the module chose, passed back to filter.
index_string: StringThe plan string the module chose, passed back to filter.
ordered: boolWhether the rows will already be in the requested order.
estimated_cost: f64What the module thinks the scan will cost.
estimated_rows: i64How many rows the module thinks it will produce.
Implementations§
Source§impl IndexQuery
impl IndexQuery
Sourcepub fn new(
constraints: Vec<ConstraintSpec>,
order_by: Vec<OrderSpec>,
) -> IndexQuery
pub fn new( constraints: Vec<ConstraintSpec>, order_by: Vec<OrderSpec>, ) -> IndexQuery
Returns a question with every answer at its default.
Sourcepub fn use_constraint(&mut self, index: usize, omit: bool) -> usize
pub fn use_constraint(&mut self, index: usize, omit: bool) -> usize
Marks one constraint as used, taking the next argument position.
Sourcepub fn argument_order(&self) -> Vec<usize>
pub fn argument_order(&self) -> Vec<usize>
Returns the constraint positions that feed filter, in argument order.
Trait Implementations§
Source§impl Clone for IndexQuery
impl Clone for IndexQuery
Source§impl Debug for IndexQuery
impl Debug for IndexQuery
Source§impl PartialEq for IndexQuery
impl PartialEq for IndexQuery
impl StructuralPartialEq for IndexQuery
Auto Trait Implementations§
impl Freeze for IndexQuery
impl RefUnwindSafe for IndexQuery
impl Send for IndexQuery
impl Sync for IndexQuery
impl Unpin for IndexQuery
impl UnsafeUnpin for IndexQuery
impl UnwindSafe for IndexQuery
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