Package org.mariadb.jdbc.message.server
Class OkPacket
- java.lang.Object
-
- org.mariadb.jdbc.message.server.OkPacket
-
- All Implemented Interfaces:
Completion,ServerMessage
public class OkPacket extends java.lang.Object implements Completion
Ok packet parser see https://mariadb.com/kb/en/ok_packet/
-
-
Field Summary
Fields Modifier and Type Field Description private longaffectedRowsprivate static OkPacketBASIC_OKprivate byte[]infoprivate longlastInsertIdprivate static Loggerlogger
-
Constructor Summary
Constructors Modifier Constructor Description privateOkPacket(long affectedRows, long lastInsertId, byte[] info)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAffectedRows()get affected rowsbyte[]getInfo()longgetLastInsertId()Get last auto generated insert idstatic OkPacketparse(ReadableByteBuf buf, Context context)Parserstatic OkPacketparseWithInfo(ReadableByteBuf buf, Context context)Parser
-
-
-
Method Detail
-
parse
public static OkPacket parse(ReadableByteBuf buf, Context context)
Parser- Parameters:
buf- packet buffercontext- connection context
-
parseWithInfo
public static OkPacket parseWithInfo(ReadableByteBuf buf, Context context)
Parser- Parameters:
buf- packet buffercontext- connection context
-
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()
-
-