pub struct AggregateQuery {
pub table: String,
pub filter: Option<Expr>,
pub group_by: Vec<String>,
pub aggregates: Vec<Aggregate>,
pub having: Option<Expr>,
}Expand description
A grouped/aggregated query. Rows are scanned, optionally filtered, grouped by
group_by key columns, reduced with aggregates, and finally filtered by
having. With no group_by, the whole (filtered) table is one group.
Fields§
§table: String§filter: Option<Expr>§group_by: Vec<String>§aggregates: Vec<Aggregate>§having: Option<Expr>Predicate applied to each produced group row. Column references resolve to the group key columns or aggregate aliases.
Trait Implementations§
Source§impl Clone for AggregateQuery
impl Clone for AggregateQuery
Source§fn clone(&self) -> AggregateQuery
fn clone(&self) -> AggregateQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AggregateQuery
impl Debug for AggregateQuery
Source§impl<'de> Deserialize<'de> for AggregateQuery
impl<'de> Deserialize<'de> for AggregateQuery
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AggregateQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AggregateQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AggregateQuery
impl PartialEq for AggregateQuery
Source§fn eq(&self, other: &AggregateQuery) -> bool
fn eq(&self, other: &AggregateQuery) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AggregateQuery
impl Serialize for AggregateQuery
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AggregateQuery
Auto Trait Implementations§
impl Freeze for AggregateQuery
impl RefUnwindSafe for AggregateQuery
impl Send for AggregateQuery
impl Sync for AggregateQuery
impl Unpin for AggregateQuery
impl UnsafeUnpin for AggregateQuery
impl UnwindSafe for AggregateQuery
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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