Package com.mysql.cj.protocol
Interface ProtocolEntityReader<T extends ProtocolEntity,M extends Message>
- All Known Implementing Classes:
BinaryResultsetReader
,ColumnDefinitionReader
,ResultsetRowReader
,TextResultsetReader
public interface ProtocolEntityReader<T extends ProtocolEntity,M extends Message>
-
Method Summary
Modifier and Type Method Description 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 Details
-
read
- Parameters:
sf
-ProtocolEntityFactory
instance- Returns:
ProtocolEntity
instance- Throws:
java.io.IOException
- if an error occurs
-
read
default T read(int maxRows, boolean streamResults, M resultPacket, ColumnDefinition metadata, ProtocolEntityFactory<T,M> protocolEntityFactory) throws java.io.IOExceptionReads 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 setmetadata
- use this metadata instead of the one provided on wireprotocolEntityFactory
-ProtocolEntityFactory
instance- Returns:
- a result set that either represents the rows, or an update count
- Throws:
java.io.IOException
- if an error occurs while reading the rows
-