pub enum AggregateCall<F> {
CountStar,
Count {
expr: Box<ScalarExpr<F>>,
distinct: bool,
},
Sum {
expr: Box<ScalarExpr<F>>,
distinct: bool,
},
Total {
expr: Box<ScalarExpr<F>>,
distinct: bool,
},
Avg {
expr: Box<ScalarExpr<F>>,
distinct: bool,
},
Min(Box<ScalarExpr<F>>),
Max(Box<ScalarExpr<F>>),
CountNulls(Box<ScalarExpr<F>>),
GroupConcat {
expr: Box<ScalarExpr<F>>,
distinct: bool,
separator: Option<String>,
},
}Expand description
Aggregate function call within a scalar expression.
Each variant (except CountStar) operates on an expression rather than just a column.
This allows aggregates like AVG(col1 + col2) or SUM(-col1) to work correctly.
Variants§
CountStar
Count
Sum
Total
Avg
Min(Box<ScalarExpr<F>>)
Max(Box<ScalarExpr<F>>)
CountNulls(Box<ScalarExpr<F>>)
GroupConcat
Trait Implementations§
Source§impl<F> Clone for AggregateCall<F>where
F: Clone,
impl<F> Clone for AggregateCall<F>where
F: Clone,
Source§fn clone(&self) -> AggregateCall<F>
fn clone(&self) -> AggregateCall<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<F> Freeze for AggregateCall<F>
impl<F> RefUnwindSafe for AggregateCall<F>where
F: RefUnwindSafe,
impl<F> Send for AggregateCall<F>where
F: Send,
impl<F> Sync for AggregateCall<F>where
F: Sync,
impl<F> Unpin for AggregateCall<F>
impl<F> UnwindSafe for AggregateCall<F>where
F: UnwindSafe,
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