SqlStream
Low-level helpers for adapting push-based SQL row sources into Effect streams.
SQL drivers often expose large query results through cursors, event emitters, or driver-specific streams that push rows as they arrive. This module provides the small interop layer used by SQL integrations to turn those producers into Stream values for Statement.stream and Connection.executeStream, so callers can process large result sets incrementally instead of materializing every row in memory.
Constructors
asyncPauseResume
Added in v4.0.0
Source
Signature
declare function asyncPauseResume<A, E = never, R = never>(register: (emit: {
readonly array: (arr: readonly Array<A>) => void;
readonly end: () => void;
readonly fail: (error: E) => void;
readonly single: (item: A) => void;
}) => Effect<{
onPause(): void;
onResume(): void;
}, E, Scope | R>, bufferSize: number): Stream<A, E, R>
Creates a stream from a callback-style producer with pause and resume callbacks that are triggered when the internal queue applies backpressure.