Top Methods
com.mysql.cj.protocol

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

Known Direct Implementers
com.mysql.cj.protocol.a.BinaryResultsetReader, com.mysql.cj.protocol.a.ColumnDefinitionReader, com.mysql.cj.protocol.a.ResultsetRowReader, com.mysql.cj.protocol.a.TextResultsetReader
Imports
java.io.IOException, com.mysql.cj.exceptions.CJOperationNotSupportedException, .ExceptionFactory

Method Summary

Modifier and TypeMethod and Description
public default T
public default T

Returns:

a result set that either represents the rows, or an update count
read
(int
the maximum number of rows to read (-1 means all rows)
maxRows
,
boolean
should the driver leave the results on the wire, and read them only when needed?
streamResults
,
M
the first packet of information in the result set
resultPacket
,
ColumnDefinition
use this metadata instead of the one provided on wire
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.

Method Detail

readback to summary
public default T read(ProtocolEntityFactory<T, M> sf) throws IOException
Parameters
sf:ProtocolEntityFactory<T, M>

ProtocolEntityFactory instance

Returns:T

ProtocolEntity instance

Exceptions
IOException:
if an error occurs
readback to summary
public 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:int

the maximum number of rows to read (-1 means all rows)

streamResults:boolean

should the driver leave the results on the wire, and read them only when needed?

resultPacket:M

the first packet of information in the result set

metadata:ColumnDefinition

use this metadata instead of the one provided on wire

protocolEntityFactory:ProtocolEntityFactory<T, M>

ProtocolEntityFactory instance

Returns:T

a result set that either represents the rows, or an update count

Exceptions
IOException:
if an error occurs while reading the rows