Skip to content

The Soql.Operator Class

Jason Siders edited this page Jul 3, 2025 · 6 revisions

Object used to represent the operator token in SOQL WHERE and HAVING clauses. The framework uses this to format these clauses.

All possible values are enumerates as public static final properties on the Soql class. This enables developers to interact with this class as if it were an enum of sorts:

Soql query = DatabaseLayer.Soql.newQuery(User.SObjectType)
  ?.addWhere(field, Soql.EQUALS, 'System Administrator')
  ?.toSoql();

Values

Property Operator
Soql.EQUALS =
Soql.NOT_EQUALS !=
Soql.IN_COLLECTION IN
Soql.NOT_IN_COLLECTION NOT IN
Soql.GREATER_THAN >
Soql.GREATER_OR_EQUAL >=
Soql.LESS_THAN <
Soql.LESS_OR_EQUAL <=
Soql.STARTS_WITH LIKE
Soql.NOT_STARTS_WITH NOT LIKE
Soql.ENDS_WITH LIKE
Soql.NOT_ENDS_WITH NOT LIKE
Soql.CONTAINS LIKE
Soql.NOT_CONTAINS NOT LIKE
Clone this wiki locally