Top Description Methods
org.h2.index

public Interface Cursor

Known Direct Implementers
org.h2.index.DualCursor, org.h2.index.IndexCursor, org.h2.index.LinkedCursor, org.h2.index.MetaCursor, org.h2.index.QueryExpressionCursor, org.h2.index.RangeCursor, org.h2.index.SingleRowCursor, org.h2.index.VirtualTableCursor, org.h2.mvstore.db.MVPrimaryIndex.MVStoreCursor, org.h2.mvstore.db.MVSecondaryIndex.MVStoreCursor, org.h2.mvstore.db.MVSpatialIndex.MVStoreCursor
Imports
org.h2.result.Row, .SearchRow

A cursor is a helper object to iterate through an index. For indexes are sorted (such as the b tree index), it can iterate to the very end of the index. For other indexes that don't support that (such as a hash index), only one row is returned. The cursor is initially positioned before the first row, that means next() must be called before accessing data.

Method Summary

Modifier and TypeMethod and Description
public Row

Returns:

the complete row
get
()

Get the complete current row.

public SearchRow

Returns:

the search row
getSearchRow
()

Get the current row.

public boolean

Returns:

true if another row is available
next
()

Skip to the next row if one is available.

public boolean

Returns:

true if another row is available
previous
()

Skip to the previous row if one is available.

Method Detail

getback to summary
public Row get()

Get the complete current row. All column are available.

Returns:Row

the complete row

getSearchRowback to summary
public SearchRow getSearchRow()

Get the current row. Only the data for indexed columns is available in this row.

Returns:SearchRow

the search row

nextback to summary
public boolean next()

Skip to the next row if one is available.

Returns:boolean

true if another row is available

previousback to summary
public boolean previous()

Skip to the previous row if one is available. No filtering is made here.

Returns:boolean

true if another row is available