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(ObjectArray<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()
           throws java.sql.SQLException
Reset the current position of this object.

Throws:
java.sql.SQLException

next

Value[] next()
             throws java.sql.SQLException
Get the next row from the result.

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

addRows

void addRows(ObjectArray<Value[]> rows)
             throws java.sql.SQLException
Add a number of rows to the result.

Parameters:
rows - the list of rows to add
Throws:
java.sql.SQLException

done

void done()
          throws java.sql.SQLException
This method is called after all rows have been added.

Throws:
java.sql.SQLException

close

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


removeRow

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

Parameters:
values - the row
Returns:
the new row count
Throws:
java.sql.SQLException

contains

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

Parameters:
values - the row
Returns:
true if it exists
Throws:
java.sql.SQLException

addRow

int addRow(Value[] values)
           throws java.sql.SQLException
Add a row to this object.

Parameters:
values - the row to add
Returns:
the new number of rows in this object
Throws:
java.sql.SQLException