on dev help sign in
arrayAgg
commit64539b9e5502fda245812a34a7046a6d1e52b7dc authorEitan Chatav <eitan.chatav@gmail.com> dateSat 16 Feb 2019, 00:23 (8 years ago) parent5481afa
1 file changed+7
squeal-postgresql/src/Squeal/PostgreSQL/Expression.hs+7
squeal-postgresql/src/Squeal/PostgreSQL/Expression.hs+7
@@ -1457,6 +1457,11 @@ class Aggregate expr1 expr2 aggr
14571457 => expr1 (nullity ty)
14581458 -> aggr (nullity ty)
14591459
1460+ -- | input values, including nulls, concatenated into an array
1461+ arrayAgg
1462+ :: expr1 ty
1463+ -> aggr ('NotNull ('PGvararray ty))
1464+
14601465 -- | >>> :{
14611466 -- let
14621467 -- expression :: Expression ('Grouped bys) commons schemas params '[tab ::: '["col" ::: nullity 'PGint4]] (nullity 'PGint4)
@@ -1718,6 +1723,7 @@ instance Aggregate
17181723 countStar = UnsafeExpression "count(*)"
17191724 count = unsafeAggregate1 "count"
17201725 sum_ = unsafeAggregate1 "sum"
1726+ arrayAgg = unsafeAggregate1 "array_agg"
17211727 bitAnd = unsafeAggregate1 "bit_and"
17221728 bitOr = unsafeAggregate1 "bit_or"
17231729 boolAnd = unsafeAggregate1 "bool_and"
@@ -1751,6 +1757,7 @@ instance Aggregate
17511757 countStar = UnsafeWindowFunction "count(*)"
17521758 count = unsafeWindowFunction1 "count"
17531759 sum_ = unsafeWindowFunction1 "sum"
1760+ arrayAgg = unsafeWindowFunction1 "array_agg"
17541761 bitAnd = unsafeWindowFunction1 "bit_and"
17551762 bitOr = unsafeWindowFunction1 "bit_or"
17561763 boolAnd = unsafeWindowFunction1 "bool_and"