opaleye-0.5.2.2: An SQL-generating DSL targeting PostgreSQL

Safe HaskellNone
LanguageHaskell2010

Opaleye.FunctionalJoin

Description

Left, right, and full outer joins.

The interface in this module is much nicer than the standard "make missing rows NULL" interface that SQL provides. If you really want the standard interface then use Opaleye.Join.

Documentation

joinF Source #

Arguments

:: (columnsL -> columnsR -> columnsResult)

Calculate result columns from input columns

-> (columnsL -> columnsR -> Column PGBool)

Condition on which to join

-> Query columnsL

Left query

-> Query columnsR

Right query

-> Query columnsResult 

leftJoinF Source #

Arguments

:: (Default IfPP columnsResult columnsResult, Default Unpackspec columnsL columnsL, Default Unpackspec columnsR columnsR) 
=> (columnsL -> columnsR -> columnsResult)

Calculate result row from input rows for rows in the right query satisfying the join condition

-> (columnsL -> columnsResult)

Calculate result row from input row when there are no rows in the right query satisfying the join condition

-> (columnsL -> columnsR -> Column PGBool)

Condition on which to join

-> Query columnsL

Left query

-> Query columnsR

Right query

-> Query columnsResult 

rightJoinF Source #

Arguments

:: (Default IfPP columnsResult columnsResult, Default Unpackspec columnsL columnsL, Default Unpackspec columnsR columnsR) 
=> (columnsL -> columnsR -> columnsResult)

Calculate result row from input rows for rows in the left query satisfying the join condition

-> (columnsR -> columnsResult)

Calculate result row from input row when there are no rows in the left query satisfying the join condition

-> (columnsL -> columnsR -> Column PGBool)

Condition on which to join

-> Query columnsL

Left query

-> Query columnsR

Right query

-> Query columnsResult 

fullJoinF Source #

Arguments

:: (Default IfPP columnsResult columnsResult, Default Unpackspec columnsL columnsL, Default Unpackspec columnsR columnsR) 
=> (columnsL -> columnsR -> columnsResult)

Calculate result row from input rows for rows in the left and right query satisfying the join condition

-> (columnsL -> columnsResult)

Calculate result row from left input row when there are no rows in the right query satisfying the join condition

-> (columnsR -> columnsResult)

Calculate result row from right input row when there are no rows in the left query satisfying the join condition

-> (columnsL -> columnsR -> Column PGBool)

Condition on which to join

-> Query columnsL

Left query

-> Query columnsR

Right query

-> Query columnsResult