# CompiledQuery (/docs/core/reference/api/interfaces/CompiledQuery)



[@kysoql/core](/docs/core/reference/api) / CompiledQuery

Compiled SOQL text paired with the immutable query AST that produced it.

## Type Parameters [#type-parameters]

| Type Parameter | Default type |
| -------------- | ------------ |
| `O`            | `unknown`    |

## Properties [#properties]

| Property                                           | Modifier   | Type                                                                       | Description                                                                   |
| -------------------------------------------------- | ---------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| <a id="api-property-query" /> `query`              | `readonly` | [`SelectQueryNode`](/docs/core/reference/api/type-aliases/SelectQueryNode) | Immutable operation tree that produced the compiled query.                    |
| <a id="api-property-soql" /> `soql`                | `readonly` | `string`                                                                   | Compiled SOQL text sent to Salesforce.                                        |
| <a id="api-property-outputtype" /> `[outputType]?` | `readonly` | `O`                                                                        | Type-only marker carrying the query output type; no runtime value is emitted. |
