opaleye-0.9.6.1: An SQL-generating DSL targeting PostgreSQL
Safe HaskellSafe-Inferred
LanguageHaskell2010

Opaleye.Lateral

Description

You will only need this module if you are using the arrow (SelectArr) interface to Opaleye. It is not needed when working only with Selects and using the monadic (do notation) interface.

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.