pub trait Accumulator: Send {
// Required methods
fn update(&mut self, value: Option<SqlValue>) -> Result<()>;
fn finalize(&self) -> Result<SqlValue>;
fn clone_box(&self) -> Box<dyn Accumulator>;
}Expand description
Accumulator interface for aggregate function execution.
Required Methods§
Sourcefn 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).
Sourcefn finalize(&self) -> Result<SqlValue>
fn finalize(&self) -> Result<SqlValue>
Finalize the accumulator and return the resulting SqlValue.
Sourcefn clone_box(&self) -> Box<dyn Accumulator>
fn clone_box(&self) -> Box<dyn Accumulator>
Clone the accumulator as a trait object.