decodeBatchedStreamFrame function

ParsedRowBuffer decodeBatchedStreamFrame(
  1. Uint8List frame, {
  2. bool lazyStrings = false,
})

Decodes one complete batched-stream protocol frame.

Columnar v2 frames use BinaryProtocolParser.parseColumnarToTyped and are materialized to ParsedRowBuffer only when callers require row-major chunks. Row-major v1 frames use BinaryProtocolParser.parse directly.

Implementation

ParsedRowBuffer decodeBatchedStreamFrame(
  Uint8List frame, {
  bool lazyStrings = false,
}) {
  if (BinaryProtocolParser.isColumnarV2Message(frame)) {
    return parsedRowBufferFromTypedColumnar(
      BinaryProtocolParser.parseColumnarToTyped(
        frame,
        lazyStrings: lazyStrings,
      ),
    );
  }
  return BinaryProtocolParser.parse(frame, lazyStrings: lazyStrings);
}