|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mariadb.jdbc.internal.com.read.dao.Results
public class Results
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Results()
Single Text query.
/! use internally, because autoincrement value is not right for multi-queries !/
public Results(MariaDbStatement statement,
int autoIncrement)
statement - current Statement.autoIncrement - connection auto-increment
public 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-increment value| Method Detail |
|---|
public 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()
protected void setCmdInformation(CmdInformation cmdInformation)
public Results commandEnd()
public SelectResultSet getResultSet()
public SelectResultSet getCallableResultSet()
public void loadFully(boolean skip,
Protocol protocol)
throws SQLException
Load fully current results.
Lock must be set before using this method
skip - must result be available afterwhileprotocol - current protocol
SQLException - if any connection error occur
public 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 protocol
SQLException - if any connection error occur.public int getFetchSize()
public MariaDbStatement getStatement()
public boolean isBatch()
public int getExpectedSize()
public boolean isBinaryFormat()
public void removeFetchSize()
public int getResultSetScrollType()
public ResultSet getGeneratedKeys(Protocol protocol)
example "INSERT INTO myTable values ('a'),('b');INSERT INTO myTable values ('c'),('d'),('e')" will have a resultSet of 2 values, and when Statement.getMoreResults() will be called, a Statement.getGeneratedKeys will return a resultset with 3 ids.
protocol - current protocol
public void close()
public int getMaxFieldSize()
public void setAutoIncrement(int autoIncrement)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||