mothership-ec / cog

Cog
Other
2 stars 3 forks source link

More db join options (specifically allowing USING clauses) #464

Closed thomasjthomasj closed 8 years ago

thomasjthomasj commented 8 years ago

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:

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