3. Querying in Qcodo
* Qcodo Query: The QQ Condition Classes
<< * Qcodo Query: The QQ Node Classes   |   Back to Main   |   * Qcodo Query: The QQ Clause Classes >>

View Source
will open in a new window
Qcodo Query Conditions
All Qcodo Query method calls require a QQ Condition. QQ 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 QQ Condition classes and what parameters they take: For almost all of the above QQ Conditions, you are comparing a column with some value. The QQ Node parameter represents that column. However, value can be either a static value (like an integer, a string, a datetime, etc.) or it can be another QQ Node.

And finally, there are three special QQ Condition classes which take in any number of additional QQ 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

Teo Dirac
Kendalll Jenner
Mike Ho
Wendy jose
Samantha prueba
Linda Brady
wdt t

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

ACME Website1 (managed by Karen Wolfe)
State College HR Sxzxxystem (managed by Mike Ho)
xx (managed by Teo Dirac)

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")

ACME Website1 (managed by Karen Wolfe)
State College HR Sxzxxystem (managed by Mike Ho)