> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Interface: QueryDataStorage

Synchronous persistence supplied by the host; writes must replace a scope atomically or throw.

## Methods

### read()

> **read**(`scope`: `string`): `Readonly`\<`Record`\<`string`, `unknown`>> | `null`

Read saved Query results for a scope, or null when nothing has been saved.

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `scope`   | `string` |

#### Returns

`Readonly`\<`Record`\<`string`, `unknown`>> | `null`

***

### write()

> **write**(`scope`: `string`, `data`: [`InitialQueryResults`](/next/api/genui/openui/core/type-aliases/InitialQueryResults.md)): `void`

Persist the complete snapshot for a scope, throwing on failure.

#### Parameters

| Parameter | Type                                                                                     |
| --------- | ---------------------------------------------------------------------------------------- |
| `scope`   | `string`                                                                                 |
| `data`    | [`InitialQueryResults`](/next/api/genui/openui/core/type-aliases/InitialQueryResults.md) |

#### Returns

`void`
