Added full join
Added tests and rebuild project
Merge pull request #91 from galkin/master

Added full join support
[Feature] Added new feature to allow union

Feature added to select query builder.

squel.select().field('field1').from('table1').union(squel.select().field('field1').from('table2'))

Fixes have also been applied to the mocha tests.  useFlavour was mixing the versions of select, update,... so tests would fail.  Now the flavour based tests force a reload of the squel module before each test.  Non-flavour based tests have been separated into their own test grouping and run first to prevent flavours from invalidating the test results.

Updates:
> A new UnionBlock has been created and added to the end of the select query builder.  Must be at the end to ensure the union statement occurs at the end of the first query.
> toParam() for numbered parameters has been catered for by adding a new option that is passed to the sub-select query builder.  The nestedBuilder option is used internal to the builder to only update the query parameters with numbered parameters if it is the parent query builder.
> Test cases added to select.test.coffee and postgres.test.coffee for union and toParam calls.
[BugFix/toParam] Add support for toParam to JoinBlock and AbstractTableBlock
[feature/toParam-nested] Allow param query inside where, JOIN condition, and expr

Added toParam support for expr() block when used in JOIN ON condition, or a where clause
Added new tests for JOIN on Condition using expr()
Added new tests for Expression block
Fixed updated build script.  After changing the build script, the select.test.coffee file was not running due to a typo in the grunt file.

There were some limitations with nesting a query, or expr() with a query, inside a where clause, or a JOIN condition and the use of toParam.  The nested queries were being converted to a string rather than doing a toParam, the string result was being added as the value for the parameter.  This is a potential sql injection risk.

Now the nested/inline query when provided as a parameter will be in a where clause will replace the parameter '?' with the textual component of the nested query, and add any parameters from the nested query to the parent query.

Example,

subqry = squel.select().field('col3').from('table2').where('col5 = ?', 'test1')
query = squel.select().field('col1').from('table1').where('col2 in ?', subqry)

query.toParam() gives:

{ text: "SELECT col1 FROM table1 WHERE (col2 IN (SELECT col3 FROM table2 WHERE (col5 = ?)))",
values: ['test1']
}

Previously it gave:

{ text: "SELECT col1 FROM table1 WHERE (col2 IN (?))",
values: ['SELECT col3 FROM table2 WHERE (col5 = 'test1')']
}
Merge branch 'feature/toParam-nested' of https://github.com/waterytowers/squel into feature/toParam-nested

Conflicts:
	squel-basic.js
	squel-basic.min.js
	squel.js
	squel.min.js
	src/postgres.coffee
	src/squel.coffee
	test/postgres.test.coffee