org.mariadb.jdbc.internal.queryresults

## Class Results

- java.lang.Object
- - org.mariadb.jdbc.internal.queryresults.Results

Direct Known Subclasses:
  ResultsRewrite

    public class Results
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`Results()` Single Text query.
`Results(MariaDbStatement statement, int fetchSize, boolean batch, int expectedSize, boolean binaryFormat, int resultSetScrollType)` Default constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addResultSet(MariaSelectResultSet resultSet, boolean moreResultAvailable)` Add resultSet to results.
`void` `addStats(int updateCount, long insertId, boolean moreResultAvailable)` Add execution statistics.
`void` `addStatsError(boolean moreResultAvailable)` Indicate that result is an Error, to set appropriate results.
`void` `commandEnd()` Indicate that command / batch is finished, so set current resultSet if needed.
`MariaSelectResultSet` `getCallableResultSet()`
`CmdInformation` `getCmdInformation()`
`int` `getCurrentStatNumber()`
`int` `getExpectedSize()`
`int` `getFetchSize()`
`boolean` `getMoreResults(int current, Protocol protocol)` Position to next resultSet.
`MariaSelectResultSet` `getResultSet()`
`int` `getResultSetScrollType()`
`MariaDbStatement` `getStatement()`
`boolean` `isBatch()`
`boolean` `isBinaryFormat()`
`void` `loadFully(boolean skip, Protocol protocol)` Load fully current results.
`void` `removeFetchSize()`
`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

#### Results

    public Results()

Single Text query.

#### Results

    public Results(MariaDbStatement statement,
                   int fetchSize,
                   boolean batch,
                   int expectedSize,
                   boolean binaryFormat,
                   int resultSetScrollType)

Default constructor.

Parameters:
  `statement` - current statement
  `fetchSize` - fetch size
  `batch` - select result possible
  `expectedSize` - expected size
  `binaryFormat` - use binary protocol
  `resultSetScrollType` - one of the following `ResultSet` constants: `ResultSet.TYPE_FORWARD_ONLY`, `ResultSet.TYPE_SCROLL_INSENSITIVE`, or `ResultSet.TYPE_SCROLL_SENSITIVE`

### Method Detail

#### addStats

    public void addStats(int updateCount,
                         long insertId,
                         boolean moreResultAvailable)

Add execution statistics.

Parameters:
  `updateCount` - number of updated rows
  `insertId` - primary key
  `moreResultAvailable` - is there additional packet

#### addStatsError

    public void addStatsError(boolean moreResultAvailable)

Indicate that result is an Error, to set appropriate results.

Parameters:
  `moreResultAvailable` - indicate if other results (ResultSet or updateCount) are available.

#### getCurrentStatNumber

    public int getCurrentStatNumber()

#### addResultSet

    public void addResultSet(MariaSelectResultSet resultSet,
                             boolean moreResultAvailable)

Add resultSet to results.

Parameters:
  `resultSet` - new resultSet.
  `moreResultAvailable` - indicate if other results (ResultSet or updateCount) are available.

#### getCmdInformation

    public CmdInformation getCmdInformation()

#### commandEnd

    public void commandEnd()

Indicate that command / batch is finished, so set current resultSet if needed.

#### getResultSet

    public MariaSelectResultSet getResultSet()

#### getCallableResultSet

    public MariaSelectResultSet getCallableResultSet()

#### loadFully

    public void loadFully(boolean skip,
                          Protocol protocol)
                   throws SQLException,
                          QueryException

Load fully current results. Lock must be set before using this method

Parameters:
  `skip` - must result be available afterwhile
  `protocol` - current protocol
Throws:
  `SQLException` - if any connection error occur
  `QueryException` - if any connection error occur

#### getMoreResults

    public boolean getMoreResults(int current,
                                  Protocol protocol)
                           throws SQLException

Position to next resultSet.

Parameters:
  `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_RESULTS`
  `protocol` - current protocol
Returns:
  true if other resultSet exists.
Throws:
  `SQLException` - if any connection error occur.

#### getFetchSize

    public int getFetchSize()

#### getStatement

    public MariaDbStatement getStatement()

#### isBatch

    public boolean isBatch()

#### setCmdInformation

    protected void setCmdInformation(CmdInformation cmdInformation)

#### getExpectedSize

    public int getExpectedSize()

#### isBinaryFormat

    public boolean isBinaryFormat()

#### removeFetchSize

    public void removeFetchSize()

#### getResultSetScrollType

    public int getResultSetScrollType()