Safe Haskell | None |
---|---|
Language | Haskell2010 |
Alternative APIs to inner, left, right, and full outer joins. See Opaleye.Join for details on the best way to do joins in Opaleye.
Synopsis
- fullJoinF :: (Default IfPP fieldsResult fieldsResult, Default Unpackspec fieldsL fieldsL, Default Unpackspec fieldsR fieldsR) => (fieldsL -> fieldsR -> fieldsResult) -> (fieldsL -> fieldsResult) -> (fieldsR -> fieldsResult) -> (fieldsL -> fieldsR -> Field SqlBool) -> Select fieldsL -> Select fieldsR -> Select fieldsResult
- joinF :: (fieldsL -> fieldsR -> fieldsResult) -> (fieldsL -> fieldsR -> Field SqlBool) -> Select fieldsL -> Select fieldsR -> Select fieldsResult
- leftJoinF :: (Default IfPP fieldsResult fieldsResult, Default Unpackspec fieldsL fieldsL, Default Unpackspec fieldsR fieldsR) => (fieldsL -> fieldsR -> fieldsResult) -> (fieldsL -> fieldsResult) -> (fieldsL -> fieldsR -> Field SqlBool) -> Select fieldsL -> Select fieldsR -> Select fieldsResult
- rightJoinF :: (Default IfPP fieldsResult fieldsResult, Default Unpackspec fieldsL fieldsL, Default Unpackspec fieldsR fieldsR) => (fieldsL -> fieldsR -> fieldsResult) -> (fieldsR -> fieldsResult) -> (fieldsL -> fieldsR -> Field SqlBool) -> Select fieldsL -> Select fieldsR -> Select fieldsResult
Full outer join
:: (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 |
Other joins
Inner join
It is recommended that instead of joinF
you use
restrict
directly (along with do
notatation, <*>
, or arrow notation).
Left/right joins
It is recommended that instead of leftJoinF
and rightJoinF
you use optional
.
:: (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 |
:: (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 |