Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- distinct :: Default Distinctspec fields fields => Select fields -> Select fields
- distinctExplicit :: Distinctspec fields fields' -> Query fields -> Query fields'
Documentation
distinct :: Default Distinctspec fields fields => Select fields -> Select fields Source #
Remove duplicate rows from the Select
.
Example type specialization:
distinct :: Select (Field a, Field b) -> Select (Field a, Field b)
Assuming the makeAdaptorAndInstance
splice has been run for the product type Foo
:
distinct :: Select (Foo (Field a) (Field b) (Field c)) -> Select (Foo (Field a) (Field b) (Field c))
By design there is no distinct
function of type SelectArr a b ->
SelectArr a b
. Such a function would allow violation of SQL's
scoping rules and lead to invalid queries.
distinctExplicit :: Distinctspec fields fields' -> Query fields -> Query fields' Source #