public class MultiVersionIndex extends Object implements Index
AGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE| 构造器和说明 |
|---|
MultiVersionIndex(Index base,
RegularTable table) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(Session session,
Row row)
Add a row to the index.
|
boolean |
canFindNext()
Check if the index can get the next higher value.
|
boolean |
canGetFirstOrLast()
Check if the index can directly look up the lowest or highest value of a
column.
|
boolean |
canScan()
Can this index iterate over all rows?
|
void |
checkRename()
Check if renaming is allowed.
|
void |
close(Session session)
Close this index.
|
void |
commit(int operation,
Row row)
Commit the operation for a row.
|
int |
compareRows(SearchRow rowData,
SearchRow compare)
Compare two rows.
|
IndexLookupBatch |
createLookupBatch(TableFilter[] filters,
int filter)
Creates new lookup batch.
|
Cursor |
find(Session session,
SearchRow first,
SearchRow last)
Find a row or a list of rows and create a cursor to iterate over the
result.
|
Cursor |
find(TableFilter filter,
SearchRow first,
SearchRow last)
Find a row or a list of rows and create a cursor to iterate over the
result.
|
Cursor |
findFirstOrLast(Session session,
boolean first)
Find the first (or last) value of this index.
|
Cursor |
findNext(Session session,
SearchRow first,
SearchRow last)
Find a row or a list of rows that is larger and create a cursor to
iterate over the result.
|
Index |
getBaseIndex() |
ArrayList<DbObject> |
getChildren()
Get the list of dependent children (for tables, this includes indexes and
so on).
|
int |
getColumnIndex(Column col)
Get the index of a column in the list of index columns
|
Column[] |
getColumns()
Get the indexed columns.
|
String |
getComment()
Get the current comment of this object.
|
double |
getCost(Session session,
int[] masks,
TableFilter[] filters,
int filter,
SortOrder sortOrder,
HashSet<Column> allColumnsSet)
Estimate the cost to search for rows given the search mask.
|
String |
getCreateSQL()
Construct the original CREATE ...
|
String |
getCreateSQLForCopy(Table forTable,
String quotedName)
Build a SQL statement to re-create the object, or to create a copy of the
object with a different name or referencing a different table
|
Database |
getDatabase()
Get the database.
|
long |
getDiskSpaceUsed()
Get the used disk space for this index.
|
String |
getDropSQL()
Construct a DROP ...
|
int |
getId()
Get the unique object id.
|
IndexColumn[] |
getIndexColumns()
Get the indexed columns as index columns (with ordering information).
|
IndexType |
getIndexType()
Get the index type.
|
String |
getName()
Get the name.
|
String |
getPlanSQL()
Get the message to show in a EXPLAIN statement.
|
Row |
getRow(Session session,
long key)
Get the row with the given key.
|
long |
getRowCount(Session session)
Get the row count of this table, for the given session.
|
long |
getRowCountApproximation()
Get the approximated row count for this table.
|
Schema |
getSchema()
Get the schema in which this object is defined
|
String |
getSQL()
Get the SQL name of this object (may be quoted).
|
Table |
getTable()
Get the table on which this index is based.
|
int |
getType()
Get the object type.
|
boolean |
isHidden()
Check whether this is a hidden object that doesn't appear in the meta
data and in the script, and is not dropped on DROP ALL OBJECTS.
|
boolean |
isRowIdIndex()
Does this index support lookup by row id?
|
boolean |
isTemporary()
Check if this object is temporary (for example, a temporary table).
|
boolean |
isUncommittedFromOtherSession(Session session,
Row row)
Check if there is an uncommitted row with the given key
within a different session.
|
boolean |
needRebuild()
Check if the index needs to be rebuilt.
|
void |
remove(Session session)
Remove the index.
|
void |
remove(Session session,
Row row)
Remove a row from the index.
|
void |
removeChildrenAndResources(Session session)
Delete all dependent children objects and resources of this object.
|
void |
rename(String newName)
Rename the object.
|
void |
setComment(String comment)
Change the comment of this object.
|
void |
setSortedInsertMode(boolean sortedInsertMode)
Enable or disable the 'sorted insert' optimizations (rows are inserted in
ascending or descending order) if applicable for this index
implementation.
|
void |
setTemporary(boolean temporary)
Tell this object that it is temporary or not.
|
void |
truncate(Session session)
Remove all rows from the index.
|
public MultiVersionIndex(Index base, RegularTable table)
public Cursor find(TableFilter filter, SearchRow first, SearchRow last)
Indexpublic Cursor find(Session session, SearchRow first, SearchRow last)
Indexpublic Cursor findNext(Session session, SearchRow first, SearchRow last)
Indexpublic boolean canFindNext()
IndexcanFindNext 在接口中 Indexpublic boolean canGetFirstOrLast()
IndexcanGetFirstOrLast 在接口中 Indexpublic Cursor findFirstOrLast(Session session, boolean first)
IndexfindFirstOrLast 在接口中 Indexsession - the sessionfirst - true if the first (lowest for ascending indexes) or last
value should be returnedpublic double getCost(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, HashSet<Column> allColumnsSet)
IndexgetCost 在接口中 Indexsession - the sessionmasks - per-column comparison bit masks, null means 'always false',
see constants in IndexConditionfilters - all joined table filtersfilter - the current table filter indexsortOrder - the sort orderallColumnsSet - the set of all columnspublic boolean needRebuild()
IndexneedRebuild 在接口中 Indexpublic boolean isUncommittedFromOtherSession(Session session, Row row)
session - the original sessionrow - the row (only the key is checked)public void commit(int operation,
Row row)
Indexpublic int compareRows(SearchRow rowData, SearchRow compare)
IndexcompareRows 在接口中 IndexrowData - the first rowcompare - the second rowpublic int getColumnIndex(Column col)
IndexgetColumnIndex 在接口中 Indexcol - the columnpublic Column[] getColumns()
IndexgetColumns 在接口中 Indexpublic IndexColumn[] getIndexColumns()
IndexgetIndexColumns 在接口中 Indexpublic String getCreateSQL()
DbObjectgetCreateSQL 在接口中 DbObjectpublic String getCreateSQLForCopy(Table forTable, String quotedName)
DbObjectgetCreateSQLForCopy 在接口中 DbObjectforTable - the new tablequotedName - the quoted namepublic String getDropSQL()
DbObjectgetDropSQL 在接口中 DbObjectpublic IndexType getIndexType()
IndexgetIndexType 在接口中 Indexpublic String getPlanSQL()
IndexgetPlanSQL 在接口中 Indexpublic long getRowCount(Session session)
IndexgetRowCount 在接口中 Indexsession - the sessionpublic int getType()
DbObjectpublic void removeChildrenAndResources(Session session)
DbObjectremoveChildrenAndResources 在接口中 DbObjectsession - the sessionpublic Schema getSchema()
SchemaObjectgetSchema 在接口中 SchemaObjectpublic void checkRename()
DbObjectcheckRename 在接口中 DbObjectpublic ArrayList<DbObject> getChildren()
DbObjectgetChildren 在接口中 DbObjectpublic String getComment()
DbObjectgetComment 在接口中 DbObjectpublic Database getDatabase()
DbObjectgetDatabase 在接口中 DbObjectpublic int getId()
DbObjectpublic boolean isTemporary()
DbObjectisTemporary 在接口中 DbObjectpublic void setComment(String comment)
DbObjectsetComment 在接口中 DbObjectcomment - the new comment, or null for no commentpublic void setTemporary(boolean temporary)
DbObjectsetTemporary 在接口中 DbObjecttemporary - the new valuepublic long getRowCountApproximation()
IndexgetRowCountApproximation 在接口中 Indexpublic long getDiskSpaceUsed()
IndexgetDiskSpaceUsed 在接口中 Indexpublic Index getBaseIndex()
public boolean isHidden()
SchemaObjectisHidden 在接口中 SchemaObjectpublic boolean isRowIdIndex()
IndexisRowIdIndex 在接口中 Indexpublic boolean canScan()
Indexpublic void setSortedInsertMode(boolean sortedInsertMode)
IndexsetSortedInsertMode 在接口中 IndexsortedInsertMode - the new valuepublic IndexLookupBatch createLookupBatch(TableFilter[] filters, int filter)
IndexIndexLookupBatch
instance can be used multiple times.createLookupBatch 在接口中 Indexfilters - the table filtersfilter - the filter index (0, 1,...)null if batched lookup is not supported
by this index.Copyright © 2017. All rights reserved.