> ## 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: AnswerExecution<Row, Kind>

> A reference to one execution, never authority to read it.

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

A reference to one execution, never authority to read it.

## Type parameters

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

## Constructors

### constructor

• **new AnswerExecution**\<`Row`, `Kind`>(`transport`, `answer_id`, `initial?`, `recovery?`, `expectedKind?`)

#### Type parameters

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

#### Parameters

| Name | Type |
| :- | :- |
| `transport` | `AnswerExecutionTransport`\<`Row`> |
| `answer_id` | [`AnswerId`](/api/modules/server#answerid)\<`Row`> |
| `initial?` | [`AnswerState`](/api/modules/server#answerstate)\<`Row`> |
| `recovery?` | [`AnswerRecovery`](/api/interfaces/browser.AnswerRecovery) \| () => `Promise`\<[`AnswerRecovery`](/api/interfaces/browser.AnswerRecovery)> |
| `expectedKind?` | `Kind` |

## Properties

### resultContract

• `Protected` `Readonly` **resultContract**: `Kind`

***

### transport

• `Protected` `Readonly` **transport**: `AnswerExecutionTransport`\<`Row`>

***

### answer\_id

• `Readonly` **answer\_id**: [`AnswerId`](/api/modules/server#answerid)\<`Row`>

***

### expectedKind

• `Protected` `Optional` **expectedKind**: `Kind`

## Methods

### snapshot

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

#### Returns

[`AnswerSnapshot`](/api/modules/browser#answersnapshot)\<`Row`>

***

### subscribe

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

#### Parameters

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

#### Returns

`fn`

▸ (): `void`

##### Returns

`void`

***

### update

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

#### Parameters

| Name | Type |
| :- | :- |
| `change` | `Partial`\<[`AnswerSnapshot`](/api/modules/browser#answersnapshot)\<`Row`>> |

#### Returns

`void`

***

### status

▸ **status**(`request?`): `Promise`\<[`AnswerState`](/api/modules/server#answerstate)\<`Row`>>

#### Parameters

| Name | Type |
| :- | :- |
| `request?` | \{ `mode`: `"collect"` ; `expression`: [`RelationExpression`](/api/modules/server#relationexpression) ; `max_rows`: `number` ; `max_bytes`: `number`  } & \{ `result?`: `"complete"` \| `"browse"`  } |

#### Returns

`Promise`\<[`AnswerState`](/api/modules/server#answerstate)\<`Row`>>

***

### explain

▸ **explain**(): `Promise`\<\{ `plan`: [`AnswerPlan`](/api/interfaces/server.AnswerPlan)  }>

Read the admitted plan through the execution's current native access gate.

#### Returns

`Promise`\<\{ `plan`: [`AnswerPlan`](/api/interfaces/server.AnswerPlan)  }>

***

### matches

▸ **matches**(`relation`, `bounds?`): `Promise`\<`boolean`>

Compare the admitted request at its owner, without disclosing relation
literals to recovery storage or submitting an unused reservation.

#### Parameters

| Name | Type |
| :- | :- |
| `relation` | [`Relation`](/api/classes/server.Relation)\<`unknown`> |
| `bounds` | [`AnswerBounds`](/api/modules/browser#answerbounds)\<[`AnswerKind`](/api/modules/server#answerkind)> |

#### Returns

`Promise`\<`boolean`>

***

### wait

▸ **wait**(`options?`): `Promise`\<`Extract`\<\{ `answer_id`: [`AnswerId`](/api/modules/server#answerid)\<`Row`> ; `question_binding?`: `Readonly`\<\{ `function`: `string` ; `contract_digest`: `string`  }> ; `deadline`: `string` ; `expires_at`: `string` ; `request_digest`: `string` ; `is_request_match?`: `boolean` ; `usage?`: [`AnswerUsage`](/api/interfaces/server.AnswerUsage)  } & \{ `state`: `"ready"` ; `plan`: [`AnswerPlan`](/api/interfaces/server.AnswerPlan) ; `basis`: \{ `kind`: `"dataset_snapshots"` ; `local_revision?`: `string` ; `inputs`: \{ `table`: `string` ; `dataset`: `string` ; `version`: `string` ; `metadata`: [`Value`](/api/modules/values#value)  }\[]  } | \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"`  } | \{ `kind`: `"federated"` ; `local_revision?`: `string` ; `remote`: \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"` ; `tables`: `string`\[]  }\[]  } ; `completed_at`: `string`  } & `Kind` extends `"complete"` ? \{ `result_kind`: `"complete"` ; `row_count`: `number` ; `result_digest`: `string`  } : \{ `result_kind`: `"browse"` ; `row_count`: `null` ; `result_digest?`: `undefined`  }, \{ `state`: `"ready"`  }>>

#### Parameters

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

#### Returns

`Promise`\<`Extract`\<\{ `answer_id`: [`AnswerId`](/api/modules/server#answerid)\<`Row`> ; `question_binding?`: `Readonly`\<\{ `function`: `string` ; `contract_digest`: `string`  }> ; `deadline`: `string` ; `expires_at`: `string` ; `request_digest`: `string` ; `is_request_match?`: `boolean` ; `usage?`: [`AnswerUsage`](/api/interfaces/server.AnswerUsage)  } & \{ `state`: `"ready"` ; `plan`: [`AnswerPlan`](/api/interfaces/server.AnswerPlan) ; `basis`: \{ `kind`: `"dataset_snapshots"` ; `local_revision?`: `string` ; `inputs`: \{ `table`: `string` ; `dataset`: `string` ; `version`: `string` ; `metadata`: [`Value`](/api/modules/values#value)  }\[]  } | \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"`  } | \{ `kind`: `"federated"` ; `local_revision?`: `string` ; `remote`: \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"` ; `tables`: `string`\[]  }\[]  } ; `completed_at`: `string`  } & `Kind` extends `"complete"` ? \{ `result_kind`: `"complete"` ; `row_count`: `number` ; `result_digest`: `string`  } : \{ `result_kind`: `"browse"` ; `row_count`: `null` ; `result_digest?`: `undefined`  }, \{ `state`: `"ready"`  }>>

***

### observe

▸ **observe**(`options?`): `AsyncGenerator`\<`Extract`\<\{ `answer_id`: [`AnswerId`](/api/modules/server#answerid)\<`Row`> ; `question_binding?`: `Readonly`\<\{ `function`: `string` ; `contract_digest`: `string`  }> ; `deadline`: `string` ; `expires_at`: `string` ; `request_digest`: `string` ; `is_request_match?`: `boolean` ; `usage?`: [`AnswerUsage`](/api/interfaces/server.AnswerUsage)  } & \{ `state`: `"ready"` ; `plan`: [`AnswerPlan`](/api/interfaces/server.AnswerPlan) ; `basis`: \{ `kind`: `"dataset_snapshots"` ; `local_revision?`: `string` ; `inputs`: \{ `table`: `string` ; `dataset`: `string` ; `version`: `string` ; `metadata`: [`Value`](/api/modules/values#value)  }\[]  } | \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"`  } | \{ `kind`: `"federated"` ; `local_revision?`: `string` ; `remote`: \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"` ; `tables`: `string`\[]  }\[]  } ; `completed_at`: `string`  } & `Kind` extends `"complete"` ? \{ `result_kind`: `"complete"` ; `row_count`: `number` ; `result_digest`: `string`  } : \{ `result_kind`: `"browse"` ; `row_count`: `null` ; `result_digest?`: `undefined`  }, \{ `state`: `"ready"`  }>, `any`, `unknown`>

Observe local custody revisions on the existing subscription transport.
Every revision hides managed pages before a full native status check.
Stopping observation leaves the durable execution and its custody intact.

#### Parameters

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

#### Returns

`AsyncGenerator`\<`Extract`\<\{ `answer_id`: [`AnswerId`](/api/modules/server#answerid)\<`Row`> ; `question_binding?`: `Readonly`\<\{ `function`: `string` ; `contract_digest`: `string`  }> ; `deadline`: `string` ; `expires_at`: `string` ; `request_digest`: `string` ; `is_request_match?`: `boolean` ; `usage?`: [`AnswerUsage`](/api/interfaces/server.AnswerUsage)  } & \{ `state`: `"ready"` ; `plan`: [`AnswerPlan`](/api/interfaces/server.AnswerPlan) ; `basis`: \{ `kind`: `"dataset_snapshots"` ; `local_revision?`: `string` ; `inputs`: \{ `table`: `string` ; `dataset`: `string` ; `version`: `string` ; `metadata`: [`Value`](/api/modules/values#value)  }\[]  } | \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"`  } | \{ `kind`: `"federated"` ; `local_revision?`: `string` ; `remote`: \{ `kind`: `"statement"` ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"` ; `tables`: `string`\[]  }\[]  } ; `completed_at`: `string`  } & `Kind` extends `"complete"` ? \{ `result_kind`: `"complete"` ; `row_count`: `number` ; `result_digest`: `string`  } : \{ `result_kind`: `"browse"` ; `row_count`: `null` ; `result_digest?`: `undefined`  }, \{ `state`: `"ready"`  }>, `any`, `unknown`>

***

### result

▸ **result**(`options?`): `Promise`\<[`AnswerResult`](/api/modules/browser#answerresult)\<`Row`, `Kind`>>

Select the typed result handle without collecting rows. Dynamic discovery uses this union.

#### Parameters

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

#### Returns

`Promise`\<[`AnswerResult`](/api/modules/browser#answerresult)\<`Row`, `Kind`>>

***

### cancel

▸ **cancel**(): `Promise`\<[`AnswerControl`](/api/interfaces/server.AnswerControl)\<`Row`>>

#### Returns

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

***

### release

▸ **release**(): `Promise`\<[`AnswerControl`](/api/interfaces/server.AnswerControl)\<`Row`>>

#### Returns

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


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