streamMultiStartBatched method

Future<int> streamMultiStartBatched(
  1. int connectionId,
  2. String sql, {
  3. int fetchSize = 1000,
  4. int chunkSize = 64 * 1024,
  5. int resultEncodingWire = 0,
})
inherited

Starts a streaming multi-result batch (M8 in v3.3.0). The chunks emitted by streamFetch follow the framed wire format documented in MultiResultStreamDecoder. Returns 0 when the loaded native library does not export the FFI.

Implementation

Future<int> streamMultiStartBatched(
  int connectionId,
  String sql, {
  int fetchSize = 1000,
  int chunkSize = 64 * 1024,
  int resultEncodingWire = 0,
}) async {
  final r = await _sendRequest<IntResponse>(
    StreamMultiStartBatchedRequest(
      _nextRequestId(),
      connectionId,
      sql,
      fetchSize: fetchSize,
      chunkSize: chunkSize,
      resultEncodingWire: resultEncodingWire,
    ),
  );
  return r.value;
}