Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- newtype Aggregator a b = Aggregator (PackMap (PrimExpr, Maybe AggrOp) PrimExpr a b)
- makeAggr' :: Maybe AggrOp -> Aggregator (Column a) (Column b)
- makeAggr :: AggrOp -> Aggregator (Column a) (Column b)
- runAggregator :: Applicative f => Aggregator a b -> ((PrimExpr, Maybe AggrOp) -> f PrimExpr) -> a -> f b
- aggregateU :: Aggregator a b -> (a, PrimQuery, Tag) -> (b, PrimQuery, Tag)
- extractAggregateFields :: Tag -> (PrimExpr, Maybe AggrOp) -> PM [(String, Maybe AggrOp, PrimExpr)] PrimExpr
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.
runAggregator :: Applicative f => Aggregator a b -> ((PrimExpr, Maybe AggrOp) -> f PrimExpr) -> a -> f b Source
aggregateU :: Aggregator a b -> (a, PrimQuery, Tag) -> (b, PrimQuery, Tag) Source