public class Results extends Object
| Constructor and Description |
|---|
Results(int autoIncrement)
Single Text query.
|
Results(MariaDbStatement statement,
int fetchSize,
boolean batch,
int expectedSize,
boolean binaryFormat,
int resultSetScrollType,
int autoIncrement)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResultSet(MariaSelectResultSet resultSet,
boolean moreResultAvailable)
Add resultSet to results.
|
void |
addStats(int updateCount,
long insertId,
boolean moreResultAvailable)
Add execution statistics.
|
void |
addStatsError(boolean moreResultAvailable)
Indicate that result is an Error, to set appropriate results.
|
void |
commandEnd()
Indicate that command / batch is finished, so set current resultSet if needed.
|
MariaSelectResultSet |
getCallableResultSet() |
CmdInformation |
getCmdInformation() |
int |
getCurrentStatNumber() |
int |
getExpectedSize() |
int |
getFetchSize() |
ResultSet |
getGeneratedKeys(Protocol protocol)
Send a resultSet that contain auto generated keys.
2 differences :
Batch will list all insert ids.
|
boolean |
getMoreResults(int current,
Protocol protocol)
Position to next resultSet.
|
MariaSelectResultSet |
getResultSet() |
int |
getResultSetScrollType() |
MariaDbStatement |
getStatement() |
boolean |
isBatch() |
boolean |
isBinaryFormat() |
void |
loadFully(boolean skip,
Protocol protocol)
Load fully current results.
|
void |
removeFetchSize() |
protected void |
setCmdInformation(CmdInformation cmdInformation) |
public Results(int autoIncrement)
autoIncrement - connection auto incrementpublic Results(MariaDbStatement statement, int fetchSize, boolean batch, int expectedSize, boolean binaryFormat, int resultSetScrollType, int autoIncrement)
statement - current statementfetchSize - fetch sizebatch - select result possibleexpectedSize - expected sizebinaryFormat - use binary protocolresultSetScrollType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEautoIncrement - connection auto incrementpublic void addStats(int updateCount,
long insertId,
boolean moreResultAvailable)
updateCount - number of updated rowsinsertId - primary keymoreResultAvailable - is there additional packetpublic void addStatsError(boolean moreResultAvailable)
moreResultAvailable - indicate if other results (ResultSet or updateCount) are available.public int getCurrentStatNumber()
public void addResultSet(MariaSelectResultSet resultSet, boolean moreResultAvailable)
resultSet - new resultSet.moreResultAvailable - indicate if other results (ResultSet or updateCount) are available.public CmdInformation getCmdInformation()
public void commandEnd()
public MariaSelectResultSet getResultSet()
public MariaSelectResultSet getCallableResultSet()
public void loadFully(boolean skip,
Protocol protocol)
throws SQLException,
QueryException
skip - must result be available afterwhileprotocol - current protocolSQLException - if any connection error occurQueryException - if any connection error occurpublic boolean getMoreResults(int current,
Protocol protocol)
throws SQLException
current - one of the following Statement constants indicating what should happen to current ResultSet objects
obtained using the method getResultSet: Statement.CLOSE_CURRENT_RESULT, Statement.KEEP_CURRENT_RESULT,
or Statement.CLOSE_ALL_RESULTSprotocol - current protocolSQLException - if any connection error occur.public int getFetchSize()
public MariaDbStatement getStatement()
public boolean isBatch()
protected void setCmdInformation(CmdInformation cmdInformation)
public int getExpectedSize()
public boolean isBinaryFormat()
public void removeFetchSize()
public int getResultSetScrollType()
public ResultSet getGeneratedKeys(Protocol protocol)
protocol - current protocolCopyright © 2017. All rights reserved.