Skip to content

StreamSession

Defined in: src/client/types.ts:33

A live streaming method call. Exchange methods drive the server with StreamSession.exchange; producer methods are consumed by async iteration. Always StreamSession.close when done.

readonly header: Record<string, any> | null;

Defined in: src/client/types.ts:35

The method’s header row (returned once at stream start), or null if the method declares no header.

asyncIterator: AsyncIterableIterator<Record<string, any>[]>;

Defined in: src/client/types.ts:39

Iterate the server-produced output batches one row-array at a time (producer streams).

AsyncIterableIterator<Record<string, any>[]>


close(): void;

Defined in: src/client/types.ts:41

Tear down the stream, flushing/draining the underlying transport.

void


exchange(input): Promise<Record<string, any>[]>;

Defined in: src/client/types.ts:37

Send one batch of input rows and receive the server’s corresponding output rows (exchange streams).

ParameterType
inputRecord<string, any>[]

Promise<Record<string, any>[]>