bitemyapp / esqueleto

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

distinctOn #286

Open parsonsmatt opened 3 years ago

parsonsmatt commented 3 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.