rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Query.Distinct

Synopsis

Documentation

distinct :: EqTable a => Query a -> Query a Source #

Select all distinct rows from a query, removing duplicates. distinct q is equivalent to the SQL statement SELECT DISTINCT q.

distinctOn :: EqTable b => (a -> b) -> Query a -> Query a Source #

Select all distinct rows from a query, where rows are equivalent according to a projection. If multiple rows have the same projection, it is unspecified which row will be returned. If this matters, use distinctOnBy.

distinctOnBy :: EqTable b => (a -> b) -> Order a -> Query a -> Query a Source #

Select all distinct rows from a query, where rows are equivalent according to a projection. If there are multiple rows with the same projection, the first row according to the specified Order will be returned.