public class MultiVariableIntExecutionResult extends Object implements MultiExecutionResult
Modifier and Type | Field and Description |
---|---|
Deque<ExecutionResult> |
cachedExecutionResults |
Constructor and Description |
---|
MultiVariableIntExecutionResult(MariaDbStatement statement,
int size,
int fetchSize,
boolean selectPossible)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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() |
void |
addStatsError(boolean moreResultAvailable)
Add resutl information when an Exception occur during batch.
|
void |
close()
Close resultset if needed.
|
void |
fixStatsError(int sendCommand)
Add missing information when Exception is thrown.
|
int[] |
getAffectedRows()
Get update array.
|
Deque<ExecutionResult> |
getCachedExecutionResults() |
int |
getFetchSize() |
int |
getFirstAffectedRows() |
long[] |
getInsertIds()
Get insert ids.
|
long[] |
getInsertIdsForRewrite(int autoIncrementIncrement)
Generate insert id's array for rewrite operation.
|
MariaSelectResultSet |
getResultSet() |
MariaDbStatement |
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.
|
public Deque<ExecutionResult> cachedExecutionResults
public MultiVariableIntExecutionResult(MariaDbStatement statement, int size, int fetchSize, boolean selectPossible)
statement
- current statementsize
- initial data sizefetchSize
- resultet fetch sizeselectPossible
- is select command possiblepublic void addResultSet(MariaSelectResultSet result, boolean moreResultAvailable)
addResultSet
in interface ExecutionResult
result
- resultset implementationmoreResultAvailable
- is there additional packetpublic void addStats(long affectedRows, long insertId, boolean moreResultAvailable)
addStats
in interface ExecutionResult
affectedRows
- number of affected rowsinsertId
- primary keymoreResultAvailable
- is there additional packetpublic long[] getInsertIds()
getInsertIds
in interface ExecutionResult
public int[] getAffectedRows()
getAffectedRows
in interface MultiExecutionResult
public boolean hasMoreThanOneAffectedRows()
hasMoreThanOneAffectedRows
in interface ExecutionResult
public int getFirstAffectedRows()
getFirstAffectedRows
in interface ExecutionResult
getFirstAffectedRows
in interface MultiExecutionResult
public void addStatsError(boolean moreResultAvailable)
addStatsError
in interface ExecutionResult
moreResultAvailable
- has more result flagpublic void addStatsError()
public void fixStatsError(int sendCommand)
fixStatsError
in interface ExecutionResult
sendCommand
- send number of commandpublic int[] updateResultsForRewrite(int waitedSize, boolean hasException)
updateResultsForRewrite
in interface MultiExecutionResult
waitedSize
- batchSizehasException
- has exceptionpublic long[] getInsertIdsForRewrite(int autoIncrementIncrement)
autoIncrementIncrement
- connection AUTO_INCREMENT variablepublic int[] updateResultsMultiple(int waitedSize, boolean hasException)
updateResultsMultiple
in interface MultiExecutionResult
waitedSize
- batchSizehasException
- has exceptionpublic MariaSelectResultSet getResultSet()
getResultSet
in interface ExecutionResult
public MariaDbStatement getStatement()
getStatement
in interface ExecutionResult
public boolean hasMoreResultAvailable()
hasMoreResultAvailable
in interface ExecutionResult
protected void setMoreResultAvailable(boolean moreResultAvailable)
public int getFetchSize()
getFetchSize
in interface ExecutionResult
public void setFetchSize(int fetchSize)
setFetchSize
in interface ExecutionResult
public void close() throws SQLException
close
in interface ExecutionResult
SQLException
- if exception occur during resultset close.public boolean isSelectPossible()
isSelectPossible
in interface ExecutionResult
public boolean isCanHaveCallableResultset()
isCanHaveCallableResultset
in interface ExecutionResult
public Deque<ExecutionResult> getCachedExecutionResults()
getCachedExecutionResults
in interface ExecutionResult
public void addResult(ExecutionResult executionResult)
public boolean isSingleExecutionResult()
isSingleExecutionResult
in interface ExecutionResult
Copyright © 2016. All rights reserved.