com.mysql.cj.protocol

## Interface ProtocolEntityReader<T extends ProtocolEntity,M extends Message>

    public interface ProtocolEntityReader<T extends ProtocolEntity,M extends Message>

### Method Summary

All Methods Instance Methods Default Methods
`default T` `read(int maxRows, boolean streamResults, M resultPacket, ColumnDefinition metadata, ProtocolEntityFactory<T,M> protocolEntityFactory)` Reads one result set off of the wire, if the result is actually an update count, creates an update-count only result set.
`default T` `read(ProtocolEntityFactory<T,M> sf)`

### Method Detail

#### read

    default T read(ProtocolEntityFactory<T,M> sf)
            throws IOException

Parameters:
  `sf` - `ProtocolEntityFactory` instance
Returns:
  `ProtocolEntity` instance
Throws:
  `IOException` - if an error occurs

#### read

    default T read(int maxRows,
                   boolean streamResults,
                   M resultPacket,
                   ColumnDefinition metadata,
                   ProtocolEntityFactory<T,M> protocolEntityFactory)
            throws IOException

Reads one result set off of the wire, if the result is actually an update count, creates an update-count only result set.

Parameters:
  `maxRows` - the maximum number of rows to read (-1 means all rows)
  `streamResults` - should the driver leave the results on the wire, and read them only when needed?
  `resultPacket` - the first packet of information in the result set
  `metadata` - use this metadata instead of the one provided on wire
  `protocolEntityFactory` - `ProtocolEntityFactory` instance
Returns:
  a result set that either represents the rows, or an update count
Throws:
  `IOException` - if an error occurs while reading the rows

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