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: boolWhether the term’s rowid is read.
opaque: boolWhether 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.