Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Opaleye.Binary
Description
Binary relational operations on Select
s, that is, operations
which take two Select
s as arguments and return a single Select
.
All the binary relational operations have the same type specializations. For example:
unionAll :: S.Select (Field a, Field b) -> S.Select (Field a, Field b) -> S.Select (Field a, Field b)
Assuming the makeAdaptorAndInstance
splice has been run for the product type Foo
:
unionAll :: S.Select (Foo (Field a) (Field b) (Field c)) -> S.Select (Foo (Field a) (Field b) (Field c)) -> S.Select (Foo (Field a) (Field b) (Field c))
If you want to run a binary relational operator on
SelectArr
s you should apply bilaterally
to it, for example
bilaterally
union
::Default
Binaryspec
fields fields =>SelectArr
i fields ->SelectArr
i fields ->SelectArr
i fields
unionAll
is very close to being the <|>
operator of a
Control.Applicative.Alternative
instance but it fails to work
only because of the typeclass constraint it has.
Synopsis
- unionAll :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields
- union :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields
- intersectAll :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields
- intersect :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields
- exceptAll :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields
- except :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields
- unionAllExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields'
- unionExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields'
- intersectAllExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields'
- intersectExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields'
- exceptAllExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields'
- exceptExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields'
- binaryspecField :: Binaryspec (Field_ n a) (Field_ n a)
Binary operations
unionAll :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields Source #
union :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields Source #
The same as unionAll
, except that it additionally removes any
duplicate rows.
intersectAll :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields Source #
intersect :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields Source #
The same as intersectAll
, except that it additionally removes any
duplicate rows.
exceptAll :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields Source #
except :: Default Binaryspec fields fields => Select fields -> Select fields -> Select fields Source #
The same as exceptAll
, except that it additionally removes any
duplicate rows.
Explicit versions
unionAllExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields' Source #
unionExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields' Source #
intersectAllExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields' Source #
intersectExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields' Source #
exceptAllExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields' Source #
exceptExplicit :: Binaryspec fields fields' -> Select fields -> Select fields -> Select fields' Source #
Adaptors
binaryspecField :: Binaryspec (Field_ n a) (Field_ n a) Source #