public class SqlMultiResult extends java.lang.Object implements SqlResult, ResultStreamer
SqlResult
representing a multiple result sets.Constructor and Description |
---|
SqlMultiResult(java.util.function.Supplier<SqlResult> resultStream)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
count()
How many items are in this result? This method forces internal buffering of the entire result.
|
java.util.List<Row> |
fetchAll()
Create a list of all elements in the result forcing internal buffering.
|
void |
finishStreaming()
Finish the result streaming.
|
long |
getAffectedItemsCount()
Get the count of affected items from manipulation statements.
|
java.lang.Long |
getAutoIncrementValue()
Get the auto-increment value if one was generated from a row insert statement.
|
int |
getColumnCount()
Count of columns.
|
java.util.List<java.lang.String> |
getColumnNames()
Names of columns.
|
java.util.List<Column> |
getColumns()
Metadata.
|
java.util.Iterator<Warning> |
getWarnings()
Get warnings generated during statement execution.
|
int |
getWarningsCount()
Get the number of warnings generated during statement execution.
|
boolean |
hasData()
Does this result have data? This indicates that the result was produced from a data-returning query.
|
boolean |
hasNext() |
Row |
next() |
boolean |
nextResult()
Move to the next result.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fetchOne, iterator
public SqlMultiResult(java.util.function.Supplier<SqlResult> resultStream)
resultStream
- Supplies the result stream depending on query type. Could be SqlSingleResult
, SqlUpdateResult
etc.public boolean nextResult()
SqlResult
false
for the first time.nextResult
in interface SqlResult
public void finishStreaming()
ResultStreamer
finishStreaming
in interface ResultStreamer
public boolean hasData()
FetchResult
hasData
in interface FetchResult<Row>
public long getAffectedItemsCount()
Result
getAffectedItemsCount
in interface Result
public java.lang.Long getAutoIncrementValue()
InsertResult
getAutoIncrementValue
in interface InsertResult
getAutoIncrementValue
in interface SqlResult
public int getWarningsCount()
Result
getWarningsCount
in interface Result
public java.util.Iterator<Warning> getWarnings()
Result
getWarnings
in interface Result
public int getColumnCount()
RowResult
getColumnCount
in interface RowResult
public java.util.List<Column> getColumns()
RowResult
getColumns
in interface RowResult
Column
objectspublic java.util.List<java.lang.String> getColumnNames()
RowResult
getColumnNames
in interface RowResult
public long count()
FetchResult
count
in interface FetchResult<Row>
public java.util.List<Row> fetchAll()
FetchResult
fetchAll
in interface FetchResult<Row>
public boolean hasNext()
hasNext
in interface java.util.Iterator<Row>