opaleye-0.6.7004.1: 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

:: (fieldsL -> fieldsR -> fieldsResult)

Calculate result fields from input fields

-> (fieldsL -> fieldsR -> Field SqlBool)

Condition on which to join

-> Select fieldsL

Left query

-> Select fieldsR

Right query

-> Select fieldsResult 

leftJoinF Source #

Arguments

:: (Default IfPP fieldsResult fieldsResult, Default Unpackspec fieldsL fieldsL, Default Unpackspec fieldsR fieldsR) 
=> (fieldsL -> fieldsR -> fieldsResult)

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

-> (fieldsL -> fieldsResult)

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

-> (fieldsL -> fieldsR -> Field SqlBool)

Condition on which to join

-> Select fieldsL

Left query

-> Select fieldsR

Right query

-> Select fieldsResult 

rightJoinF Source #

Arguments

:: (Default IfPP fieldsResult fieldsResult, Default Unpackspec fieldsL fieldsL, Default Unpackspec fieldsR fieldsR) 
=> (fieldsL -> fieldsR -> fieldsResult)

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

-> (fieldsR -> fieldsResult)

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

-> (fieldsL -> fieldsR -> Field SqlBool)

Condition on which to join

-> Select fieldsL

Left query

-> Select fieldsR

Right query

-> Select fieldsResult 

fullJoinF Source #

Arguments

:: (Default IfPP fieldsResult fieldsResult, Default Unpackspec fieldsL fieldsL, Default Unpackspec fieldsR fieldsR) 
=> (fieldsL -> fieldsR -> fieldsResult)

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

-> (fieldsL -> fieldsResult)

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

-> (fieldsR -> fieldsResult)

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

-> (fieldsL -> fieldsR -> Field SqlBool)

Condition on which to join

-> Select fieldsL

Left query

-> Select fieldsR

Right query

-> Select fieldsResult