pub struct AggregateSpec {
pub group_by: Option<String>,
pub reductions: Vec<(AggregateFn, String)>,
pub group_limit: usize,
pub label_field: Option<String>,
pub label_relation: Option<(String, String)>,
}Expand description
What to group by and what to reduce — the parsed form of the query string.
Fields§
§group_by: Option<String>Column whose distinct values become groups. None asks for one total.
reductions: Vec<(AggregateFn, String)>(function, column) pairs, in the order the caller asked for them.
group_limit: usizeMost groups to return before reporting the answer as truncated.
label_field: Option<String>Carry a label per group: the column on the group column’s RELATED
table (resolved through the entity’s relation metadata) to show
instead of a bare uuid key. None = keys stay as they are.
label_relation: Option<(String, String)>The resolved relation behind the group column — (target table, the BASE table's FK column, snake), filled by the generic layer from
the entity’s relations() metadata. Callers never set this.
Trait Implementations§
Source§impl Clone for AggregateSpec
impl Clone for AggregateSpec
Source§impl Debug for AggregateSpec
impl Debug for AggregateSpec
Auto Trait Implementations§
impl Freeze for AggregateSpec
impl RefUnwindSafe for AggregateSpec
impl Send for AggregateSpec
impl Sync for AggregateSpec
impl Unpin for AggregateSpec
impl UnsafeUnpin for AggregateSpec
impl UnwindSafe for AggregateSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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