com.mysql.cj.protocol

## Interface Resultset

All Superinterfaces:
  ProtocolEntity

All Known Subinterfaces:
  ResultSetInternalMethods

    public interface Resultset
    extends ProtocolEntity

Represents protocol specific result set, eg., for native protocol, a ProtocolText::Resultset or ProtocolBinary::Resultset entity. See: http://dev.mysql.com/doc/internals/en/com-query-response.html#packet-ProtocolText::Resultset http://dev.mysql.com/doc/internals/en/binary-protocol-resultset.html

### Nested Class Summary

Nested Classes
`static class` `Resultset.Concurrency`
`static class` `Resultset.Type`

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `clearNextResultset()` Clears the reference to the next result set in a multi-result set "chain".
`ColumnDefinition` `getColumnDefinition()`
`Resultset` `getNextResultset()` Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.
`int` `getResultId()` The id (used when profiling) to identify us
`ResultsetRows` `getRows()`
`String` `getServerInfo()` Returns the server informational message returned from a DDL or DML statement (if any), or null if none.
`long` `getUpdateCount()` Returns the update count for this result set (if one exists), otherwise -1.
`long` `getUpdateID()` Returns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.
`boolean` `hasRows()` Does the result set contain rows, or is it the result of a DDL or DML statement?
`void` `initRowsWithMetadata()` Set metadata of this Resultset to ResultsetRows it contains.
`void` `setColumnDefinition(ColumnDefinition metadata)` Sometimes the driver doesn't have metadata before consuming the result set rows (because it's cached), or need to coerce the metadata returned by queries into that required by the particular specification (eg metadata returned by metadata queries into that required by the JDBC specification).
`void` `setNextResultset(Resultset nextResultset)`

### Method Detail

#### setColumnDefinition

    void setColumnDefinition(ColumnDefinition metadata)

Sometimes the driver doesn't have metadata before consuming the result set rows (because it's cached), or need to coerce the metadata returned by queries into that required by the particular specification (eg metadata returned by metadata queries into that required by the JDBC specification). So it can call this to set it after the fact.

Parameters:
  `metadata` - field-level metadata for the result set

#### getColumnDefinition

    ColumnDefinition getColumnDefinition()

#### hasRows

    boolean hasRows()

Does the result set contain rows, or is it the result of a DDL or DML statement?

Returns:
  true if result set contains rows

#### getRows

    ResultsetRows getRows()

#### initRowsWithMetadata

    void initRowsWithMetadata()

Set metadata of this Resultset to ResultsetRows it contains.

#### getResultId

    int getResultId()

The id (used when profiling) to identify us

Returns:
  result id

#### setNextResultset

    void setNextResultset(Resultset nextResultset)

Parameters:
  `nextResultset` - Sets the next result set in the result set chain for multiple result sets.

#### getNextResultset

    Resultset getNextResultset()

Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.

Returns:
  the next Resultset

#### clearNextResultset

    void clearNextResultset()

Clears the reference to the next result set in a multi-result set "chain".

#### getUpdateCount

    long getUpdateCount()

Returns the update count for this result set (if one exists), otherwise -1.

Returns:
  return the update count for this result set (if one exists), otherwise -1.

#### getUpdateID

    long getUpdateID()

Returns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.

Returns:
  the AUTO_INCREMENT value for the DDL/DML statement which created this result set.

#### getServerInfo

    String getServerInfo()

Returns the server informational message returned from a DDL or DML statement (if any), or null if none.

Returns:
  the server informational message

Copyright © 2016, 2023, Oracle and/or its affiliates.