接口 ResultsetRows
-
- 所有超级接口:
Iterator<Row>,ProtocolEntity,RowList
public interface ResultsetRows extends RowList, ProtocolEntity
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 theRowListfunctionality by providing row positioning, updatability and ownership.
-
-
字段概要
-
从接口继承的字段 com.mysql.cj.result.RowList
RESULT_SET_SIZE_UNKNOWN
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 default voidaddRow(Row row)Adds a row.default voidafterLast()Moves to after last.default voidbeforeFirst()Moves to before first.default voidbeforeLast()Moves to before last.default voidclose()We're done.ColumnDefinitiongetMetadata()ResultsetRowsOwnergetOwner()Returns the result set that 'owns' this RowDatabooleanisAfterLast()Returns true if we got the last element.booleanisBeforeFirst()Returns if iteration has not occured yet.default booleanisDynamic()Returns true if the result set is dynamic.default booleanisEmpty()Has no records.default booleanisFirst()Are we on the first row of the result set?default booleanisLast()Are we on the last row of the result set?default voidmoveRowRelative(int rows)Moves the current position relative 'rows' from the current position.default voidsetCurrentRow(int rowNumber)Moves the current position in the result set to the given row number.voidsetMetadata(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?-
从接口继承的方法 java.util.Iterator
forEachRemaining, hasNext, next, remove
-
从接口继承的方法 com.mysql.cj.result.RowList
get, getPosition, previous, size
-
-
-
-
方法详细资料
-
addRow
default void addRow(Row row)
Adds a row.- 参数:
row- the row to add
-
afterLast
default void afterLast()
Moves to after last.
-
beforeFirst
default void beforeFirst()
Moves to before first.
-
beforeLast
default void beforeLast()
Moves to before last.
-
close
default void close()
We're done.
-
getOwner
ResultsetRowsOwner getOwner()
Returns the result set that 'owns' this RowData
-
isAfterLast
boolean isAfterLast()
Returns true if we got the last element.- 返回:
- true if after last row
-
isBeforeFirst
boolean isBeforeFirst()
Returns if iteration has not occured yet.- 返回:
- true if before first row
-
isDynamic
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.- 返回:
- true if this result set is streaming from the server
-
isEmpty
default boolean isEmpty()
Has no records.- 返回:
- true if no records
-
isFirst
default boolean isFirst()
Are we on the first row of the result set?- 返回:
- true if on first row
-
isLast
default boolean isLast()
Are we on the last row of the result set?- 返回:
- true if on last row
-
moveRowRelative
default void moveRowRelative(int rows)
Moves the current position relative 'rows' from the current position.- 参数:
rows- the relative number of rows to move
-
setCurrentRow
default void setCurrentRow(int rowNumber)
Moves the current position in the result set to the given row number.- 参数:
rowNumber- row to move to
-
setOwner
void setOwner(ResultsetRowsOwner rs)
Set the result set that 'owns' this RowData- 参数:
rs- the result set that 'owns' this RowData
-
wasEmpty
boolean wasEmpty()
Did this result set have no rows?- 返回:
- true if the result set did not have rows
-
setMetadata
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.- 参数:
columnDefinition- field-level metadata for the result set
-
getMetadata
ColumnDefinition getMetadata()
-
-