Skip to content

PipeStreamSession

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

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:99

ParameterType
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.headerRecord<string, any> | null
opts.onLog?(msg) => void
opts.outputSchemaSchema
opts.readerIpcStreamReader
opts.releaseBusy() => void
opts.setDrainPromise(p) => void
opts.writeFnWriteFn

PipeStreamSession

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

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

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:293

Iterate over producer stream batches (lockstep).

AsyncIterableIterator<Record<string, any>[]>

StreamSession.[asyncIterator]


close(): void;

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

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:168

Send an exchange request and return the data rows.

ParameterType
inputRecord<string, any>[]

Promise<Record<string, any>[]>

StreamSession.exchange