bitemyapp / esqueleto

New home of Esqueleto, please file issues so we can get things caught up!
BSD 3-Clause "New" or "Revised" License
370 stars 107 forks source link

distinctOn #286

Open parsonsmatt opened 2 years ago

parsonsmatt commented 2 years ago

distinctOn is a bit weird.

distinctOn :: [SqlExpr DistinctOn] -> SqlQuery a -> SqlQuery a
distinctOn exprs act = Q (W.tell mempty { sdDistinctClause = DistinctOn exprs }) >> act

It might as well just be distinctOn :: [SqlExpr DistinctOn] -> SqlQuery ().

Also, the docs indicate it only works on Postgres.

I propose we deprecate the term, and move the SqlQuery () variant into Database.Esqueleto.Postgres.