Class AbstractDataResult<T>

java.lang.Object
com.mysql.cj.xdevapi.AbstractDataResult<T>
Type Parameters:
T - Result entry type
All Implemented Interfaces:
ResultStreamer, QueryResult, Result, java.util.Iterator<T>
Direct Known Subclasses:
DocResultImpl, RowResultImpl

public abstract class AbstractDataResult<T>
extends java.lang.Object
implements ResultStreamer, java.util.Iterator<T>, Result
Base class for data set results.
  • Field Details

  • Constructor Details

  • Method Details

    • next

      public T next()
      Specified by:
      next in interface java.util.Iterator<T>
    • fetchAll

      public java.util.List<T> fetchAll()
      Create a list of all elements in the result forcing internal buffering.
      Returns:
      list of result elements
    • count

      public long count()
      Return the number of items in this result. Forces internal buffering of the entire result.
      Returns:
      number of elements in result
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface java.util.Iterator<T>
    • getStatementExecuteOk

      public StatementExecuteOk getStatementExecuteOk()
      Get StatementExecuteOk object finalizing the result transfer. Forces internal buffering of the entire result.
      Returns:
      StatementExecuteOk object
    • finishStreaming

      public void finishStreaming()
      Description copied from interface: ResultStreamer
      Finish 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.
      Specified by:
      finishStreaming in interface ResultStreamer
    • getAffectedItemsCount

      public long getAffectedItemsCount()
      Description copied from interface: Result
      Get the count of affected items from manipulation statements. This method forces internal buffering of the result.
      Specified by:
      getAffectedItemsCount in interface Result
      Returns:
      count
    • getWarningsCount

      public int getWarningsCount()
      Description copied from interface: Result
      Get the number of warnings generated during statement execution. This method forces internal buffering of the result.
      Specified by:
      getWarningsCount in interface Result
      Returns:
      number of warnings
    • getWarnings

      public java.util.Iterator<Warning> getWarnings()
      Description copied from interface: Result
      Get warnings generated during statement execution. This method forces internal buffering of the result.
      Specified by:
      getWarnings in interface Result
      Returns:
      iterator over warnings