Description | Using this class, a dynamic query can be constructed piece by piece, adding object and field type checking, which avoids typos and references to invalid fields. By default, 'WITH USER_MODE' will be added when executing the query. If any fields or objects referenced in the query are inaccessible to the user, a QueryException is thrown. This can be disabled, if desired. Usage:
User[] users = new aBoost.Query(User.SObjectType)
.field(User.Name)
.whereOp(User.City, 'LIKE', 'San%')
.run();
aBoost.Query dallasAccounts = new aBoost.Query(Account.SObjectType)
.whereOp(Account.City, '=', 'Dallas'));
Integer contactCount = new aBoost.Query(Contact.SObjectType)
.field(Contact.Name)
.whereIn(Contact.AccountId, dallasAccounts)
.count();
Account[] results = new aBoost.Query(Account.SObjectType)
.fields(new Query().createChildQuery(Contact.SObjectType, 'Contacts'))
.whereIn(Account.Id, accounts)
.run();
|
---|