Package org.mariadb.jdbc.message.server

## Class OkPacket

- java.lang.Object
- - org.mariadb.jdbc.message.server.OkPacket

All Implemented Interfaces:
  `org.mariadb.jdbc.client.Completion`, `org.mariadb.jdbc.message.ServerMessage`

    public class OkPacket
    extends Object
    implements org.mariadb.jdbc.client.Completion

Ok packet parser see https://mariadb.com/kb/en/ok_packet/

### Constructor Summary

Constructors
`OkPacket​(org.mariadb.jdbc.client.ReadableByteBuf buf, org.mariadb.jdbc.client.Context context)` Parser

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getAffectedRows()` get affected rows
`long` `getLastInsertId()` Get last auto generated insert id

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### OkPacket

    public OkPacket​(org.mariadb.jdbc.client.ReadableByteBuf buf,
                    org.mariadb.jdbc.client.Context context)

Parser

Parameters:
  `buf` - packet buffer
  `context` - connection context

### Method Detail

#### getAffectedRows

    public long getAffectedRows()

get affected rows

Returns:
  affected rows

#### getLastInsertId

    public long getLastInsertId()

Get last auto generated insert id

Returns:
  last insert id