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 intBEFORE_START_OF_ROWSprotected intcurrentPositionInFetchedRowsPosition 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 ColumnDefinitionmetadataField-level metadata from the server.protected ResultsetRowsOwnerownerThe result set that we 'belong' to.protected ProtocolEntityFactory<ResultsetRow,NativePacketPayload>rowFactoryprotected booleanwasEmpty -
Constructor Summary
Constructors Constructor Description AbstractResultsetRows() -
Method Summary
Modifier and Type Method Description ColumnDefinitiongetMetadata()ResultsetRowsOwnergetOwner()Returns the result set that 'owns' this RowDatavoidsetMetadata(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.voidsetOwner(ResultsetRowsOwner rs)Set the result set that 'owns' this RowDatabooleanwasEmpty()Did this result set have no rows?Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ResultsetRowsSet the result set that 'owns' this RowData- Specified by:
setOwnerin interfaceResultsetRows- Parameters:
rs- the result set that 'owns' this RowData
-
getOwner
Description copied from interface:ResultsetRowsReturns the result set that 'owns' this RowData- Specified by:
getOwnerin interfaceResultsetRows- Returns:
ResultsetRowsOwner
-
setMetadata
Description copied from interface:ResultsetRowsSometimes 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:
setMetadatain interfaceResultsetRows- Parameters:
columnDefinition- field-level metadata for the result set
-
getMetadata
- Specified by:
getMetadatain interfaceResultsetRows
-
wasEmpty
public boolean wasEmpty()Description copied from interface:ResultsetRowsDid this result set have no rows?- Specified by:
wasEmptyin interfaceResultsetRows- Returns:
- true if the result set did not have rows
-