pub trait Accumulator:
Send
+ Sync
+ Debug {
// Required methods
fn update_value(&mut self, value: &ScalarValue) -> QuillSQLResult<()>;
fn evaluate(&self) -> QuillSQLResult<ScalarValue>;
}
Required Methods§
Sourcefn update_value(&mut self, value: &ScalarValue) -> QuillSQLResult<()>
fn update_value(&mut self, value: &ScalarValue) -> QuillSQLResult<()>
Updates the accumulator’s state from its input.
Sourcefn evaluate(&self) -> QuillSQLResult<ScalarValue>
fn evaluate(&self) -> QuillSQLResult<ScalarValue>
Returns the final aggregate value, consuming the internal state.