org.h2.result
Class RowList

java.lang.Object
  extended by org.h2.result.RowList

public class RowList
extends java.lang.Object

A list of rows. If the list grows too large, it is buffered to disk automatically.


Constructor Summary
RowList(Session session)
          Construct a new row list for this session.
 
Method Summary
 void add(Row r)
          Add a row to the list.
 void close()
          Close the result list and delete the temporary file.
 boolean hasNext()
          Check if there are more rows in this list.
 void invalidateCache()
          Do not use the cache.
 Row next()
          Get the next row from the list.
 void reset()
          Remove all rows from the list.
 int size()
          Get the number of rows in this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowList

public RowList(Session session)
Construct a new row list for this session.

Parameters:
session - the session
Method Detail

add

public void add(Row r)
         throws java.sql.SQLException
Add a row to the list.

Parameters:
r - the row to add
Throws:
java.sql.SQLException

reset

public void reset()
           throws java.sql.SQLException
Remove all rows from the list.

Throws:
java.sql.SQLException

hasNext

public boolean hasNext()
Check if there are more rows in this list.

Returns:
true it there are more rows

next

public Row next()
         throws java.sql.SQLException
Get the next row from the list.

Returns:
the next row
Throws:
java.sql.SQLException

size

public int size()
Get the number of rows in this list.

Returns:
the number of rows

invalidateCache

public void invalidateCache()
Do not use the cache.


close

public void close()
Close the result list and delete the temporary file.