public class Results extends Object
Constructor and Description |
---|
Results()
Single Text query.
|
Results(MariaDbStatement statement,
int fetchSize,
boolean batch,
int expectedSize,
boolean binaryFormat,
int resultSetScrollType)
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() |
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()
public Results(MariaDbStatement statement, int fetchSize, boolean batch, int expectedSize, boolean binaryFormat, int resultSetScrollType)
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_SENSITIVE
public 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_RESULTS
protocol
- 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()
Copyright © 2016. All rights reserved.