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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.