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 ExecutionResultresult - resultset implementationmoreResultAvailable - is there additional packetpublic void addStats(long affectedRows,
long insertId,
boolean moreResultAvailable)
addStats in interface ExecutionResultaffectedRows - number of affected rowsinsertId - primary keymoreResultAvailable - is there additional packetpublic long[] getInsertIds()
getInsertIds in interface ExecutionResultpublic int[] getAffectedRows()
getAffectedRows in interface MultiExecutionResultpublic boolean hasMoreThanOneAffectedRows()
hasMoreThanOneAffectedRows in interface ExecutionResultpublic int getFirstAffectedRows()
getFirstAffectedRows in interface ExecutionResultgetFirstAffectedRows in interface MultiExecutionResultpublic void addStatsError(boolean moreResultAvailable)
addStatsError in interface ExecutionResultmoreResultAvailable - has more result flagpublic void addStatsError()
public void fixStatsError(int sendCommand)
fixStatsError in interface ExecutionResultsendCommand - send number of commandpublic int[] updateResultsForRewrite(int waitedSize,
boolean hasException)
updateResultsForRewrite in interface MultiExecutionResultwaitedSize - batchSizehasException - has exceptionpublic long[] getInsertIdsForRewrite(int autoIncrementIncrement)
autoIncrementIncrement - connection AUTO_INCREMENT variablepublic int[] updateResultsMultiple(int waitedSize,
boolean hasException)
updateResultsMultiple in interface MultiExecutionResultwaitedSize - batchSizehasException - has exceptionpublic MariaSelectResultSet getResultSet()
getResultSet in interface ExecutionResultpublic MariaDbStatement getStatement()
getStatement in interface ExecutionResultpublic boolean hasMoreResultAvailable()
hasMoreResultAvailable in interface ExecutionResultprotected void setMoreResultAvailable(boolean moreResultAvailable)
public int getFetchSize()
getFetchSize in interface ExecutionResultpublic void setFetchSize(int fetchSize)
setFetchSize in interface ExecutionResultpublic void close()
throws SQLException
close in interface ExecutionResultSQLException - if exception occur during resultset close.public boolean isSelectPossible()
isSelectPossible in interface ExecutionResultpublic boolean isCanHaveCallableResultset()
isCanHaveCallableResultset in interface ExecutionResultpublic Deque<ExecutionResult> getCachedExecutionResults()
getCachedExecutionResults in interface ExecutionResultpublic void addResult(ExecutionResult executionResult)
public boolean isSingleExecutionResult()
isSingleExecutionResult in interface ExecutionResultCopyright © 2016. All rights reserved.