> ## 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: QueryReservation<Schema>

> An execution identity allocated before any query is submitted.

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

An execution identity allocated before any query is submitted.

## Type parameters

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

## Hierarchy

* [`QueryExecution`](/api/classes/browser.QueryExecution)

  ↳ **`QueryReservation`**

## Constructors

### constructor

• **new QueryReservation**\<`Schema`>(`transport`, `reservation`, `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) |
| `reservation` | [`QueryReservationState`](/api/modules/server#queryreservationstate) |
| `recovery?` | [`QueryRecovery`](/api/interfaces/browser.QueryRecovery) |

#### Overrides

[QueryExecution](/api/classes/browser.QueryExecution).[constructor](/api/classes/browser.QueryExecution#constructor)

## Properties

### transport

• `Protected` `Readonly` **transport**: [`QueryTransport`](/api/interfaces/browser.QueryTransport)

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[transport](/api/classes/browser.QueryExecution#transport)

***

### executionId

• `Readonly` **executionId**: [`QueryExecutionId`](/api/modules/server#queryexecutionid)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[executionId](/api/classes/browser.QueryExecution#executionid)

***

### expiresAt

• `Readonly` **expiresAt**: `string`

## Methods

### snapshot

▸ `Readonly` **snapshot**(): [`QuerySnapshot`](/api/modules/browser#querysnapshot)\<`Row`>

#### Returns

[`QuerySnapshot`](/api/modules/browser#querysnapshot)\<`Row`>

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[snapshot](/api/classes/browser.QueryExecution#snapshot)

***

### subscribe

▸ `Readonly` **subscribe**(`listener`): () => `void`

#### Parameters

| Name | Type |
| :- | :- |
| `listener` | () => `void` |

#### Returns

`fn`

▸ (): `void`

##### Returns

`void`

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[subscribe](/api/classes/browser.QueryExecution#subscribe)

***

### update

▸ `Protected` **update**(`change`): `void`

#### Parameters

| Name | Type |
| :- | :- |
| `change` | `Partial`\<[`QuerySnapshot`](/api/modules/browser#querysnapshot)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>> |

#### Returns

`void`

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[update](/api/classes/browser.QueryExecution#update)

***

### get

▸ **get**(): `Promise`\<[`QueryExecutionState`](/api/modules/server#queryexecutionstate)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>>

#### Returns

`Promise`\<[`QueryExecutionState`](/api/modules/server#queryexecutionstate)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>>

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[get](/api/classes/browser.QueryExecution#get)

***

### wait

▸ **wait**(`options?`): `Promise`\<\{ `executionId`: [`QueryExecutionId`](/api/modules/server#queryexecutionid)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>> ; `deadline`: `string` ; `expiresAt`: `string`  } & \{ `state`: `"ready"` ; `plan`: [`QueryPlan`](/api/interfaces/server.QueryPlan) ; `basis`: \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"`  } | \{ `kind`: `"federated"` ; `localRevision?`: `string` ; `remote`: \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` ; `tables`: `string`\[]  }\[]  } ; `rowCount`: `number`  }>

#### Parameters

| Name | Type |
| :- | :- |
| `options` | `Object` |
| `options.signal?` | `AbortSignal` |

#### Returns

`Promise`\<\{ `executionId`: [`QueryExecutionId`](/api/modules/server#queryexecutionid)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>> ; `deadline`: `string` ; `expiresAt`: `string`  } & \{ `state`: `"ready"` ; `plan`: [`QueryPlan`](/api/interfaces/server.QueryPlan) ; `basis`: \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"`  } | \{ `kind`: `"federated"` ; `localRevision?`: `string` ; `remote`: \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` ; `tables`: `string`\[]  }\[]  } ; `rowCount`: `number`  }>

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[wait](/api/classes/browser.QueryExecution#wait)

***

### pages

▸ **pages**(`options?`): `AsyncGenerator`\<[`QueryPage`](/api/modules/server#querypage)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>, `any`, `unknown`>

#### Parameters

| Name | Type |
| :- | :- |
| `options` | `Object` |
| `options.cursor?` | `string` |
| `options.limit?` | `number` |
| `options.signal?` | `AbortSignal` |

#### Returns

`AsyncGenerator`\<[`QueryPage`](/api/modules/server#querypage)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>, `any`, `unknown`>

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[pages](/api/classes/browser.QueryExecution#pages)

***

### result

▸ **result**(`options?`): `Promise`\<[`QueryResult`](/api/interfaces/server.QueryResult)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>>

Collect the same complete result, within the native row and byte bounds.

#### Parameters

| Name | Type |
| :- | :- |
| `options` | `Object` |
| `options.signal?` | `AbortSignal` |

#### Returns

`Promise`\<[`QueryResult`](/api/interfaces/server.QueryResult)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>>

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[result](/api/classes/browser.QueryExecution#result)

***

### cancel

▸ **cancel**(): `Promise`\<[`QueryControl`](/api/interfaces/server.QueryControl)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>>

#### Returns

`Promise`\<[`QueryControl`](/api/interfaces/server.QueryControl)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>>

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[cancel](/api/classes/browser.QueryExecution#cancel)

***

### release

▸ **release**(): `Promise`\<[`QueryControl`](/api/interfaces/server.QueryControl)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>>

#### Returns

`Promise`\<[`QueryControl`](/api/interfaces/server.QueryControl)\<`Record`\<`string`, [`Value`](/api/modules/values#value)>>>

#### Inherited from

[QueryExecution](/api/classes/browser.QueryExecution).[release](/api/classes/browser.QueryExecution#release)

***

### start

▸ **start**\<`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`>>>


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