[][src]Trait diesel::sqlite::SqliteAggregateFunction

pub trait SqliteAggregateFunction<Args>: Default {
    type Output;
    fn step(&mut self, args: Args);
fn finalize(aggregator: Option<Self>) -> Self::Output; }

Trait for the implementation of a SQLite aggregate function

This trait is to be used in conjunction with the sql_function! macro for defining a custom SQLite aggregate function. See the documentation there for details.

Associated Types

type Output

The result type of the SQLite aggregate function

Loading content...

Required methods

fn step(&mut self, args: Args)

The step() method is called once for every record of the query

fn finalize(aggregator: Option<Self>) -> Self::Output

After the last row has been processed, the finalize() method is called to compute the result of the aggregate function. If no rows were processed aggregator will be None and finalize() can be used to specify a default result

Loading content...

Implementors

Loading content...