类 SqlMultiResult
- java.lang.Object
-
- com.mysql.cj.xdevapi.SqlMultiResult
-
- 所有已实现的接口:
ResultStreamer,QueryResult,FetchResult<Row>,InsertResult,Result,RowResult,SqlResult,Iterable<Row>,Iterator<Row>
public class SqlMultiResult extends Object implements SqlResult, ResultStreamer
SqlResultrepresenting a multiple result sets.
-
-
构造器概要
构造器 构造器 说明 SqlMultiResult(java.util.function.Supplier<SqlResult> resultStream)Constructor.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 longcount()How many items are in this result?List<Row>fetchAll()Create a list of all elements in the result forcing internal buffering.voidfinishStreaming()Finish the result streaming.longgetAffectedItemsCount()Get the count of affected items from manipulation statements.LonggetAutoIncrementValue()Get the auto-increment value if one was generated from a row insert statement.intgetColumnCount()Count of columns.List<String>getColumnNames()Names of columns.List<Column>getColumns()Metadata.Iterator<Warning>getWarnings()Get warnings generated during statement execution.intgetWarningsCount()Get the number of warnings generated during statement execution.booleanhasData()Does this result have data?booleanhasNext()Rownext()booleannextResult()Move to the next result.-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 com.mysql.cj.xdevapi.FetchResult
fetchOne, iterator
-
从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
从接口继承的方法 java.util.Iterator
forEachRemaining, remove
-
-
-
-
构造器详细资料
-
SqlMultiResult
public SqlMultiResult(java.util.function.Supplier<SqlResult> resultStream)
Constructor.- 参数:
resultStream- Supplies the result stream depending on query type. Could beSqlSingleResult,SqlUpdateResultetc.
-
-
方法详细资料
-
nextResult
public boolean nextResult()
从接口复制的说明:SqlResultMove to the next result. This method has no effect after returningfalsefor the first time.- 指定者:
nextResult在接口中SqlResult- 返回:
- was there a next result that we moved to?
-
finishStreaming
public void finishStreaming()
从接口复制的说明:ResultStreamerFinish the result streaming. This happens if a new command is started or the warnings/etc are requested. This is safe to call multiple times and only has an effect the first time.- 指定者:
finishStreaming在接口中ResultStreamer
-
hasData
public boolean hasData()
从接口复制的说明:FetchResultDoes this result have data? This indicates that the result was produced from a data-returning query. It does not indicate whether there are more than 0 rows in the result.- 指定者:
hasData在接口中FetchResult<Row>- 返回:
- true if has data
-
getAffectedItemsCount
public long getAffectedItemsCount()
从接口复制的说明:ResultGet the count of affected items from manipulation statements. This method forces internal buffering of the result.- 指定者:
getAffectedItemsCount在接口中Result- 返回:
- count
-
getAutoIncrementValue
public Long getAutoIncrementValue()
从接口复制的说明:InsertResultGet the auto-increment value if one was generated from a row insert statement.- 指定者:
getAutoIncrementValue在接口中InsertResult- 指定者:
getAutoIncrementValue在接口中SqlResult- 返回:
- auto-increment value
-
getWarningsCount
public int getWarningsCount()
从接口复制的说明:ResultGet the number of warnings generated during statement execution. This method forces internal buffering of the result.- 指定者:
getWarningsCount在接口中Result- 返回:
- number of warnings
-
getWarnings
public Iterator<Warning> getWarnings()
从接口复制的说明:ResultGet warnings generated during statement execution. This method forces internal buffering of the result.- 指定者:
getWarnings在接口中Result- 返回:
- iterator over warnings
-
getColumnCount
public int getColumnCount()
从接口复制的说明:RowResultCount of columns.- 指定者:
getColumnCount在接口中RowResult- 返回:
- count
-
getColumns
public List<Column> getColumns()
从接口复制的说明:RowResultMetadata.- 指定者:
getColumns在接口中RowResult- 返回:
- list of result
Columnobjects
-
getColumnNames
public List<String> getColumnNames()
从接口复制的说明:RowResultNames of columns.- 指定者:
getColumnNames在接口中RowResult- 返回:
- list of result column names
-
count
public long count()
从接口复制的说明:FetchResultHow many items are in this result? This method forces internal buffering of the entire result.- 指定者:
count在接口中FetchResult<Row>- 返回:
- number of elements in result
-
fetchAll
public List<Row> fetchAll()
从接口复制的说明:FetchResultCreate a list of all elements in the result forcing internal buffering.- 指定者:
fetchAll在接口中FetchResult<Row>- 返回:
- list of result elements
-
-