SoqlWhereCondition
Each condition listed in SoqlWhereCondition represents a condition expression in a SOQL WHERE clause that compares a field value to a comparison value using a condition operator. Each condition contains the following properties.
| Name | Type | Description |
|---|---|---|
| field | string | The object field used by the filter condition. |
| operator | soqlOperator | The filter operation. Operations include:
|
| values | string[] | A list of one or more values used to compare with the field value using the operator comparison logic. |
Evaluating SoqlWhereConditions
In the SOAP API, Salesforce uses subclasses of SoqlWhereCondition to represent different categories of conditions. Use your development language’s type comparison functionality (such as Java’s instanceof operator) to determine which subclass is used for a particular instance of SoqlWhereCondition.
The SoqlConditionGroup subclass represents a group of SOQL WHERE clause conditions and uses the following properties.
| Name | Type | Description |
|---|---|---|
| conditions | condition[] | List of filter conditions. If the list view uses filter logic, each logical filter group is represented with a conditions list. |
| conjunction | soqlConjunction | A conjunction operation that describes the filter logic to use for multiple conditions
in a logical filter group. Values include:
|
The SoqlNotCondition subclass represents a special use of the like operator. In API version 40.0 and earlier, when evaluating a SoqlWhereCondition that was created using a not like operator (displayed as does not contain in the UI), the operator value in the condition is like. Salesforce also uses the SoqlNotCondition subclass of SoqlWhereCondition to represent the complete condition. The following example uses Java’s instanceof operator to determine whether a not like operation is specified.
1if (resultSoqlWhereCondition instanceof SoqlNotCondition) {
2 // condition is really NOT condition
3 // if operator is "like", this condition really means "not like"
4 ...
5}In API version 41.0 and later, the notLike operator is used instead of SoqlNotCondition and a like operator. The notLike operator is available only for list views. You can’t use it in SOQL queries used in other Salesforce features.