pub struct SumAccumulator { /* private fields */ }Expand description
Accumulator for SUM.
Implementations§
Source§impl SumAccumulator
impl SumAccumulator
pub fn with_distinct(distinct: bool) -> Self
pub fn with_distinct_for_type(distinct: bool, result_type: ResolvedType) -> Self
Trait Implementations§
Source§impl Accumulator for SumAccumulator
impl Accumulator for SumAccumulator
Source§fn update(&mut self, value: Option<SqlValue>) -> Result<()>
fn update(&mut self, value: Option<SqlValue>) -> Result<()>
Update the accumulator with a new value (None for COUNT(*) rows).
Source§fn finalize(&self) -> Result<SqlValue>
fn finalize(&self) -> Result<SqlValue>
Finalize the accumulator and return the resulting SqlValue.
Source§fn merge(&mut self, state: &[SqlValue]) -> Result<()>
fn merge(&mut self, state: &[SqlValue]) -> Result<()>
Merge a partial state produced by an accumulator of the same function.
Source§fn clone_box(&self) -> Box<dyn Accumulator>
fn clone_box(&self) -> Box<dyn Accumulator>
Clone the accumulator as a trait object.
Source§fn retained_bytes(&self) -> u64
fn retained_bytes(&self) -> u64
Estimated bytes retained by dynamically allocated accumulator state. Read more
Source§impl Clone for SumAccumulator
impl Clone for SumAccumulator
Source§fn clone(&self) -> SumAccumulator
fn clone(&self) -> SumAccumulator
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 SumAccumulator
impl Debug for SumAccumulator
Auto Trait Implementations§
impl Freeze for SumAccumulator
impl RefUnwindSafe for SumAccumulator
impl Send for SumAccumulator
impl Sync for SumAccumulator
impl Unpin for SumAccumulator
impl UnsafeUnpin for SumAccumulator
impl UnwindSafe for SumAccumulator
Blanket Implementations§
impl<T> Allocation for T
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