[API reference](https://evolu.dev/docs/api-reference) › [@evolu/sqlite-wasm](https://evolu.dev/docs/api-reference/sqlite-wasm) › SqliteStatement

Defined in: [packages/sqlite-wasm/src/Database.ts:427](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/Database.ts#L427)

A prepared statement. Running or disposing it during its own run, as from a
callback, throws.

## Extends

- [`Disposable`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html#using-declarations-and-explicit-resource-management)

## Properties

<a id="iterate"></a>

### iterate

```ts
readonly iterate: (parameters: readonly (
  | string
  | Uint8Array<ArrayBufferLike>
  | number & Brand<"NonNaN"> & Brand<"Finite">
| null)[], onRow: (row: SqliteRow) => boolean) => Result<void, SqliteRunError>;
```

Defined in: [packages/sqlite-wasm/src/Database.ts:451](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/Database.ts#L451)

Binds the parameters and steps the rows one at a time, passing each to
`onRow` until it returns false or the rows end, so no row after the one it
stops at is stepped. A query whose plan sorts, groups or aggregates still
reads all its input before the first row. Then it resets the statement,
also when a step fails or `onRow` throws, which it rethrows. When `onRow`
stops a write with RETURNING early, the reset commits it, and iterate
returns that commit's error.

The callback can run other statements and operations of the same database,
but not run, iterate or dispose this statement, which throws.

---

<a id="parametercount"></a>

### parameterCount

```ts
readonly parameterCount: number;
```

Defined in: [packages/sqlite-wasm/src/Database.ts:429](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/Database.ts#L429)

The number of SQL parameters, which each run must supply exactly.

---

<a id="run"></a>

### run

```ts
readonly run: (parameters: readonly (
  | string
  | Uint8Array<ArrayBufferLike>
  | number & Brand<"NonNaN"> & Brand<"Finite">
| null)[]) => Result<SqliteRunResult, SqliteRunError>;
```

Defined in: [packages/sqlite-wasm/src/Database.ts:435](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/Database.ts#L435)

Binds the parameters, steps to completion, collects the rows and resets the
statement, also when a step fails.

## Methods

<a id="dispose"></a>

### \[dispose\]()

```ts
[dispose](): void;
```

Defined in: node\_modules/@typescript/old/lib/lib.esnext.disposable.d.ts:34

#### Inherited from

```ts
Disposable.[dispose]
```