QRY_Condition
Class · Group: Query Infrastructure
apex
global inherited sharing class QRY_ConditionCondition infrastructure for building complex SOQL WHERE clauses. Use these classes with QRY_Builder.addCondition() for compound conditions that cannot be expressed with the fluent API alone (e.g., grouped OR conditions).
VISIBILITY: global for subscriber access.
- Evaluable interface: base type for all conditions
- Operator enum and constants: comparison operators
- FieldCondition: field comparisons (=, !=, <, >, LIKE, etc.)
- OrCondition/AndCondition: grouping conditions
Since: 1.0
Example:
apex
QRY_Condition.Evaluable condition = new QRY_Condition.OrCondition()
.add(new QRY_Condition.FieldCondition(Account.Industry).equals('Tech'))
.add(new QRY_Condition.FieldCondition(Account.Industry).equals('Finance'));
List<Account> accounts = QRY_Builder.selectFrom(Account.SObjectType)
.addCondition(condition)
.toList();See Also: QRY_Builder
Properties
| Property | Description |
|---|---|
| global virtual interface Evaluable | Interface for condition classes. |
| global interface Nestable | Interface for condition containers that support adding nested conditions. |
| global enum Operator | SOQL comparison operators used to build query conditions. |
| global enum UnitOfTime | Units of time for SOQL date literals. |
Inner Classes
| Class | Description |
|---|---|
| AndCondition | Represents a SOQL "AND" condition group. |
| DateLiteral | Provides SOQL date literal values for use in QRY_Builder conditions. |
| FieldCondition | Represents a condition in a SOQL WHERE clause based on a specific field, operator, and value. |
| OrCondition | Represents a SOQL "OR" condition group. |
| SoqlOptions | Options for SOQL generation. |