org.mariadb.jdbc.internal.queryresults

## Class MultiFixedIntExecutionResult

- java.lang.Object
- - org.mariadb.jdbc.internal.queryresults.MultiFixedIntExecutionResult

All Implemented Interfaces:
  ExecutionResult, MultiExecutionResult

    public class MultiFixedIntExecutionResult
    extends Object
    implements MultiExecutionResult

### Field Summary

Fields
`Deque<ExecutionResult>` `cachedExecutionResults`

### Constructor Summary

Constructors
Constructor and Description
`MultiFixedIntExecutionResult(Statement statement, int size, int fetchSize, boolean selectPossible)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addResult(ExecutionResult executionResult)`
`void` `addResultSet(MariaSelectResultSet result, boolean moreResultAvailable)` Add a resultSet information.
`void` `addStats(long affectedRows, long insertId, boolean moreResultAvailable)` Add execution statistics.
`void` `addStatsError(boolean moreResultAvailable)`
`void` `close()` Close resultset if needed.
`void` `fixStatsError(int sendCommand)` Add missing information when Exception is thrown.
`int[]` `getAffectedRows()`
`Deque<ExecutionResult>` `getCachedExecutionResults()`
`int` `getCurrentStat()`
`int` `getFetchSize()`
`int` `getFirstAffectedRows()`
`long[]` `getInsertIds()`
`MariaSelectResultSet` `getResultSet()`
`Statement` `getStatement()`
`boolean` `hasMoreResultAvailable()`
`boolean` `hasMoreThanOneAffectedRows()`
`boolean` `isCanHaveCallableResultset()`
`boolean` `isSelectPossible()`
`boolean` `isSingleExecutionResult()`
`void` `setFetchSize(int fetchSize)`
`protected void` `setMoreResultAvailable(boolean moreResultAvailable)`
`int[]` `updateResultsForRewrite(int waitedSize, boolean hasException)` Set resultSet for rewrite queries.
`int[]` `updateResultsMultiple(int waitedSize, boolean hasException)` Set update resultSet right on multiple rewrite.

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

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

### Field Detail

#### cachedExecutionResults

    public Deque<ExecutionResult> cachedExecutionResults

### Constructor Detail

#### MultiFixedIntExecutionResult

    public MultiFixedIntExecutionResult(Statement statement,
                                        int size,
                                        int fetchSize,
                                        boolean selectPossible)

Constructor. Creating resultSet data with size according to datas.

Parameters:
  `statement` - current statement
  `size` - data size
  `fetchSize` - resultet fetch size
  `selectPossible` - is select command possible

### Method Detail

#### addResultSet

    public void addResultSet(MariaSelectResultSet result,
                             boolean moreResultAvailable)

Add a resultSet information.

Specified by:
  `addResultSet` in interface `ExecutionResult`
Parameters:
  `result` - resultset implementation
  `moreResultAvailable` - is there additional packet

#### addStats

    public void addStats(long affectedRows,
                         long insertId,
                         boolean moreResultAvailable)

Add execution statistics.

Specified by:
  `addStats` in interface `ExecutionResult`
Parameters:
  `affectedRows` - number of affected rows
  `insertId` - primary key
  `moreResultAvailable` - is there additional packet

#### getInsertIds

    public long[] getInsertIds()

Specified by:
  `getInsertIds` in interface `ExecutionResult`

#### getAffectedRows

    public int[] getAffectedRows()

Specified by:
  `getAffectedRows` in interface `MultiExecutionResult`

#### hasMoreThanOneAffectedRows

    public boolean hasMoreThanOneAffectedRows()

Specified by:
  `hasMoreThanOneAffectedRows` in interface `ExecutionResult`

#### getFirstAffectedRows

    public int getFirstAffectedRows()

Specified by:
  `getFirstAffectedRows` in interface `ExecutionResult`
Specified by:
  `getFirstAffectedRows` in interface `MultiExecutionResult`

#### addStatsError

    public void addStatsError(boolean moreResultAvailable)

Specified by:
  `addStatsError` in interface `ExecutionResult`

#### fixStatsError

    public void fixStatsError(int sendCommand)

Add missing information when Exception is thrown.

Specified by:
  `fixStatsError` in interface `ExecutionResult`
Parameters:
  `sendCommand` - send number of command

#### updateResultsForRewrite

    public int[] updateResultsForRewrite(int waitedSize,
                                         boolean hasException)

Set resultSet for rewrite queries. INSERT INTO XX VALUES (YYY) INSERT INTO XX VALUES (ZZZ) is rewritten INSERT INTO XX VALUES (YYY), (ZZZ) so modified row, will all be on the first row, or on a few rows : queries will split to have query size under the max_allowed_size, so data can be on multiple rows

Specified by:
  `updateResultsForRewrite` in interface `MultiExecutionResult`
Parameters:
  `waitedSize` - waited size
  `hasException` - has exception

#### updateResultsMultiple

    public int[] updateResultsMultiple(int waitedSize,
                                       boolean hasException)

Set update resultSet right on multiple rewrite. INSERT XXXX INSERT XXXX is rewritten INSERT XXXX;INSERT XXXX So affected rows and insert Id are separate in as many okPacket.

Specified by:
  `updateResultsMultiple` in interface `MultiExecutionResult`
Parameters:
  `waitedSize` - batchSize
  `hasException` - has exception

#### getResultSet

    public MariaSelectResultSet getResultSet()

Specified by:
  `getResultSet` in interface `ExecutionResult`

#### getStatement

    public Statement getStatement()

Specified by:
  `getStatement` in interface `ExecutionResult`

#### hasMoreResultAvailable

    public boolean hasMoreResultAvailable()

Specified by:
  `hasMoreResultAvailable` in interface `ExecutionResult`

#### setMoreResultAvailable

    protected void setMoreResultAvailable(boolean moreResultAvailable)

#### getFetchSize

    public int getFetchSize()

Specified by:
  `getFetchSize` in interface `ExecutionResult`

#### setFetchSize

    public void setFetchSize(int fetchSize)

Specified by:
  `setFetchSize` in interface `ExecutionResult`

#### close

    public void close()
               throws SQLException

Close resultset if needed.

Specified by:
  `close` in interface `ExecutionResult`
Throws:
  `SQLException` - if exception occur during resultset close.

#### isSelectPossible

    public boolean isSelectPossible()

Specified by:
  `isSelectPossible` in interface `ExecutionResult`

#### isCanHaveCallableResultset

    public boolean isCanHaveCallableResultset()

Specified by:
  `isCanHaveCallableResultset` in interface `ExecutionResult`

#### getCachedExecutionResults

    public Deque<ExecutionResult> getCachedExecutionResults()

Specified by:
  `getCachedExecutionResults` in interface `ExecutionResult`

#### addResult

    public void addResult(ExecutionResult executionResult)

#### isSingleExecutionResult

    public boolean isSingleExecutionResult()

Specified by:
  `isSingleExecutionResult` in interface `ExecutionResult`

#### getCurrentStat

    public int getCurrentStat()