ResultInterface

The result interface is used by the LocalResult and ResultRemote class. A result may contain rows, or just an update count.

Methods
void close()
Close the result and delete any temporary files
void close()
Close the result and delete any temporary files
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
ResultInterface createShallowCopy(SessionInterface targetSession)
Create a shallow copy of the result set.
ResultInterface 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()
Get the current row.
Value[] currentRow()
Get the current row.
Returns:
the row
String getAlias(int i)
Get the column alias name for the column.
String getAlias(int i)
Get the column alias name for the column.
Parameters:
i - the column number (starting with 0)
Returns:
the alias name
String getColumnName(int i)
Get the column name.
String getColumnName(int i)
Get the column name.
Parameters:
i - the column number (starting with 0)
Returns:
the column name
long getColumnPrecision(int i)
Get the precision for this column.
long getColumnPrecision(int i)
Get the precision for this column.
Parameters:
i - the column number (starting with 0)
Returns:
the precision
int getColumnScale(int i)
Get the scale for this column.
int getColumnScale(int i)
Get the scale for this column.
Parameters:
i - the column number (starting with 0)
Returns:
the scale
int getColumnType(int i)
Get the column data type.
int getColumnType(int i)
Get the column data type.
Parameters:
i - the column number (starting with 0)
Returns:
the column data type
int getDisplaySize(int i)
Get the display size for this column.
int getDisplaySize(int i)
Get the display size for this column.
Parameters:
i - the column number (starting with 0)
Returns:
the display size
int getFetchSize()
Get the current fetch size for this result set.
int getFetchSize()
Get the current fetch size for this result set.
Returns:
the fetch size
int getNullable(int i)
Check if this column is nullable.
int getNullable(int i)
Check if this column is nullable.
Parameters:
i - the column number (starting with 0)
Returns:
Column.NULLABLE_*
int getRowCount()
Get the number of rows in this object.
int getRowCount()
Get the number of rows in this object.
Returns:
the number of rows
int getRowId()
Get the current row id, starting with 0.
int getRowId()
Get the current row id, starting with 0. -1 is returned when next() was not called yet.
Returns:
the row id
String getSchemaName(int i)
Get the schema name for the column, if one exists.
String getSchemaName(int i)
Get the schema name for the column, if one exists.
Parameters:
i - the column number (starting with 0)
Returns:
the schema name or null
String getTableName(int i)
Get the table name for the column, if one exists.
String getTableName(int i)
Get the table name for the column, if one exists.
Parameters:
i - the column number (starting with 0)
Returns:
the table name or null
int getVisibleColumnCount()
Get the number of visible columns.
int getVisibleColumnCount()
Get the number of visible columns. More columns may exist internally for sorting or grouping.
Returns:
the number of columns
boolean hasNext()
Check if this result has more rows to fetch.
boolean hasNext()
Check if this result has more rows to fetch.
Returns:
true if it has
boolean isAfterLast()
Check if the current position is after last row.
boolean isAfterLast()
Check if the current position is after last row.
Returns:
true if after last
boolean isAutoIncrement(int i)
Check if this is an auto-increment column.
boolean isAutoIncrement(int i)
Check if this is an auto-increment column.
Parameters:
i - the column number (starting with 0)
Returns:
true for auto-increment columns
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()
Check if this a lazy execution result.
boolean isLazy()
Check if this a lazy execution result.
Returns:
true if it is a lazy result
boolean needToClose()
Check if this result set should be closed, for example because it is buffered using a temporary file.
boolean needToClose()
Check if this result set should be closed, for example because it is buffered using a temporary file.
Returns:
true if close should be called.
boolean ()
Go to the next row.
boolean ()
Go to the next row.
Returns:
true if a row exists
void reset()
Go to the beginning of the result, that means before the first row.
void reset()
Go to the beginning of the result, that means before the first row.
void setFetchSize(int fetchSize)
Set the fetch size for this result set.
void setFetchSize(int fetchSize)
Set the fetch size for this result set.
Parameters:
fetchSize - the new fetch size