pub struct Distinct {
pub on: Vec<Expr>,
}Expand description
SELECT DISTINCT or SELECT DISTINCT ON (a, b).
From PostgreSQL 17: SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ].
ALL is the default and adds nothing, so it is not representable; the absence
of a Distinct is what ALL means.
A SelectQuery stores this as an Option, because DISTINCT with an empty
ON list is a different statement from no DISTINCT at all — which is exactly
the distinction bob loses by keying off On != nil.
Fields§
§on: Vec<Expr>The ON expressions. Empty is a plain DISTINCT.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Distinct
impl !UnwindSafe for Distinct
impl Freeze for Distinct
impl Send for Distinct
impl Sync for Distinct
impl Unpin for Distinct
impl UnsafeUnpin for Distinct
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more