public class LocalResult extends Object implements ResultInterface, ResultTarget
| 构造器和说明 |
|---|
LocalResult()
Construct a local result object.
|
LocalResult(SessionLocal session,
Expression[] expressions,
int visibleColumnCount,
int resultColumnCount)
Construct a local result object.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addRow(Value... values)
Add a row to this object.
|
void |
addRowForTable(Row row)
Add a row for a table.
|
void |
close()
Close the result and delete any temporary files
|
boolean |
containsDistinct(Value[] values)
Check if this result set contains the given row.
|
boolean |
containsNull()
Check if this result set contains a NULL value.
|
LocalResult |
createShallowCopy(Session targetSession)
Create a shallow copy of the result set.
|
Value[] |
currentRow()
Get the current row.
|
Row |
currentRowForTable()
Retrieve the current row
|
void |
done()
This method is called after all rows have been added.
|
static LocalResult |
forTable(SessionLocal session,
Table table)
Constructs a new local result object for the specified table.
|
String |
getAlias(int i)
Get the column alias name for the column.
|
String |
getColumnName(int i)
Get the column name.
|
TypeInfo |
getColumnType(int i)
Get the column data type.
|
int |
getFetchSize()
Get the current fetch size for this result set.
|
int |
getNullable(int i)
Check if this column is nullable.
|
long |
getRowCount()
Get the number of rows in this object.
|
long |
getRowId()
Get the current row id, starting with 0
|
String |
getSchemaName(int i)
Get the schema name for the column, if one exists.
|
String |
getTableName(int i)
Get the table name for the column, if one exists.
|
int |
getVisibleColumnCount()
Get the number of visible columns.
|
boolean |
hasNext()
Check if this result has more rows to fetch.
|
boolean |
isAfterLast()
Check if the current position is after last row.
|
boolean |
isClosed()
Check if this result set is closed.
|
boolean |
isIdentity(int i)
Check if this is an identity column.
|
boolean |
isLazy()
Check if this a lazy execution result.
|
void |
limitsWereApplied()
A hint that sorting, offset and limit may be ignored by this result
because they were applied during the query.
|
boolean |
needToClose()
Check if this result set should be closed, for example because it is
buffered using a temporary file.
|
boolean |
next()
Go to the next row.
|
void |
removeDistinct(Value[] values)
Remove the row from the result set if it exists.
|
void |
reset()
Go to the beginning of the result, that means
before the first row.
|
void |
setDistinct()
Remove duplicate rows.
|
void |
setDistinct(int[] distinctIndexes)
Remove rows with duplicates in columns with specified indexes.
|
void |
setFetchPercent(boolean fetchPercent) |
void |
setFetchSize(int fetchSize)
Set the fetch size for this result set.
|
void |
setForDataChangeDeltaTable()
Sets value collection mode for data change delta tables.
|
void |
setLimit(long limit)
Set the number of rows that this result will return at the maximum.
|
void |
setMaxMemoryRows(int maxValue)
Redefine count of maximum rows holds in memory for the result.
|
void |
setOffset(long offset)
Set the offset of the first row to return.
|
void |
setSortOrder(SortOrder sort)
Sets sort order to be used by this result.
|
void |
setWithTies(SortOrder withTiesSortOrder)
Enables inclusion of tied rows to result and sets the sort order for tied
rows.
|
String |
toString() |
public LocalResult()
public LocalResult(SessionLocal session, Expression[] expressions, int visibleColumnCount, int resultColumnCount)
session - the sessionexpressions - the expression arrayvisibleColumnCount - the number of visible columnsresultColumnCount - the number of columns including visible columns and additional
virtual columns for ORDER BY and DISTINCT ON clausespublic static LocalResult forTable(SessionLocal session, Table table)
session - the sessiontable - the tablepublic boolean isLazy()
ResultInterfaceisLazy 在接口中 ResultInterfacepublic void setMaxMemoryRows(int maxValue)
maxValue - Maximum rows count in memory.SysProperties.MAX_MEMORY_ROWSpublic void setForDataChangeDeltaTable()
public LocalResult createShallowCopy(Session targetSession)
createShallowCopy 在接口中 ResultInterfacetargetSession - the session of the copypublic void setSortOrder(SortOrder sort)
sort - the sort orderpublic void setDistinct()
public void setDistinct(int[] distinctIndexes)
distinctIndexes - distinct indexespublic boolean containsDistinct(Value[] values)
values - the rowpublic boolean containsNull()
public void removeDistinct(Value[] values)
values - the rowpublic void reset()
ResultInterfacereset 在接口中 ResultInterfacepublic Row currentRowForTable()
public Value[] currentRow()
ResultInterfacecurrentRow 在接口中 ResultInterfacepublic boolean next()
ResultInterfacenext 在接口中 ResultInterfacepublic long getRowId()
ResultInterfacegetRowId 在接口中 ResultInterfacepublic boolean isAfterLast()
ResultInterfaceisAfterLast 在接口中 ResultInterfacepublic void addRowForTable(Row row)
row - the row to addpublic void addRow(Value... values)
addRow 在接口中 ResultTargetvalues - the row to addpublic int getVisibleColumnCount()
ResultInterfacegetVisibleColumnCount 在接口中 ResultInterfacepublic void done()
public long getRowCount()
ResultInterfacegetRowCount 在接口中 ResultInterfacegetRowCount 在接口中 ResultTargetpublic void limitsWereApplied()
ResultTargetlimitsWereApplied 在接口中 ResultTargetpublic boolean hasNext()
ResultInterfacehasNext 在接口中 ResultInterfacepublic void setLimit(long limit)
limit - the limit (-1 means no limit, 0 means no rows)public void setFetchPercent(boolean fetchPercent)
fetchPercent - whether limit expression specifies percentage of rowspublic void setWithTies(SortOrder withTiesSortOrder)
withTiesSortOrder - the sort order for tied rowspublic boolean needToClose()
ResultInterfaceneedToClose 在接口中 ResultInterfacepublic void close()
ResultInterfaceclose 在接口中 AutoCloseableclose 在接口中 ResultInterfacepublic String getAlias(int i)
ResultInterfacegetAlias 在接口中 ResultInterfacei - the column number (starting with 0)public String getTableName(int i)
ResultInterfacegetTableName 在接口中 ResultInterfacei - the column number (starting with 0)public String getSchemaName(int i)
ResultInterfacegetSchemaName 在接口中 ResultInterfacei - the column number (starting with 0)public String getColumnName(int i)
ResultInterfacegetColumnName 在接口中 ResultInterfacei - the column number (starting with 0)public TypeInfo getColumnType(int i)
ResultInterfacegetColumnType 在接口中 ResultInterfacei - the column number (starting with 0)public int getNullable(int i)
ResultInterfacegetNullable 在接口中 ResultInterfacei - the column number (starting with 0)public boolean isIdentity(int i)
ResultInterfaceisIdentity 在接口中 ResultInterfacei - the column number (starting with 0)public void setOffset(long offset)
offset - the offsetpublic boolean isClosed()
isClosed 在接口中 ResultInterfacepublic int getFetchSize()
ResultInterfacegetFetchSize 在接口中 ResultInterfacepublic void setFetchSize(int fetchSize)
ResultInterfacesetFetchSize 在接口中 ResultInterfacefetchSize - the new fetch sizeCopyright © 2022. All rights reserved.