on master help sign in
Upgrade countDistinct to work on any Sql DBEq a
8bdfd0bOllie Charles
src/Rel8/Expr/Aggregate.hs+1−1
@@ -58,7 +58,7 @@ count = unsafeMakeAggregate toPrimExpr fromPrimExpr $
58
58
59-- | Count the number of distinct occurances of a single column. Corresponds to
59-- | Count the number of distinct occurances of a single column. Corresponds to
60-- @COUNT(DISTINCT a)@
60-- @COUNT(DISTINCT a)@
61−countDistinct :: DBEq a => Expr a -> Aggregate (Expr Int64)
61+countDistinct :: Sql DBEq a => Expr a -> Aggregate (Expr Int64)
62countDistinct = unsafeMakeAggregate toPrimExpr fromPrimExpr $
62countDistinct = unsafeMakeAggregate toPrimExpr fromPrimExpr $
63 Just Aggregator
63 Just Aggregator
64 { operation = Opaleye.AggrCount
64 { operation = Opaleye.AggrCount