Class OkPacket

java.lang.Object
org.mariadb.jdbc.message.server.OkPacket
All Implemented Interfaces:
Completion, ServerMessage

public class OkPacket extends Object implements Completion
Ok packet parser see https://mariadb.com/kb/en/ok_packet/
  • Method Details

    • parse

      public static OkPacket parse(ReadableByteBuf buf, Context context) throws SQLException
      Parser
      Parameters:
      buf - packet buffer
      context - connection context
      Throws:
      SQLException
    • parseWithInfo

      public static OkPacket parseWithInfo(ReadableByteBuf buf, Context context) throws SQLException
      Parser, keeping the info field
      Parameters:
      buf - packet buffer
      context - connection context
      Returns:
      Ok_Packet object
      Throws:
      SQLException
    • getAffectedRows

      public long getAffectedRows()
      get affected rows
      Returns:
      affected rows
    • getLastInsertId

      public long getLastInsertId()
      Get last auto generated insert id
      Returns:
      last insert id
    • getInfo

      public byte[] getInfo()
      Get ok packet info byte array. That is usually a string value, but for first Ok_Packet, containing fingerprint info.
      Returns:
      info