rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Query.Aggregate

Synopsis

Documentation

aggregate :: (Table Expr i, Table Expr a) => Aggregator i a -> Query i -> Query a Source #

Apply an Aggregator to all rows returned by a Query. If the Query is empty, then a single "fallback" row is returned, composed of the identity elements of the constituent aggregation functions.

aggregate1 :: forall i (fold :: Fold) a. Table Expr i => Aggregator' fold i a -> Query i -> Query a Source #

Apply an Aggregator1 to all rows returned by a Query. If the Query is empty, then zero rows are returned.

aggregateU :: forall i (fold :: Fold) a. Unpackspec i i -> Aggregator' fold i a -> Query i -> Query a Source #

countRows :: Query a -> Query (Expr Int64) Source #

Count the number of rows returned by a query. Note that this is different from countStar, as even if the given query yields no rows, countRows will return 0.