org.mariadb.jdbc.internal.com.read.dao

## Class CmdInformationBatch

- java.lang.Object
- - org.mariadb.jdbc.internal.com.read.dao.CmdInformationBatch

All Implemented Interfaces:
  CmdInformation

    public class CmdInformationBatch
    extends Object
    implements CmdInformation

### Field Summary

### Fields inherited from interface org.mariadb.jdbc.internal.com.read.dao.CmdInformation

`RESULT_SET_VALUE`

### Constructor Summary

Constructors
Constructor and Description
`CmdInformationBatch(int expectedSize, int autoIncrement)` CmdInformationBatch is similar to CmdInformationMultiple, but knowing it's for batch, doesn't take take of moreResult.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addErrorStat()`
`void` `addResultSetStat()`
`void` `addSuccessStat(long updateCount, long insertId)`
`ResultSet` `getBatchGeneratedKeys(Protocol protocol)`
`int` `getCurrentStatNumber()`
`ResultSet` `getGeneratedKeys(Protocol protocol, String sql)` Return GeneratedKeys containing insert ids.
`long` `getLargeUpdateCount()`
`long[]` `getLargeUpdateCounts()`
`int[]` `getServerUpdateCounts()`
`int` `getUpdateCount()`
`int[]` `getUpdateCounts()`
`boolean` `isCurrentUpdateCount()`
`boolean` `moreResults()`
`void` `reset()` Clear error state, used for clear exception after first batch query, when fall back to per-query execution.
`void` `setRewrite(boolean rewritten)`

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

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

### Constructor Detail

#### CmdInformationBatch

    public CmdInformationBatch(int expectedSize,
                               int autoIncrement)

CmdInformationBatch is similar to CmdInformationMultiple, but knowing it's for batch, doesn't take take of moreResult. That permit to use ConcurrentLinkedQueue, and then when option "useBatchMultiSend" is set and batch is interrupted, will permit to reading thread to keep connection in a correct state without any ConcurrentModificationException.

Parameters:
  `expectedSize` - expected batch size.
  `autoIncrement` - connection auto increment value.

### Method Detail

#### addErrorStat

    public void addErrorStat()

Specified by:
  `addErrorStat` in interface `CmdInformation`

#### reset

    public void reset()

Clear error state, used for clear exception after first batch query, when fall back to per-query execution.

Specified by:
  `reset` in interface `CmdInformation`

#### addResultSetStat

    public void addResultSetStat()

Specified by:
  `addResultSetStat` in interface `CmdInformation`

#### addSuccessStat

    public void addSuccessStat(long updateCount,
                               long insertId)

Specified by:
  `addSuccessStat` in interface `CmdInformation`

#### getUpdateCounts

    public int[] getUpdateCounts()

Specified by:
  `getUpdateCounts` in interface `CmdInformation`

#### getServerUpdateCounts

    public int[] getServerUpdateCounts()

Specified by:
  `getServerUpdateCounts` in interface `CmdInformation`

#### getLargeUpdateCounts

    public long[] getLargeUpdateCounts()

Specified by:
  `getLargeUpdateCounts` in interface `CmdInformation`

#### getUpdateCount

    public int getUpdateCount()

Specified by:
  `getUpdateCount` in interface `CmdInformation`

#### getLargeUpdateCount

    public long getLargeUpdateCount()

Specified by:
  `getLargeUpdateCount` in interface `CmdInformation`

#### getBatchGeneratedKeys

    public ResultSet getBatchGeneratedKeys(Protocol protocol)

Specified by:
  `getBatchGeneratedKeys` in interface `CmdInformation`

#### getGeneratedKeys

    public ResultSet getGeneratedKeys(Protocol protocol,
                                      String sql)

Return GeneratedKeys containing insert ids. Insert ids are calculated using autoincrement value.

Specified by:
  `getGeneratedKeys` in interface `CmdInformation`
Parameters:
  `protocol` - current protocol
  `sql` - SQL command
Returns:
  a resultSet with insert ids.

#### getCurrentStatNumber

    public int getCurrentStatNumber()

Specified by:
  `getCurrentStatNumber` in interface `CmdInformation`

#### moreResults

    public boolean moreResults()

Specified by:
  `moreResults` in interface `CmdInformation`

#### isCurrentUpdateCount

    public boolean isCurrentUpdateCount()

Specified by:
  `isCurrentUpdateCount` in interface `CmdInformation`

#### setRewrite

    public void setRewrite(boolean rewritten)

Specified by:
  `setRewrite` in interface `CmdInformation`