pub struct Aggregate<'a, M: 'static, PK: 'static> { /* private fields */ }Implementations§
Source§impl<'a, M: 'static, PK: 'static> Aggregate<'a, M, PK>
impl<'a, M: 'static, PK: 'static> Aggregate<'a, M, PK>
Sourcepub fn count(self) -> AggregateCount<'a, M, PK>
pub fn count(self) -> AggregateCount<'a, M, PK>
COUNT(*) over the matching rows. Always returns i64; empty
matches yield 0 rather than NULL.
Sourcepub fn sum<C: IntoColumnName>(self, column: C) -> AggregateColumn<'a, M, PK>
pub fn sum<C: IntoColumnName>(self, column: C) -> AggregateColumn<'a, M, PK>
SUM(<col>). Returns Option<T> — None when no rows match.
Sourcepub fn avg<C: IntoColumnName>(self, column: C) -> AggregateColumn<'a, M, PK>
pub fn avg<C: IntoColumnName>(self, column: C) -> AggregateColumn<'a, M, PK>
AVG(<col>). Returns Option<T> — None when no rows match.
Sourcepub fn min<C: IntoColumnName>(self, column: C) -> AggregateColumn<'a, M, PK>
pub fn min<C: IntoColumnName>(self, column: C) -> AggregateColumn<'a, M, PK>
MIN(<col>). Returns Option<T> — None when no rows match.
Sourcepub fn max<C: IntoColumnName>(self, column: C) -> AggregateColumn<'a, M, PK>
pub fn max<C: IntoColumnName>(self, column: C) -> AggregateColumn<'a, M, PK>
MAX(<col>). Returns Option<T> — None when no rows match.
Trait Implementations§
Auto Trait Implementations§
impl<'a, M, PK> Freeze for Aggregate<'a, M, PK>
impl<'a, M, PK> !RefUnwindSafe for Aggregate<'a, M, PK>
impl<'a, M, PK> Send for Aggregate<'a, M, PK>
impl<'a, M, PK> Sync for Aggregate<'a, M, PK>
impl<'a, M, PK> Unpin for Aggregate<'a, M, PK>
impl<'a, M, PK> UnsafeUnpin for Aggregate<'a, M, PK>
impl<'a, M, PK> !UnwindSafe for Aggregate<'a, M, PK>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more