Skip to content

Commit

Permalink
587 example
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjaguarpaw committed Jan 26, 2024
1 parent 2947b9c commit a9e6fe2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Test/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,15 @@ testStringArrayAggregateOrderedDistinct = it "" $ q `selectShouldReturnSorted` e
]
sortedData = L.sortBy (Ord.comparing snd) table7data

testStringArrayAggregateOrderedDistinct2 :: Test
testStringArrayAggregateOrderedDistinct2 = it "" $ q `selectShouldReturnSorted` expected
where q = O.aggregateOrdered
(O.asc snd)
(O.distinctAggregator (PP.p2 (O.groupBy, O.arrayAgg_)))
table7Q
expected :: [(String, [String])]
expected = [("bar",["a"]),("baz",["b"]),("foo",["c"])]

-- See
--
-- https://github.com/tomjaguarpaw/haskell-opaleye/pull/578#issuecomment-1782638274
Expand Down Expand Up @@ -1574,6 +1583,7 @@ main = do
testMultipleAggregateOrdered
testStringArrayAggregateOrdered
testStringArrayAggregateOrderedDistinct
testStringArrayAggregateOrderedDistinct2
testStringArrayAggregateOrderedDistinctDuplicateFields
testDistinctAndAggregate
testDoubleAggregate
Expand Down

0 comments on commit a9e6fe2

Please sign in to comment.