Skip to main content

ColumnUse

Struct ColumnUse 

Source
pub struct ColumnUse {
    pub columns: Vec<u16>,
    pub rowid: bool,
    pub opaque: bool,
    pub functions: Vec<(Vec<u8>, Vec<BoundExpr>)>,
}
Expand description

Which of one FROM term’s columns a query reads.

Fields§

§columns: Vec<u16>

The record slots read, ascending and without duplicates.

§rowid: bool

Whether the term’s rowid is read.

§opaque: bool

Whether something was met whose column reads cannot be enumerated.

An opaque use is never coverable. It is set rather than ignored because the whole value of this answer is that it is complete: a covering path that turned out not to cover a column would read it from an index that does not hold it.

§functions: Vec<(Vec<u8>, Vec<BoundExpr>)>

The module’s auxiliary functions this term is asked for, in the order they were met, as a folded name and the arguments after the table.

score(t) and bm25(t) read the cursor rather than a column, so they are neither a column read nor an opaque one: the module can answer them per row, and a materialised virtual scan carries the answers beside the columns. Recorded here because this is already the answer to “what does this term have to produce”, and a second list would be a second thing that can disagree with it. The arguments, not their count. highlight(t, 0, '[', ']') and bm25(t, 10.0, 1.0) are answered by the module from the cursor, and the module cannot answer either without the values - which used to be dropped here and replaced with an empty list at the call, so every auxiliary function saw no arguments at all. Two calls of one name with different arguments are also two different answers, so the arguments are part of what identifies a slot rather than a detail hanging off one.

Implementations§

Source§

impl ColumnUse

Source

pub fn add(&mut self, slot: u16)

Records that one slot is read.

Source

pub fn add_function(&mut self, name: &[u8], arguments: &[BoundExpr])

Records that one of the module’s auxiliary functions is read.

@param name - the function’s folded name @param arguments - the arguments after the table

Source

pub fn merge(&mut self, other: &ColumnUse)

Folds another use into this one.

Trait Implementations§

Source§

impl Clone for ColumnUse

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ColumnUse

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for ColumnUse

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ColumnUse

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ColumnUse

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.