opaleye-0.7.2.0: An SQL-generating DSL targeting PostgreSQL
Safe HaskellNone
LanguageHaskell2010

Opaleye.Lateral

Synopsis

Documentation

lateral :: (i -> Select a) -> SelectArr i a Source #

Implements LATERAL subqueries.

You might find it easier to use laterally (if you want to apply aggregate, orderBy or limit to a SelectArr) or bilaterally (if you want to apply union, intersect and except to two SelectArrs).

viaLateral :: SelectArr i a -> i -> Select a Source #

Convert an arrow argument into a function argument so that it can be applied inside do-notation rather than arrow notation.

laterally :: (Select a -> Select b) -> SelectArr i a -> SelectArr i b Source #

Lifts operations like aggregate, orderBy and limit, which are restricted to Select normally, to operate on SelectArrs taking arbitrary inputs.

bilaterally :: (Select a -> Select b -> Select c) -> SelectArr i a -> SelectArr i b -> SelectArr i c Source #

Lifts operations like union, intersect and except, which are restricted to Select normally, to operate on SelectArrs taking arbitrary inputs.