/// The different type so duplicates filtering, e.g. `DISTINCT`, `UNIQUE`, `ALL`.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Duplicates {
/// `SELECT ALL ...`
///
/// No filtering at all, passing through ALL entries / rows.
All,
/// `SELECT DISTINCT ...`
///
/// Filtering for uniques, passing through only DISTINCT entries / rows.
Distinct,
/// `SELECT UNIQUE ...`
///
/// Equivalent to [Self::Distinct].
Unique,
}
impl Duplicates {
/// Determines if this filter denotes filtering for distinct entries.
pub fn is_distinct(&self) -> bool {
matches!(self, Duplicates::Distinct | Duplicates::Unique)
}
}