Skip to content

QRY_Condition

Class · Group: Query Infrastructure

apex
global inherited sharing class QRY_Condition

Condition 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

Example

apex
QRY_Condition.OrCondition condition = new QRY_Condition.OrCondition();
condition.add(new QRY_Condition.FieldCondition(Account.Industry, QRY_Condition.Operator.EQUALS, 'Technology'));
condition.add(new QRY_Condition.FieldCondition(Account.Name).contains('Acme'));
List<Account> accounts = QRY_Builder.selectFrom(Account.SObjectType)
    .addCondition(condition)
    .toList();

See Also: QRY_Builder


Inner Classes

ClassDescription
AndConditionRepresents a SOQL "AND" condition group.
DateLiteralProvides SOQL date literal values for use in QRY_Builder conditions.
EvaluableInterface for condition classes.
FieldConditionRepresents a condition in a SOQL WHERE clause based on a specific field, operator, and value.
NestableInterface for condition containers that support adding nested conditions.
OperatorSOQL comparison operators used to build query conditions.
OrConditionRepresents a SOQL "OR" condition group.
SoqlOptionsOptions for SOQL generation.
UnitOfTimeUnits of time for SOQL date literals.