MySQLPacket.decodeResultSetRowPacket constructor

MySQLPacket.decodeResultSetRowPacket(
  1. Uint8List buffer,
  2. List<MySQLColumnDefinitionPacket> colDefs, {
  3. List<bool>? binaryColumns,
})

Decodifica uma linha de ResultSet em formato textual MySQLResultSetRowPacket.

Implementation

factory MySQLPacket.decodeResultSetRowPacket(
    Uint8List buffer, List<MySQLColumnDefinitionPacket> colDefs,
    {List<bool>? binaryColumns}) {
  final header = decodePacketHeader(buffer);
  final offset = 4;
  final payload = MySQLResultSetRowPacket.decode(
    Uint8List.sublistView(buffer, offset),
    colDefs,
    binaryColumns: binaryColumns,
  );
  return MySQLPacket(
    sequenceID: header.item2,
    payloadLength: header.item1,
    payload: payload,
  );
}