streamMultiStartBatched method
Starts a streaming multi-result batch in batched mode.
Each chunk emitted by streamFetch belongs to a frame-based wire
format where every frame carries one multi-result item:
[tag: u8] [len: u32 LE] [payload: len bytes]
tag = 0 payload is a binary_protocol row-buffer; tag = 1 payload
is i64 LE row count. Use MultiResultStreamDecoder (Dart) to assemble
items as bytes accumulate. Returns the new stream id, or null when
the loaded native library predates v3.3.0.
Implementation
int? streamMultiStartBatched(
int connectionId,
String sql, {
int chunkSize = 64 * 1024,
}) {
if (!_bindings.supportsMultiResultStream) return null;
final sqlPtr = sql.toNativeUtf8();
try {
return _bindings.odbc_stream_multi_start_batched(
connectionId,
sqlPtr.cast<bindings.Utf8>(),
chunkSize,
);
} finally {
malloc.free(sqlPtr);
}
}