PrepareOkPacket.fromBuffer constructor

PrepareOkPacket.fromBuffer(
  1. ReadBuffer buffer
)

Implementation

factory PrepareOkPacket.fromBuffer(ReadBuffer buffer) {
  buffer.seek(1);
  int statementHandlerId = buffer.uint32;
  int columnCount = buffer.uint16;
  int parameterCount = buffer.uint16;
  buffer.skip(1);
  int warningCount = buffer.uint16;

  return PrepareOkPacket(
      statementHandlerId: statementHandlerId,
      columnCount: columnCount,
      parameterCount: parameterCount,
      warningCount: warningCount);
}