org.h2.index
Class IndexCursor

java.lang.Object
  extended by org.h2.index.IndexCursor
All Implemented Interfaces:
Cursor

public class IndexCursor
extends java.lang.Object
implements Cursor

The filter used to walk through an index. This class filters supports IN(..) and IN(SELECT ...) optimizations.


Constructor Summary
IndexCursor()
           
 
Method Summary
 void find(Session session, ObjectArray<IndexCondition> indexConditions)
          Re-evaluate the start and end values of the index search for rows.
 Row get()
          Get the complete current row.
 long getKey()
          Get the unique key of the current row.
 SearchRow getSearchRow()
          Get the current row.
 boolean isAlwaysFalse()
          Check if the result is empty for sure.
 boolean next()
          Skip to the next row if one is available.
 boolean previous()
          Skip to the previous row if one is available.
 void setIndex(Index index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexCursor

public IndexCursor()
Method Detail

setIndex

public void setIndex(Index index)

find

public void find(Session session,
                 ObjectArray<IndexCondition> indexConditions)
          throws java.sql.SQLException
Re-evaluate the start and end values of the index search for rows.

Parameters:
session - the session
indexConditions - the index conditions
Throws:
java.sql.SQLException

isAlwaysFalse

public boolean isAlwaysFalse()
Check if the result is empty for sure.

Returns:
true if it is

get

public Row get()
        throws java.sql.SQLException
Description copied from interface: Cursor
Get the complete current row. All column are available.

Specified by:
get in interface Cursor
Returns:
the complete row
Throws:
java.sql.SQLException

getKey

public long getKey()
Description copied from interface: Cursor
Get the unique key of the current row.

Specified by:
getKey in interface Cursor
Returns:
the key

getSearchRow

public SearchRow getSearchRow()
                       throws java.sql.SQLException
Description copied from interface: Cursor
Get the current row. Only the data for indexed columns is available in this row.

Specified by:
getSearchRow in interface Cursor
Returns:
the search row
Throws:
java.sql.SQLException

next

public boolean next()
             throws java.sql.SQLException
Description copied from interface: Cursor
Skip to the next row if one is available.

Specified by:
next in interface Cursor
Returns:
true if another row is available
Throws:
java.sql.SQLException

previous

public boolean previous()
Description copied from interface: Cursor
Skip to the previous row if one is available. No filtering is made here.

Specified by:
previous in interface Cursor
Returns:
true if another row is available