Package com.mysql.cj.protocol.a.result
Class AbstractResultsetRows
java.lang.Object
com.mysql.cj.protocol.a.result.AbstractResultsetRows
- All Implemented Interfaces:
ProtocolEntity
,ResultsetRows
,RowList
,java.util.Iterator<Row>
- Direct Known Subclasses:
ResultsetRowsCursor
,ResultsetRowsStatic
,ResultsetRowsStreaming
public abstract class AbstractResultsetRows extends java.lang.Object implements ResultsetRows
-
Field Summary
Fields Modifier and Type Field Description protected static int
BEFORE_START_OF_ROWS
protected int
currentPositionInFetchedRows
Position in cache of rows, used to determine if we need to fetch more rows from the server to satisfy a request for the next row.protected ColumnDefinition
metadata
Field-level metadata from the server.protected ResultsetRowsOwner
owner
The result set that we 'belong' to.protected ProtocolEntityFactory<ResultsetRow,NativePacketPayload>
rowFactory
protected boolean
wasEmpty
-
Constructor Summary
Constructors Constructor Description AbstractResultsetRows()
-
Method Summary
Modifier and Type Method Description ColumnDefinition
getMetadata()
ResultsetRowsOwner
getOwner()
Returns the result set that 'owns' this RowDatavoid
setMetadata(ColumnDefinition columnDefinition)
Sometimes the driver doesn't have metadata until after the statement has the result set in-hand (because it's cached), so it can call this to set it after the fact.void
setOwner(ResultsetRowsOwner rs)
Set the result set that 'owns' this RowDataboolean
wasEmpty()
Did this result set have no rows?Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mysql.cj.protocol.ResultsetRows
addRow, afterLast, beforeFirst, beforeLast, close, isAfterLast, isBeforeFirst, isDynamic, isEmpty, isFirst, isLast, moveRowRelative, setCurrentRow
-
Field Details
-
BEFORE_START_OF_ROWS
protected static final int BEFORE_START_OF_ROWS- See Also:
- Constant Field Values
-
metadata
Field-level metadata from the server. We need this, because it is not sent for each batch of rows, but we need the metadata to unpack the results for each field. -
currentPositionInFetchedRows
protected int currentPositionInFetchedRowsPosition in cache of rows, used to determine if we need to fetch more rows from the server to satisfy a request for the next row. -
wasEmpty
protected boolean wasEmpty -
owner
The result set that we 'belong' to. -
rowFactory
-
-
Constructor Details
-
AbstractResultsetRows
public AbstractResultsetRows()
-
-
Method Details
-
setOwner
Description copied from interface:ResultsetRows
Set the result set that 'owns' this RowData- Specified by:
setOwner
in interfaceResultsetRows
- Parameters:
rs
- the result set that 'owns' this RowData
-
getOwner
Description copied from interface:ResultsetRows
Returns the result set that 'owns' this RowData- Specified by:
getOwner
in interfaceResultsetRows
- Returns:
ResultsetRowsOwner
-
setMetadata
Description copied from interface:ResultsetRows
Sometimes the driver doesn't have metadata until after the statement has the result set in-hand (because it's cached), so it can call this to set it after the fact.- Specified by:
setMetadata
in interfaceResultsetRows
- Parameters:
columnDefinition
- field-level metadata for the result set
-
getMetadata
- Specified by:
getMetadata
in interfaceResultsetRows
-
wasEmpty
public boolean wasEmpty()Description copied from interface:ResultsetRows
Did this result set have no rows?- Specified by:
wasEmpty
in interfaceResultsetRows
- Returns:
- true if the result set did not have rows
-