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



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

Typed Salesforce DISTANCE() expression.

## Extended by [#extended-by]

* [`DistanceFunctionBuilder`](/docs/core/reference/api/interfaces/DistanceFunctionBuilder)

## Type Parameters [#type-parameters]

| Type Parameter                   |
| -------------------------------- |
| `Output`                         |
| `Filterable` *extends* `boolean` |
| `Sortable` *extends* `boolean`   |

## Methods [#methods]

<a id="api-tooperationnode" />

### toOperationNode() [#tooperationnode]

```ts
toOperationNode(): DistanceFunctionNode;
```

Returns the immutable operation node represented by this expression.

#### Returns [#returns]

[`DistanceFunctionNode`](/docs/core/reference/api/type-aliases/DistanceFunctionNode)

## Properties [#properties]

| Property                                                                                      | Modifier   | Type                    | Description                                                                                                        |
| --------------------------------------------------------------------------------------------- | ---------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------ |
| <a id="api-property-expressiontype" /> `expressionType`                                       | `readonly` | `Output` \| `undefined` | Type-only output marker used for fluent-query inference; implementations do not expose a meaningful runtime value. |
| <a id="api-property-distancefunctioncapabilitiestype" /> `[distanceFunctionCapabilitiesType]` | `readonly` | `object`                | Type-only marker used to preserve this expression capability through TypeScript inference.                         |
| `[distanceFunctionCapabilitiesType].filterable`                                               | `readonly` | `Filterable`            | Whether this distance expression may be used in `WHERE`.                                                           |
| `[distanceFunctionCapabilitiesType].sortable`                                                 | `readonly` | `Sortable`              | Whether this distance expression may be used in `ORDER BY`.                                                        |
