public class SingleExecutionResult extends Object implements ExecutionResult
Constructor and Description |
---|
SingleExecutionResult(MariaDbStatement statement,
int fetchSize,
boolean selectPossible,
boolean canHaveCallableResultset)
Default constructor.
|
SingleExecutionResult(MariaDbStatement statement,
int fetchSize,
boolean selectPossible,
boolean canHaveCallableResultset,
boolean canHaveMoreResults)
Constructor with possible multiple results.
|
SingleExecutionResult(MariaDbStatement statement,
int fetchSize,
boolean selectPossible,
boolean canHaveCallableResultset,
long affectedRows,
long insertId)
Constructor with affected rows and insertIds.
|
SingleExecutionResult(MariaDbStatement statement,
int fetchSize,
boolean selectPossible,
boolean canHaveCallableResultset,
MariaSelectResultSet result)
Constructor with additional Resultset.
|
Modifier and Type | Method and Description |
---|---|
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) |
long |
getAffectedRows() |
Deque<ExecutionResult> |
getCachedExecutionResults() |
int |
getFetchSize() |
int |
getFirstAffectedRows() |
long |
getInsertId() |
long[] |
getInsertIds() |
MariaSelectResultSet |
getResultSet() |
MariaDbStatement |
getStatement() |
boolean |
hasMoreResultAvailable() |
boolean |
hasMoreThanOneAffectedRows() |
boolean |
isCanHaveCallableResultset() |
boolean |
isSelectPossible() |
boolean |
isSingleExecutionResult() |
void |
setFetchSize(int fetchSize) |
protected void |
setMoreResultAvailable(boolean moreResultAvailable) |
public SingleExecutionResult(MariaDbStatement statement, int fetchSize, boolean selectPossible, boolean canHaveCallableResultset)
statement
- current statementfetchSize
- fetch sizeselectPossible
- select result possiblecanHaveCallableResultset
- can be callablestatementpublic SingleExecutionResult(MariaDbStatement statement, int fetchSize, boolean selectPossible, boolean canHaveCallableResultset, boolean canHaveMoreResults)
statement
- current statementfetchSize
- fetch sizeselectPossible
- select result possiblecanHaveCallableResultset
- can be callablestatementcanHaveMoreResults
- tell that results may have multiple resultsetpublic SingleExecutionResult(MariaDbStatement statement, int fetchSize, boolean selectPossible, boolean canHaveCallableResultset, long affectedRows, long insertId)
statement
- current statementfetchSize
- fetch sizeselectPossible
- select result possiblecanHaveCallableResultset
- can be callablestatementaffectedRows
- affected rowsinsertId
- insert id (auto generated)public SingleExecutionResult(MariaDbStatement statement, int fetchSize, boolean selectPossible, boolean canHaveCallableResultset, MariaSelectResultSet result)
statement
- current statementfetchSize
- fetch sizeselectPossible
- select result possiblecanHaveCallableResultset
- can be callablestatementresult
- resultsetpublic 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 long getInsertId()
public long getAffectedRows()
public boolean hasMoreThanOneAffectedRows()
hasMoreThanOneAffectedRows
in interface ExecutionResult
public int getFirstAffectedRows()
getFirstAffectedRows
in interface ExecutionResult
public void addStatsError(boolean moreResultAvailable)
addStatsError
in interface ExecutionResult
public void fixStatsError(int sendCommand)
fixStatsError
in interface ExecutionResult
public 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 boolean isSingleExecutionResult()
isSingleExecutionResult
in interface ExecutionResult
Copyright © 2016. All rights reserved.