pub struct AggregateOperation<M: Model, E: QueryEngine> { /* private fields */ }Expand description
Aggregate operation builder.
Implementations§
Source§impl<M: Model, E: QueryEngine> AggregateOperation<M, E>
impl<M: Model, E: QueryEngine> AggregateOperation<M, E>
Sourcepub fn count_column(self, column: impl Into<String>) -> Self
pub fn count_column(self, column: impl Into<String>) -> Self
Add a count of non-null values in a column.
Sourcepub fn count_distinct(self, column: impl Into<String>) -> Self
pub fn count_distinct(self, column: impl Into<String>) -> Self
Add a count of distinct values in a column.
Sourcepub fn build_sql(&self) -> (String, Vec<FilterValue>)
pub fn build_sql(&self) -> (String, Vec<FilterValue>)
Build the SQL for this operation.
Sourcepub async fn exec(self, _engine: &E) -> QueryResult<AggregateResult>
pub async fn exec(self, _engine: &E) -> QueryResult<AggregateResult>
Execute the aggregate operation.
Trait Implementations§
Source§impl<M: Debug + Model, E: Debug + QueryEngine> Debug for AggregateOperation<M, E>
impl<M: Debug + Model, E: Debug + QueryEngine> Debug for AggregateOperation<M, E>
Source§impl<M: Model, E: QueryEngine> Default for AggregateOperation<M, E>
impl<M: Model, E: QueryEngine> Default for AggregateOperation<M, E>
Auto Trait Implementations§
impl<M, E> Freeze for AggregateOperation<M, E>
impl<M, E> RefUnwindSafe for AggregateOperation<M, E>where
M: RefUnwindSafe,
E: RefUnwindSafe,
impl<M, E> Send for AggregateOperation<M, E>
impl<M, E> Sync for AggregateOperation<M, E>
impl<M, E> Unpin for AggregateOperation<M, E>
impl<M, E> UnwindSafe for AggregateOperation<M, E>where
M: UnwindSafe,
E: 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