Skip to content

PipeStreamSession

Defined in: src/client/pipe.ts:86

StreamSession implementation for the pipe/subprocess transport. Drives lockstep streaming over a single bidirectional pipe: each PipeStreamSession.exchange or iteration step writes one input batch and reads one output batch. Holds the connection’s single-threaded busy lock until closed.

new PipeStreamSession(opts): PipeStreamSession;

Defined in: src/client/pipe.ts:100

Parameter Type
opts { externalConfig?: ExternalLocationConfig; header: Record<string, any> | null; onLog?: (msg) => void; outputSchema: Schema; reader: IpcStreamReader; releaseBusy: () => void; setDrainPromise: (p) => void; writeFn: WriteFn; }
opts.externalConfig? ExternalLocationConfig
opts.header Record<string, any> | null
opts.onLog? (msg) => void
opts.outputSchema Schema
opts.reader IpcStreamReader
opts.releaseBusy () => void
opts.setDrainPromise (p) => void
opts.writeFn WriteFn

PipeStreamSession

get header(): Record<string, any> | null;

Defined in: src/client/pipe.ts:121

The stream’s one-time header row, or null if the method declares no header.

Record<string, any> | null

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

StreamSession.header

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

Defined in: src/client/pipe.ts:294

Iterate over producer stream batches (lockstep).

AsyncIterableIterator<Record<string, any>[]>

StreamSession.[asyncIterator]


close(): void;

Defined in: src/client/pipe.ts:352

End the stream: close the input side (or send an empty stream if nothing was sent yet) and drain the server’s remaining output in the background, releasing the connection’s busy lock once the drain completes.

void

StreamSession.close


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

Defined in: src/client/pipe.ts:169

Send an exchange request and return the data rows.

Parameter Type
input Record<string, any>[]

Promise<Record<string, any>[]>

StreamSession.exchange