LocalResult

A local result set contains all row data of a result set. This is the object generated by engine, and it is also used directly by the ResultSet class in the embedded mode. If the result does not fit in memory, it is written to a temporary file.

Methods
static LocalResult read(Session session, ResultSet rs, int maxrows)
Construct a local result set by reading all data from a regular result set.
static LocalResult read(Session session, ResultSet rs, int maxrows)
Construct a local result set by reading all data from a regular result set.
Parameters:
session - the session
rs - the result set
maxrows - the maximum number of rows to read (0 for no limit)
Returns:
the local result set
LocalResult()
Construct a local result object.
LocalResult()
Construct a local result object.
LocalResult(Session session, Expression[] expressions, int visibleColumnCount)
Construct a local result object.
LocalResult(Session session, Expression[] expressions, int visibleColumnCount)
Construct a local result object.
Parameters:
session - the session
expressions - the expression array
visibleColumnCount - the number of visible columns
void addRow(Value[] values)
Add a row to this object.
void addRow(Value[] values)
Add a row to this object.
Parameters:
values - the row to add
void close()
void close()
boolean containsDistinct(Value[] values)
Check if this result set contains the given row.
boolean containsDistinct(Value[] values)
Check if this result set contains the given row.
Parameters:
values - the row
Returns:
true if the row exists
LocalResult createShallowCopy(SessionInterface targetSession)
Create a shallow copy of the result set.
LocalResult createShallowCopy(SessionInterface targetSession)
Create a shallow copy of the result set. The data and a temporary table (if there is any) is not copied.
Parameters:
targetSession - the session of the copy
Returns:
the copy if possible, or null if copying is not possible
Value[] currentRow()
Value[] currentRow()
void done()
This method is called after all rows have been added.
void done()
This method is called after all rows have been added.
String getAlias(int i)
String getAlias(int i)
String getColumnName(int i)
String getColumnName(int i)
long getColumnPrecision(int i)
long getColumnPrecision(int i)
int getColumnScale(int i)
int getColumnScale(int i)
int getColumnType(int i)
int getColumnType(int i)
int getDisplaySize(int i)
int getDisplaySize(int i)
int getFetchSize()
int getFetchSize()
int getNullable(int i)
int getNullable(int i)
int getRowCount()
int getRowCount()
int getRowId()
int getRowId()
String getSchemaName(int i)
String getSchemaName(int i)
String getTableName(int i)
String getTableName(int i)
int getVisibleColumnCount()
int getVisibleColumnCount()
boolean hasNext()
boolean hasNext()
boolean isAfterLast()
boolean isAfterLast()
boolean isAutoIncrement(int i)
boolean isAutoIncrement(int i)
boolean isClosed()
Check if this result set is closed.
boolean isClosed()
Check if this result set is closed.
Returns:
true if it is
boolean isLazy()
boolean isLazy()
boolean needToClose()
boolean needToClose()
boolean ()
boolean ()
void removeDistinct(Value[] values)
Remove the row from the result set if it exists.
void removeDistinct(Value[] values)
Remove the row from the result set if it exists.
Parameters:
values - the row
void reset()
void reset()
void setDistinct()
Remove duplicate rows.
void setDistinct()
Remove duplicate rows.
void setFetchSize(int fetchSize)
void setFetchSize(int fetchSize)
void setLimit(int limit)
Set the number of rows that this result will return at the maximum.
void setLimit(int limit)
Set the number of rows that this result will return at the maximum.
Parameters:
limit - the limit (-1 means no limit, 0 means no rows)
void setMaxMemoryRows(int maxValue)
void setMaxMemoryRows(int maxValue)
void setOffset(int offset)
Set the offset of the first row to return.
void setOffset(int offset)
Set the offset of the first row to return.
Parameters:
offset - the offset
void setRandomAccess()
Random access is required (containsDistinct).
void setRandomAccess()
Random access is required (containsDistinct).
void setSortOrder(SortOrder sort)
Set the sort order.
void setSortOrder(SortOrder sort)
Set the sort order.
Parameters:
sort - the sort order
String toString()
String toString()