This PR allows developers to use USING clauses when joining with the query builder, as well as be explicit about which clause to use, by adding the following methods:
joinUsing() - Perform a JOIN with the USING clause
joinOn() - Perform a JOIN with the ON clause
leftJoinUsing() - Perform a LEFT JOIN with the USING clause
leftJoinOn() - Perform a LEFT JOIN with the ON clause
These methods call join()/leftJoin(), but include a new forth parameter, $on, which takes a boolean and defaults to true. If it is set to true the join will use the ON clause, and if set to false the join will use the USING clause
Resolves https://github.com/mothership-ec/cog/issues/438
This PR allows developers to use
USING
clauses when joining with the query builder, as well as be explicit about which clause to use, by adding the following methods:joinUsing()
- Perform aJOIN
with theUSING
clausejoinOn()
- Perform aJOIN
with theON
clauseleftJoinUsing()
- Perform aLEFT JOIN
with theUSING
clauseleftJoinOn()
- Perform aLEFT JOIN
with theON
clauseThese methods call
join()
/leftJoin()
, but include a new forth parameter,$on
, which takes a boolean and defaults totrue
. If it is set totrue
the join will use theON
clause, and if set to false the join will use theUSING
clause