public class Results extends Object
Constructor and Description |
---|
Results()
Single Text query
|
Results(MariaDbStatement statement,
int autoIncrement)
Constructor for specific statement.
|
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(SelectResultSet resultSet,
boolean moreResultAvailable)
Add resultSet to results.
|
void |
addStats(long updateCount,
long insertId,
boolean moreResultAvailable)
Add execution statistics.
|
void |
addStatsError(boolean moreResultAvailable)
Indicate that result is an Error, to set appropriate results.
|
void |
close() |
Results |
commandEnd()
Indicate that command / batch is finished, so set current resultSet if needed.
|
SelectResultSet |
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.
|
int |
getMaxFieldSize() |
boolean |
getMoreResults(int current,
Protocol protocol)
Position to next resultSet.
|
SelectResultSet |
getResultSet() |
int |
getResultSetScrollType() |
MariaDbStatement |
getStatement() |
boolean |
isBatch() |
boolean |
isBinaryFormat() |
void |
loadFully(boolean skip,
Protocol protocol)
Load fully current results.
|
void |
removeFetchSize() |
void |
reset(int fetchSize,
boolean batch,
int expectedSize,
boolean binaryFormat,
int resultSetScrollType)
Reset.
|
void |
setAutoIncrement(int autoIncrement) |
protected void |
setCmdInformation(CmdInformation cmdInformation) |
public Results()
public Results(MariaDbStatement statement, int autoIncrement)
statement
- current Statement.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_SENSITIVE
autoIncrement
- Connection auto-increment valuepublic void reset(int fetchSize, boolean batch, int expectedSize, boolean binaryFormat, int resultSetScrollType)
fetchSize
- 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(long 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(SelectResultSet resultSet, boolean moreResultAvailable)
resultSet
- new resultSet.moreResultAvailable
- indicate if other results (ResultSet or updateCount) are available.public CmdInformation getCmdInformation()
public Results commandEnd()
public SelectResultSet getResultSet()
public SelectResultSet getCallableResultSet()
public void loadFully(boolean skip, Protocol protocol) throws SQLException
skip
- must result be available afterwhileprotocol
- current protocolSQLException
- 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()
public ResultSet getGeneratedKeys(Protocol protocol)
protocol
- current protocolpublic void close()
public int getMaxFieldSize()
public void setAutoIncrement(int autoIncrement)
Copyright © 2017. All rights reserved.