streamQuery method
Runs sql in the worker and yields one ParsedRowBuffer.
Same as streamQueryBatched with default chunking; full result is
fetched then parsed. chunkSize is a hint.
When maxBufferBytes is set, caps the result buffer size.
Implementation
Stream<ParsedRowBuffer> streamQuery(
int connectionId,
String sql, {
int chunkSize = 1000,
int? maxBufferBytes,
}) async* {
final data = await executeQueryParams(
connectionId,
sql,
[],
maxBufferBytes: maxBufferBytes,
);
if (data == null || data.isEmpty) return;
yield BinaryProtocolParser.parse(data);
}