QCubed Query Conditions

All QCubed Query method calls require a Condition. Conditions allow you to create a nested/hierarchical set of conditions to describe what essentially becomes your WHERE clause in a SQL query statement.

The following is the list of Condition classes and what parameters they take:

For almost all of the above Conditions, you are comparing a column with some value. The Node parameter represents that column. However, the value can be either a static value (like an integer, a string, a datetime, etc.) or it can be another Node.

And finally, there are three special Condition classes which take in any number of additional Condition classes:

(conditions can be passed in as parameters and/or as arrays)

Because And/Or/Not conditions can take in any other condition, including other And/Or/Not conditions, you can embed these conditions into other conditions to create what ends up being a logic tree for your entire SQL Where clause. See below for more information on this.

Select all People where: the first name is alphabetically "greater than" the last name

Select all Projects where: the manager's first name is alphabetically "greater than" the last name, or who's name contains "Website"

Select all Projects where: the Project ID <= 2 AND (the manager's first name is alphabetically "greater than" the last name, or who's name contains "Website")