类 AbstractDataResult<T>
- java.lang.Object
-
- com.mysql.cj.xdevapi.AbstractDataResult<T>
-
- 类型参数:
T- Result entry type
- 所有已实现的接口:
ResultStreamer,QueryResult,Result,Iterator<T>
- 直接已知子类:
DocResultImpl,RowResultImpl
public abstract class AbstractDataResult<T> extends Object implements ResultStreamer, Iterator<T>, Result
Base class for data set results.
-
-
字段概要
字段 修饰符和类型 字段 说明 protected List<T>allList of all elements.protected java.util.function.Supplier<ProtocolEntity>completerprotected intcountprotected StatementExecuteOkokprotected intpositionprotected RowListrowsprotected ProtocolEntityFactory<T,XMessage>rowToData
-
构造器概要
构造器 构造器 说明 AbstractDataResult(RowList rows, java.util.function.Supplier<ProtocolEntity> completer, ProtocolEntityFactory<T,XMessage> rowToData)Constructor.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 longcount()Return the number of items in this result.List<T>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.StatementExecuteOkgetStatementExecuteOk()Get StatementExecuteOk object finalizing the result transfer.Iterator<Warning>getWarnings()Get warnings generated during statement execution.intgetWarningsCount()Get the number of warnings generated during statement execution.booleanhasNext()Tnext()-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 java.util.Iterator
forEachRemaining, remove
-
-
-
-
字段详细资料
-
position
protected int position
-
count
protected int count
-
rows
protected RowList rows
-
completer
protected java.util.function.Supplier<ProtocolEntity> completer
-
ok
protected StatementExecuteOk ok
-
rowToData
protected ProtocolEntityFactory<T,XMessage> rowToData
-
all
protected List<T> all
List of all elements.nulluntil requested viafetchAll().
-
-
构造器详细资料
-
AbstractDataResult
public AbstractDataResult(RowList rows, java.util.function.Supplier<ProtocolEntity> completer, ProtocolEntityFactory<T,XMessage> rowToData)
Constructor.- 参数:
rows-RowListobjectcompleter- Supplier for StatementExecuteOk objectrowToData-ProtocolEntityFactory
-
-
方法详细资料
-
fetchAll
public List<T> fetchAll()
Create a list of all elements in the result forcing internal buffering.- 返回:
- list of result elements
-
count
public long count()
Return the number of items in this result. Forces internal buffering of the entire result.- 返回:
- number of elements in result
-
getStatementExecuteOk
public StatementExecuteOk getStatementExecuteOk()
Get StatementExecuteOk object finalizing the result transfer. Forces internal buffering of the entire result.- 返回:
- StatementExecuteOk object
-
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
-
getAffectedItemsCount
public long getAffectedItemsCount()
从接口复制的说明:ResultGet the count of affected items from manipulation statements. This method forces internal buffering of the result.- 指定者:
getAffectedItemsCount在接口中Result- 返回:
- count
-
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
-
-