> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: QueryClient<Schema>

> One query lifecycle, with recovery storage configured once.

[browser](/api/modules/browser).QueryClient

One query lifecycle, with recovery storage configured once.

## Type parameters

| Name | Type |
| :- | :- |
| `Schema` | extends [`GenericSchema`](/api/modules/server#genericschema) = [`GenericSchema`](/api/modules/server#genericschema) |

## Constructors

### constructor

• **new QueryClient**\<`Schema`>(`transport`, `recovery?`)

#### Type parameters

| Name | Type |
| :- | :- |
| `Schema` | extends [`GenericSchema`](/api/modules/server#genericschema) = [`GenericSchema`](/api/modules/server#genericschema) |

#### Parameters

| Name | Type |
| :- | :- |
| `transport` | [`QueryTransport`](/api/interfaces/browser.QueryTransport) |
| `recovery?` | [`QueryRecovery`](/api/interfaces/browser.QueryRecovery) \| () => `Promise`\<[`QueryRecovery`](/api/interfaces/browser.QueryRecovery)> |

## Methods

### reserve

▸ **reserve**(): `Promise`\<[`QueryReservation`](/api/classes/browser.QueryReservation)\<`Schema`>>

#### Returns

`Promise`\<[`QueryReservation`](/api/classes/browser.QueryReservation)\<`Schema`>>

***

### run

▸ **run**\<`Plan`>(`query`, `bounds?`): `Promise`\<[`QueryExecution`](/api/classes/browser.QueryExecution)\<[`QueryRow`](/api/modules/server#queryrow)\<`Schema`, `Plan`>>>

#### Type parameters

| Name |
| :- |
| `Plan` |

#### Parameters

| Name | Type |
| :- | :- |
| `query` | `ValidRelationalQuery`\<`Schema`, `Plan`> |
| `bounds` | [`QueryBounds`](/api/modules/browser#querybounds) |

#### Returns

`Promise`\<[`QueryExecution`](/api/classes/browser.QueryExecution)\<[`QueryRow`](/api/modules/server#queryrow)\<`Schema`, `Plan`>>>

***

### resume

▸ **resume**\<`Row`>(`reference`): [`QueryExecution`](/api/classes/browser.QueryExecution)\<`Row`>

#### Type parameters

| Name | Type |
| :- | :- |
| `Row` | `Record`\<`string`, [`Value`](/api/modules/values#value)> |

#### Parameters

| Name | Type |
| :- | :- |
| `reference` | [`QueryReference`](/api/modules/browser#queryreference) \| [`QueryExecutionId`](/api/modules/server#queryexecutionid)\<`Row`> |

#### Returns

[`QueryExecution`](/api/classes/browser.QueryExecution)\<`Row`>

***

### saved

▸ **saved**(): `Promise`\<[`QueryReference`](/api/modules/browser#queryreference)\[]>

#### Returns

`Promise`\<[`QueryReference`](/api/modules/browser#queryreference)\[]>

***

### explain

▸ **explain**\<`Plan`>(`query`, `bounds?`): `Promise`\<[`QueryPlan`](/api/interfaces/server.QueryPlan)>

#### Type parameters

| Name |
| :- |
| `Plan` |

#### Parameters

| Name | Type |
| :- | :- |
| `query` | `ValidRelationalQuery`\<`Schema`, `Plan`> |
| `bounds` | [`QueryBounds`](/api/modules/browser#querybounds) |

#### Returns

`Promise`\<[`QueryPlan`](/api/interfaces/server.QueryPlan)>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.