Skip to main content

WHERE

For more details check SOQLCache Cache API - WHERE.

NOTE! 🚨 All examples use inline queries built with the SOQL Lib Query Builder. If you are using a selector, replace SOQLCache.of(...) with YourCachedSelectorName.query().

SOQL

SELECT Id, Name, UserType
FROM Profile
WHERE Name = 'System Administrator'

SOQL Lib

SOQLCache.of(Profile.SObjectType)
.with(Profile.Id, Profile.Name, Profile.UserType)
.whereEqual(Profile.Name, 'System Administrator')
.toObject();

String​

SOQL

SELECT Id, Name, UserType
FROM Profile
WHERE Name = 'System Administrator'

SOQL Lib

SOQLCache.of(Profile.SObjectType)
.with(Profile.Id, Profile.Name, Profile.UserType)
.whereEqual('Name;, 'System Administrator')
.toObject();