pub struct AggregateGroup {
pub key: Option<String>,
pub label: Option<String>,
pub count: u64,
pub values: HashMap<String, Option<String>>,
}Expand description
One group’s numbers. key is the group’s value; None is a real answer —
the rows whose group column is null — and is distinct from “no rows”.
Fields§
§key: Option<String>§label: Option<String>The group’s display label (the related row’s label column), when the caller asked for one and the group column is a relation FK.
count: u64§values: HashMap<String, Option<String>>Reduction results keyed "sum:amount", carried as strings.
Postgres numeric holds more precision than an IEEE double, and money
columns are exactly where that bites: a tenant large enough for the
total to matter is a tenant large enough to round it. The string is the
exact value Postgres computed; the caller decides how to parse it.
None is SQL NULL — no rows contributed — which is not zero.
Trait Implementations§
Source§impl Clone for AggregateGroup
impl Clone for AggregateGroup
Source§impl Debug for AggregateGroup
impl Debug for AggregateGroup
Source§impl<'de> Deserialize<'de> for AggregateGroup
impl<'de> Deserialize<'de> for AggregateGroup
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AggregateGroup
impl RefUnwindSafe for AggregateGroup
impl Send for AggregateGroup
impl Sync for AggregateGroup
impl Unpin for AggregateGroup
impl UnsafeUnpin for AggregateGroup
impl UnwindSafe for AggregateGroup
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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