The clause to use.
The clause to use.
The clause to use.
This implementation is used to handle enclosing parentheses for an unknown number of OR operator usages.
This implementation is used to handle enclosing parentheses for an unknown number of OR operator usages.
Since an unlimited number of OR operators and conditions can be chained to form a single WHERE or AND clause,
we need a way to delimit the full clause by enclosing parentheses without knowing how many OR clauses there are or without knowing what the internals
of a clause look like. Clauses like the IN clause have their own set of parentheses.
An example: SELECT* FROM something WHERE (a = 5 OR a in (5, 10, 15))
.
Using the count parameter we can count the number of combinations in a manner invisible to the user. If the count is 0, append the left '(' and the right ')' and for everyone thereafter, remove the ')', add the new clause, add a ')', effectively always moving the right ')' to the end of the full WHERE or AND clause.
The QueryCondition to OR with.
A new QueryCondition, where the underlying query has been OR-ed.
This is a wrapper clause for primary conditions. They wrap the Clause used in a "WHERE" or "AND" query.
Only indexed columns can produce a QueryCondition via "WHERE" and "AND" operators.
The clause to use.