Top Description Fields Methods
com.mysql.cj.protocol

public Interface ResultsetRows

extends RowList, ProtocolEntity
Known Direct Implementers
com.mysql.cj.protocol.a.result.AbstractResultsetRows, com.mysql.cj.protocol.a.result.ResultsetRowsCursor, com.mysql.cj.protocol.a.result.ResultsetRowsStatic, com.mysql.cj.protocol.a.result.ResultsetRowsStreaming
Imports
com.mysql.cj.Messages, com.mysql.cj.exceptions.CJOperationNotSupportedException, .ExceptionFactory, com.mysql.cj.result.Row, .RowList

This interface abstracts away how row data is accessed by the result set. It is meant to allow a static implementation (Current version), and a streaming one. It extends the RowList functionality by providing row positioning, updatability and ownership.

Field Summary

Inherited from com.mysql.cj.result.RowList:
RESULT_SET_SIZE_UNKNOWN

Method Summary

Modifier and TypeMethod and Description
public default void
addRow(Row
the row to add
row
)

Adds a row.

public default void
afterLast()

Moves to after last.

public default void
beforeFirst()

Moves to before first.

public default void
beforeLast()

Moves to before last.

public default void
close()

We're done.

public ColumnDefinition
public ResultsetRowsOwner
getOwner()

Returns the result set that 'owns' this RowData

public boolean

Returns:

true if after last row
isAfterLast
()

Returns true if we got the last element.

public boolean

Returns:

true if before first row
isBeforeFirst
()

Returns if iteration has not occured yet.

public default boolean

Returns:

true if this result set is streaming from the server
isDynamic
()

Returns true if the result set is dynamic.

public default boolean

Returns:

true if no records
isEmpty
()

Has no records.

public default boolean

Returns:

true if on first row
isFirst
()

Are we on the first row of the result set?

public default boolean

Returns:

true if on last row
isLast
()

Are we on the last row of the result set?

public default void
moveRowRelative(int
the relative number of rows to move
rows
)

Moves the current position relative 'rows' from the current position.

public default void
setCurrentRow(int
row to move to
rowNumber
)

Moves the current position in the result set to the given row number.

public void
setMetadata(ColumnDefinition
field-level metadata for the result set
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.

public void
setOwner(ResultsetRowsOwner
the result set that 'owns' this RowData
rs
)

Set the result set that 'owns' this RowData

public boolean

Returns:

true if the result set did not have rows
wasEmpty
()

Did this result set have no rows?

Inherited from com.mysql.cj.result.RowList:
getgetPositionprevioussize

Method Detail

addRowback to summary
public default void addRow(Row row)

Adds a row.

Parameters
row:Row

the row to add

afterLastback to summary
public default void afterLast()

Moves to after last.

beforeFirstback to summary
public default void beforeFirst()

Moves to before first.

beforeLastback to summary
public default void beforeLast()

Moves to before last.

closeback to summary
public default void close()

We're done.

getMetadataback to summary
public ColumnDefinition getMetadata()
getOwnerback to summary
public ResultsetRowsOwner getOwner()

Returns the result set that 'owns' this RowData

Returns:ResultsetRowsOwner

ResultsetRowsOwner

isAfterLastback to summary
public boolean isAfterLast()

Returns true if we got the last element.

Returns:boolean

true if after last row

isBeforeFirstback to summary
public boolean isBeforeFirst()

Returns if iteration has not occured yet.

Returns:boolean

true if before first row

isDynamicback to summary
public default boolean isDynamic()

Returns true if the result set is dynamic. This means that move back and move forward won't work because we do not hold on to the records.

Returns:boolean

true if this result set is streaming from the server

isEmptyback to summary
public default boolean isEmpty()

Has no records.

Returns:boolean

true if no records

isFirstback to summary
public default boolean isFirst()

Are we on the first row of the result set?

Returns:boolean

true if on first row

isLastback to summary
public default boolean isLast()

Are we on the last row of the result set?

Returns:boolean

true if on last row

moveRowRelativeback to summary
public default void moveRowRelative(int rows)

Moves the current position relative 'rows' from the current position.

Parameters
rows:int

the relative number of rows to move

setCurrentRowback to summary
public default void setCurrentRow(int rowNumber)

Moves the current position in the result set to the given row number.

Parameters
rowNumber:int

row to move to

setMetadataback to summary
public void 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.

Parameters
columnDefinition:ColumnDefinition

field-level metadata for the result set

setOwnerback to summary
public void setOwner(ResultsetRowsOwner rs)

Set the result set that 'owns' this RowData

Parameters
rs:ResultsetRowsOwner

the result set that 'owns' this RowData

wasEmptyback to summary
public boolean wasEmpty()

Did this result set have no rows?

Returns:boolean

true if the result set did not have rows