类 ResultsetRowsCursor
- java.lang.Object
-
- com.mysql.cj.protocol.a.result.AbstractResultsetRows
-
- com.mysql.cj.protocol.a.result.ResultsetRowsCursor
-
- 所有已实现的接口:
ProtocolEntity,ResultsetRows,RowList,Iterator<Row>
public class ResultsetRowsCursor extends AbstractResultsetRows implements ResultsetRows
Model for result set data backed by a cursor (see http://dev.mysql.com/doc/refman/5.7/en/cursors.html and SERVER_STATUS_CURSOR_EXISTS flag description on http://dev.mysql.com/doc/internals/en/status-flags.html). Only works for forward-only result sets (but still works with updatable concurrency).
-
-
字段概要
字段 修饰符和类型 字段 说明 protected NativeMessageBuildercommandBuilder-
从类继承的字段 com.mysql.cj.protocol.a.result.AbstractResultsetRows
BEFORE_START_OF_ROWS, currentPositionInFetchedRows, metadata, owner, rowFactory, wasEmpty
-
从接口继承的字段 com.mysql.cj.result.RowList
RESULT_SET_SIZE_UNKNOWN
-
-
构造器概要
构造器 构造器 说明 ResultsetRowsCursor(NativeProtocol ioChannel, ColumnDefinition columnDefinition)Creates a new cursor-backed row provider.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddRow(Row row)Adds a row.voidafterLast()Moves to after last.voidbeforeFirst()Moves to before first.voidbeforeLast()Moves to before last.voidclose()We're done.intgetPosition()Returns the current position.booleanhasNext()booleanisAfterLast()Returns true if we got the last element.booleanisBeforeFirst()Returns if iteration has not occured yet.booleanisEmpty()Has no records.booleanisFirst()Are we on the first row of the result set?booleanisLast()Are we on the last row of the result set?voidmoveRowRelative(int rows)Moves the current position relative 'rows' from the current position.Rownext()voidsetCurrentRow(int rowNumber)Moves the current position in the result set to the given row number.-
从类继承的方法 com.mysql.cj.protocol.a.result.AbstractResultsetRows
getMetadata, getOwner, setMetadata, setOwner, wasEmpty
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 java.util.Iterator
forEachRemaining, remove
-
从接口继承的方法 com.mysql.cj.protocol.ResultsetRows
getMetadata, getOwner, isDynamic, setMetadata, setOwner, wasEmpty
-
-
-
-
字段详细资料
-
commandBuilder
protected NativeMessageBuilder commandBuilder
-
-
构造器详细资料
-
ResultsetRowsCursor
public ResultsetRowsCursor(NativeProtocol ioChannel, ColumnDefinition columnDefinition)
Creates a new cursor-backed row provider.- 参数:
ioChannel- connection to the server.columnDefinition- field-level metadata for the results that this cursor covers.
-
-
方法详细资料
-
isAfterLast
public boolean isAfterLast()
从接口复制的说明:ResultsetRowsReturns true if we got the last element.- 指定者:
isAfterLast在接口中ResultsetRows- 返回:
- true if after last row
-
isBeforeFirst
public boolean isBeforeFirst()
从接口复制的说明:ResultsetRowsReturns if iteration has not occured yet.- 指定者:
isBeforeFirst在接口中ResultsetRows- 返回:
- true if before first row
-
getPosition
public int getPosition()
从接口复制的说明:RowListReturns the current position.- 指定者:
getPosition在接口中RowList- 返回:
- the current row number
-
isEmpty
public boolean isEmpty()
从接口复制的说明:ResultsetRowsHas no records.- 指定者:
isEmpty在接口中ResultsetRows- 返回:
- true if no records
-
isFirst
public boolean isFirst()
从接口复制的说明:ResultsetRowsAre we on the first row of the result set?- 指定者:
isFirst在接口中ResultsetRows- 返回:
- true if on first row
-
isLast
public boolean isLast()
从接口复制的说明:ResultsetRowsAre we on the last row of the result set?- 指定者:
isLast在接口中ResultsetRows- 返回:
- true if on last row
-
close
public void close()
从接口复制的说明:ResultsetRowsWe're done.- 指定者:
close在接口中ResultsetRows
-
addRow
public void addRow(Row row)
从接口复制的说明:ResultsetRowsAdds a row.- 指定者:
addRow在接口中ResultsetRows- 参数:
row- the row to add
-
afterLast
public void afterLast()
从接口复制的说明:ResultsetRowsMoves to after last.- 指定者:
afterLast在接口中ResultsetRows
-
beforeFirst
public void beforeFirst()
从接口复制的说明:ResultsetRowsMoves to before first.- 指定者:
beforeFirst在接口中ResultsetRows
-
beforeLast
public void beforeLast()
从接口复制的说明:ResultsetRowsMoves to before last.- 指定者:
beforeLast在接口中ResultsetRows
-
moveRowRelative
public void moveRowRelative(int rows)
从接口复制的说明:ResultsetRowsMoves the current position relative 'rows' from the current position.- 指定者:
moveRowRelative在接口中ResultsetRows- 参数:
rows- the relative number of rows to move
-
setCurrentRow
public void setCurrentRow(int rowNumber)
从接口复制的说明:ResultsetRowsMoves the current position in the result set to the given row number.- 指定者:
setCurrentRow在接口中ResultsetRows- 参数:
rowNumber- row to move to
-
-