org.h2.result
Class ResultTempTable

java.lang.Object
  extended by org.h2.result.ResultTempTable
All Implemented Interfaces:
ResultExternal

public class ResultTempTable
extends java.lang.Object
implements ResultExternal

This class implements the temp table buffer for the LocalResult class.


Constructor Summary
ResultTempTable(Session session, SortOrder sort)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultTempTable

public ResultTempTable(Session session,
                       SortOrder sort)
                throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

removeRow

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

Specified by:
removeRow in interface ResultExternal
Parameters:
values - the row
Returns:
the new row count
Throws:
java.sql.SQLException

contains

public boolean contains(Value[] values)
                 throws java.sql.SQLException
Description copied from interface: ResultExternal
Check if the given row exists in this object.

Specified by:
contains in interface ResultExternal
Parameters:
values - the row
Returns:
true if it exists
Throws:
java.sql.SQLException

addRow

public int addRow(Value[] values)
           throws java.sql.SQLException
Description copied from interface: ResultExternal
Add a row to this object.

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

addRows

public void addRows(ObjectArray<Value[]> rows)
             throws java.sql.SQLException
Description copied from interface: ResultExternal
Add a number of rows to the result.

Specified by:
addRows in interface ResultExternal
Parameters:
rows - the list of rows to add
Throws:
java.sql.SQLException

close

public void close()
Description copied from interface: ResultExternal
Close this object and delete the temporary file.

Specified by:
close in interface ResultExternal

done

public void done()
Description copied from interface: ResultExternal
This method is called after all rows have been added.

Specified by:
done in interface ResultExternal

next

public Value[] next()
             throws java.sql.SQLException
Description copied from interface: ResultExternal
Get the next row from the result.

Specified by:
next in interface ResultExternal
Returns:
the next row or null
Throws:
java.sql.SQLException

reset

public void reset()
           throws java.sql.SQLException
Description copied from interface: ResultExternal
Reset the current position of this object.

Specified by:
reset in interface ResultExternal
Throws:
java.sql.SQLException