pub struct GroupByOperation<M: Model, E: QueryEngine> { /* private fields */ }Expand description
Group by operation builder.
Implementations§
Source§impl<M: Model, E: QueryEngine> GroupByOperation<M, E>
impl<M: Model, E: QueryEngine> GroupByOperation<M, E>
Sourcepub fn having(self, condition: HavingCondition) -> Self
pub fn having(self, condition: HavingCondition) -> Self
Add a having condition.
Sourcepub fn order_by(self, order: impl Into<OrderByField>) -> Self
pub fn order_by(self, order: impl Into<OrderByField>) -> Self
Add ordering.
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<Vec<GroupByResult>>
pub async fn exec(self, _engine: &E) -> QueryResult<Vec<GroupByResult>>
Execute the group by operation.
Trait Implementations§
Auto Trait Implementations§
impl<M, E> Freeze for GroupByOperation<M, E>
impl<M, E> RefUnwindSafe for GroupByOperation<M, E>where
M: RefUnwindSafe,
E: RefUnwindSafe,
impl<M, E> Send for GroupByOperation<M, E>
impl<M, E> Sync for GroupByOperation<M, E>
impl<M, E> Unpin for GroupByOperation<M, E>
impl<M, E> UnwindSafe for GroupByOperation<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