org.h2.result
Interface ResultExternal

All Known Implementing Classes:
ResultTempTable

public interface ResultExternal

This interface is used to extend the LocalResult class, if data does not fit in memory.


Method Summary
 int addRow(Value[] values)
          Add a row to this object.
 void addRows(java.util.ArrayList<Value[]> rows)
          Add a number of rows to the result.
 void close()
          Close this object and delete the temporary file.
 boolean contains(Value[] values)
          Check if the given row exists in this object.
 void done()
          This method is called after all rows have been added.
 Value[] next()
          Get the next row from the result.
 int removeRow(Value[] values)
          Remove the row with the given values from this object if such a row exists.
 void reset()
          Reset the current position of this object.
 

Method Detail

reset

void reset()
Reset the current position of this object.


next

Value[] next()
Get the next row from the result.

Returns:
the next row or null

addRows

void addRows(java.util.ArrayList<Value[]> rows)
Add a number of rows to the result.

Parameters:
rows - the list of rows to add

done

void done()
This method is called after all rows have been added.


close

void close()
Close this object and delete the temporary file.


removeRow

int removeRow(Value[] values)
Remove the row with the given values from this object if such a row exists.

Parameters:
values - the row
Returns:
the new row count

contains

boolean contains(Value[] values)
Check if the given row exists in this object.

Parameters:
values - the row
Returns:
true if it exists

addRow

int addRow(Value[] values)
Add a row to this object.

Parameters:
values - the row to add
Returns:
the new number of rows in this object