StreamingQuery class

Manages a streaming query result with optional buffer-size backpressure.

When maxBufferSize is set, addChunk waits when the number of delivered-but-not-consumed chunks would exceed that limit.

Constructors

StreamingQuery({int? maxBufferSize})
Creates a new StreamingQuery instance.

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxBufferSize → int?
Maximum number of chunks to buffer. Null = unbounded.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stream → Stream<ParsedRowBuffer>
Stream of parsed row buffers.
no setter

Methods

addChunk(ParsedRowBuffer chunk) → Future<void>
Adds a chunk. When maxBufferSize is set and the buffer is full, waits until the consumer reduces the count below maxBufferSize.
cancel() → Future<void>
Cancels the stream asynchronously.
clearBuffer() → void
Resets the pending count and unblocks any producer waiting on backpressure. Does not remove already-added events from the stream.
close() → void
Closes the stream.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited