| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rel8.Internal.Table.Aggregate.Maybe
Synopsis
- filterWhereOptional :: forall a i (fold :: Fold) (fold' :: Fold). Table Expr a => (i -> Expr Bool) -> Aggregator' fold i a -> Aggregator' fold' i (MaybeTable Expr a)
- optionalAggregate :: forall a (fold :: Fold) i (fold' :: Fold). Table Expr a => Aggregator' fold i a -> Aggregator' fold' i (MaybeTable Expr a)
- aggregateJustTable :: forall a i (fold :: Fold). Table Expr a => Aggregator i a -> Aggregator' fold (MaybeTable Expr i) a
- aggregateJustTable1 :: forall a (fold :: Fold) i (fold' :: Fold). Table Expr a => Aggregator' fold i a -> Aggregator' fold' (MaybeTable Expr i) (MaybeTable Expr a)
- aggregateMaybeTable :: forall (fold :: Fold) i a. Aggregator' fold i a -> Aggregator1 (MaybeTable Expr i) (MaybeTable Expr a)
Documentation
filterWhereOptional :: forall a i (fold :: Fold) (fold' :: Fold). Table Expr a => (i -> Expr Bool) -> Aggregator' fold i a -> Aggregator' fold' i (MaybeTable Expr a) Source #
A variant of filterWhere that can be used with an Aggregator1
(upgrading it to an Aggregator in the process). It returns
nothingTable in the case where the predicate matches zero rows.
optionalAggregate :: forall a (fold :: Fold) i (fold' :: Fold). Table Expr a => Aggregator' fold i a -> Aggregator' fold' i (MaybeTable Expr a) Source #
optionalAggregate upgrades an Aggregator1 into an Aggregator by
having it return nothingTable when aggregating over an empty collection
of rows.
aggregateJustTable :: forall a i (fold :: Fold). Table Expr a => Aggregator i a -> Aggregator' fold (MaybeTable Expr i) a Source #
Lift an Aggregator to operate on a MaybeTable. If the input query has
s, they are folded into a single justTable ia by the given aggregator
— in the case where the input query is all nothingTables, the
Aggregator's fallback a is returned.
aggregateJustTable1 :: forall a (fold :: Fold) i (fold' :: Fold). Table Expr a => Aggregator' fold i a -> Aggregator' fold' (MaybeTable Expr i) (MaybeTable Expr a) Source #
Lift an Aggregator1 to operate on a MaybeTable. If the input query
has s, they are folded into a single justTable i by the
given aggregator — in the case where the input query is all
justTable anothingTables, a single nothingTable row is returned.
aggregateMaybeTable :: forall (fold :: Fold) i a. Aggregator' fold i a -> Aggregator1 (MaybeTable Expr i) (MaybeTable Expr a) Source #
Lift an aggregator to operate on a MaybeTable. nothingTables and
justTables are grouped separately.