hiddentao/squel — pull request #95 by waterytowers (2014-09-24 06:06:52+00:00)
Title: Feature/Union and toParam

A new PR to replace the previous Union feature PR https://github.com/hiddentao/squel/pull/93. New PR required due to rewriting the commits to cleanup a little and make the commit history cleaner.

Changes:
1> I have rebased against the latest version.

2> Added a new commit to address toParam issues with From and Join nested queries.

3> Fixes the mocha test issues I was having with postgres tests failing unless I added the Select class to the postgres flavour. The squel flavours were overlapping with each other and when the postgres flavour was in use, the select had already been overriden by the mysql flavour due to previous tests. I reality, you are unlikely to see this in a real app, unless you mix databases in the same app. I got around it by resetting the required module for each test in the flavour test, and running all other tests before the flavour specific tests.