opaleye-sqlite-0.0.0.0: An SQL-generating DSL targeting SQLite

Safe HaskellSafe-Inferred
LanguageHaskell98

Opaleye.SQLite.Internal.Aggregate

Synopsis

Documentation

newtype Aggregator a b Source

An Aggregator takes a collection of rows of type a, groups them, and transforms each group into a single row of type b. This corresponds to aggregators using GROUP BY in SQL.

An Aggregator corresponds closely to a Fold from the foldl package. Whereas an Aggregator a b takes each group of type a to a single row of type b, a Fold a b takes a list of a and returns a single row of type b.