Apex BOOST Library
v1.7 from Lucidware Solutions (LWS)

Query

global inherited sharing class Query
DescriptionUsing 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:
 // get user names where City starts with "San" (method chaining)
 User[] users = new aBoost.Query(User.SObjectType)
   .field(User.Name)
   .whereOp(User.City, 'LIKE', 'San%')
   .run();

 // get the number of contacts in Dallas accounts (complex query)
 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();

 // get the contacts in certain accounts (child query)
 Account[] results = new aBoost.Query(Account.SObjectType)
   .fields(new Query().createChildQuery(Contact.SObjectType, 'Contacts'))
   .whereIn(Account.Id, accounts)
   .run();
 

Constructors

  Query

  Query

Methods

  count

  createChildQuery

  field

  field

  fields

  fields

  fields

  fields

  fields

  fields

  groupBy

  groupBy

  groupBy

  groupBy

  locator

  orderBy

  orderBy

  orderBy

  orderBy

  orderBy

  orderBy

  orderBy

  orderBy

  run

  setEnforceSecurity

  setLimit

  setOffset

  toString

  whereAnd

  whereIn

  whereIn

  whereIn

  whereIn

  whereIn

  whereIn

  whereIn

  whereIn

  whereIn

  whereIn

  whereNotIn

  whereNotIn

  whereNotIn

  whereNotIn

  whereNotIn

  whereNotIn

  whereNotIn

  whereNotIn

  whereNotIn

  whereNotIn

  whereOp

  whereOp

  whereOp

  whereOr