# compileSingleRowExpression

# Function: compileSingleRowExpression()

```ts
function compileSingleRowExpression(expr): CompiledSingleRowExpression;
```

Defined in: [packages/db/src/query/compiler/evaluators.ts:83](https://github.com/TanStack/db/blob/main/packages/db/src/query/compiler/evaluators.ts#L83)

Compiles a single-row expression into an optimized evaluator function.

## Parameters

### expr

[`BasicExpression`](../@tanstack/namespaces/IR/type-aliases/BasicExpression.md)

## Returns

`CompiledSingleRowExpression`
