Skip to content

The Soql.Usage Enum

Jason Siders edited this page Jul 4, 2025 · 4 revisions

Enumerates possible values to be used with various optional query suffixes.

Use this in conjunction with the setUsage builder method:

SELECT Id FROM Account FOR UPDATE
Soql query = DatabaseLayer.Soql.newQuery(Account.SObjectType)
  ?.setUsage(Soql.Usage.FOR_UPDATE)
  ?.toSoql();

Values

  • ALL_ROWS
  • FOR_VIEW
  • FOR_REFERENCE
  • FOR_UPDATE
Clone this wiki locally