Enum sqlite3_ext::vtab::DistinctMode
source · pub enum DistinctMode {
Ordered,
Grouped,
Distinct,
}Expand description
Describes the requirements of the virtual table query.
This value is retured by IndexInfo::distinct_mode. It allows the virtual table implementation to decide if it is safe to consume the order_by fields using IndexInfo::set_order_by_consumed.
The levels described here are progressively less demanding. If the virtual table implementation meets the requirements of DistinctMode::Ordered, then it is always safe to consume the order_by fields.
For the purposes of comparing virtual table output values to see if the values are same value for sorting purposes, two NULL values are considered to be the same. In other words, the comparison operator is “IS” (or “IS NOT DISTINCT FROM”) and not “==”.
Variants§
Ordered
The virtual table must return all rows in the correct order according to the order_by fields.
Grouped
The virtual table may return rows in any order, but all rows that are in the same group must be adjacent to one another. A group is defined as all rows for which all of the columns in order_by are equal. This is the mode used when planning a GROUP BY query.
Distinct
The same as DistinctMode::Grouped, however the virtual table is allowed (but not required) to skip all but a single row within each group. This is the mode used when planning a DISTINCT query.
Trait Implementations§
source§impl Clone for DistinctMode
impl Clone for DistinctMode
source§fn clone(&self) -> DistinctMode
fn clone(&self) -> DistinctMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more