Package org.mariadb.jdbc.message.server
Class OkPacket
java.lang.Object
org.mariadb.jdbc.message.server.OkPacket
- All Implemented Interfaces:
Completion,ServerMessage
Ok packet parser see https://mariadb.com/kb/en/ok_packet/
-
Method Summary
Modifier and TypeMethodDescriptionlongget affected rowsbyte[]getInfo()Get ok packet info byte array.longGet last auto generated insert idstatic OkPacketparse(ReadableByteBuf buf, Context context) Parserstatic OkPacketparseWithInfo(ReadableByteBuf buf, Context context) Parser, keeping the info field
-
Method Details
-
parse
Parser- Parameters:
buf- packet buffercontext- connection context- Throws:
SQLException
-
parseWithInfo
Parser, keeping the info field- Parameters:
buf- packet buffercontext- 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
-