@@ -90,6 +90,7 @@ or = unsafeMakeAggregate toPrimExpr fromPrimExpr $
93+-- | Produce an aggregation for @Expr a@ using the @max@ function.
93max :: (DBMax db, Nullabilizes db a) => Expr a -> Aggregate (Expr a)
94max :: (DBMax db, Nullabilizes db a) => Expr a -> Aggregate (Expr a)
94max = unsafeMakeAggregate toPrimExpr fromPrimExpr $
95max = unsafeMakeAggregate toPrimExpr fromPrimExpr $
95 Just Aggregator
96 Just Aggregator
@@ -99,6 +100,7 @@ max = unsafeMakeAggregate toPrimExpr fromPrimExpr $
103+-- | Produce an aggregation for @Expr a@ using the @max@ function.
102min :: (DBMin db, Nullabilizes db a) => Expr a -> Aggregate (Expr a)
104min :: (DBMin db, Nullabilizes db a) => Expr a -> Aggregate (Expr a)
103min = unsafeMakeAggregate toPrimExpr fromPrimExpr $
105min = unsafeMakeAggregate toPrimExpr fromPrimExpr $
104 Just Aggregator
106 Just Aggregator
@@ -107,7 +109,7 @@ min = unsafeMakeAggregate toPrimExpr fromPrimExpr $
107 , distinction = Opaleye.AggrAll
109 , distinction = Opaleye.AggrAll
110−
112+-- | Corresponds to @sum@.
111sum :: (DBSum db, Nullabilizes db a) => Expr a -> Aggregate (Expr a)
113sum :: (DBSum db, Nullabilizes db a) => Expr a -> Aggregate (Expr a)
112sum = unsafeMakeAggregate toPrimExpr (castExpr . fromPrimExpr) $
114sum = unsafeMakeAggregate toPrimExpr (castExpr . fromPrimExpr) $
113 Just Aggregator
115 Just Aggregator