Skip to content

The Soql.SortDirection Enum

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

Indicates the direction of the SOQL ORDER BY clause.

Use this in conjunction with the addOrderBy builder method, and/or the Soql.SortOrder class.

Soql soql = DatabaseLayer.Soql
  ?.newQuery(Opportunity.SObjectType)
  ?.addOrderBy(Opportunity.Amount, Soql.SortDirection.DESCENDING)
  ?.toSoql();

Values

  • ASCENDING
  • DESCENDING
Clone this wiki locally