module Database.Relational.SqlSyntax.Aggregate (
aggregateColumnRef,
aggregatePowerKey, aggregateGroupingSet,
aggregateRollup, aggregateCube, aggregateSets,
aggregateKeyRecord, aggregateKeyElement, unsafeAggregateKey,
) where
import Database.Relational.SqlSyntax.Types
(AggregateBitKey (..), AggregateSet (..), AggregateElem (..),
AggregateColumnRef, AggregateKey (..), )
aggregateColumnRef :: AggregateColumnRef -> AggregateElem
aggregateColumnRef = ColumnRef
aggregatePowerKey :: [AggregateColumnRef] -> AggregateBitKey
aggregatePowerKey = AggregateBitKey
aggregateGroupingSet :: [AggregateElem] -> AggregateSet
aggregateGroupingSet = AggregateSet
aggregateRollup :: [AggregateBitKey] -> AggregateElem
aggregateRollup = Rollup
aggregateCube :: [AggregateBitKey] -> AggregateElem
aggregateCube = Cube
aggregateSets :: [AggregateSet] -> AggregateElem
aggregateSets = GroupingSets
aggregateKeyRecord :: AggregateKey a -> a
aggregateKeyRecord (AggregateKey (p, _c)) = p
aggregateKeyElement :: AggregateKey a -> AggregateElem
aggregateKeyElement (AggregateKey (_p, c)) = c
unsafeAggregateKey :: (a, AggregateElem) -> AggregateKey a
unsafeAggregateKey = AggregateKey