Skip to content

The Soql.Request Class

Jason Siders edited this page Aug 19, 2025 · 4 revisions

Represents the parameters that the framework uses to process each SOQL statement. All requests include the structure ofthe query being processed, and the operation being processed.

This type cannot be manually constructed, and all of its properties are read-only. The framework auto-generates a Soql.Request object whenever you call a DatabaseLayer.Soql method.

Properties:

All properties are read-only, and optional unless otherwise otherwise stated:

Property Name Data Type Details
isMockSoql Boolean True if the request was processed using DatabaseLayer.useMocks(). Else, always False.
operation Soql.Operation The type of SOQL operation being processed.
query Soql The query object to be processed.
queryString String The text of the query to be processed.

JSON-Serialization

For logging purposes, you can safely JSON-serialize the Dml.Request, though Some of the properties of this class may be omitted to save on resources, or because they are not supported in JSON.

{
  "queryString": "SELECT Id FROM Account",
  "query": {
    "whereCriteria": {
      "logicType": "ALL_CONDITIONS",
      "criterion": []
    },
    "selectClauses": ["Id"],
    "orderByClauses": [],
    "havingCriteria": {
      "logicType": "ALL_CONDITIONS",
      "criterion": []
    },
    "groupByClauses": [],
    "entity": "Account",
    "binds": {},
    "accessLevelName": "USER_MODE"
  },
  "operation": "QUERY",
  "isMockSoql": false
}
Clone this wiki locally