silverstripe/sapphire — pull request #808 by simonwelsh (2012-09-20 11:55:26+00:00)
Title: API Allow subgroups in the WHERE clause of a Data/SQLQuery

Adds three extra methods to Data/SQLQuery query that allow for starting
a disjunctive subgroup, a conjunctive subgroup and for ending a subgroup.

Database::sqlWhereToString() now builds up the WHERE clause one by one
instead of with a straight implode. Uses a stack to know which conenctive
to use.