Class GridH2ProxyIndex
- java.lang.Object
-
- org.h2.engine.DbObjectBase
-
- org.h2.schema.SchemaObjectBase
-
- org.h2.index.BaseIndex
-
- org.apache.ignite.internal.processors.query.h2.opt.H2IndexCostedBase
-
- org.apache.ignite.internal.processors.query.h2.opt.GridH2ProxyIndex
-
- All Implemented Interfaces:
org.h2.engine.DbObject,org.h2.index.Index,org.h2.schema.SchemaObject
- Direct Known Subclasses:
GridH2ProxySpatialIndex
public class GridH2ProxyIndex extends H2IndexCostedBase
Allows to have 'free' index for alias columns Delegates the calls to underlying normal index
-
-
Field Summary
Fields Modifier and Type Field Description protected org.h2.index.IndexidxUnderlying normal index-
Fields inherited from class org.apache.ignite.internal.processors.query.h2.opt.H2IndexCostedBase
tbl
-
-
Constructor Summary
Constructors Constructor Description GridH2ProxyIndex(GridH2Table tbl, String name, List<org.h2.table.IndexColumn> colsList, org.h2.index.Index idx)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(org.h2.engine.Session session, org.h2.result.Row row)booleancanGetFirstOrLast()voidcheckRename()voidclose(org.h2.engine.Session session)org.h2.index.IndexLookupBatchcreateLookupBatch(org.h2.table.TableFilter[] filters, int filter)org.h2.index.Cursorfind(org.h2.engine.Session session, org.h2.result.SearchRow first, org.h2.result.SearchRow last)org.h2.index.CursorfindFirstOrLast(org.h2.engine.Session session, boolean first)doublegetCost(org.h2.engine.Session session, int[] masks, org.h2.table.TableFilter[] filters, int filter, org.h2.result.SortOrder sortOrder, HashSet<org.h2.table.Column> allColumnsSet)longgetDiskSpaceUsed()longgetRowCount(org.h2.engine.Session session)longgetRowCountApproximation()booleanneedRebuild()static org.h2.result.SearchRowprepareProxyIndexRow(GridQueryRowDescriptor desc, org.h2.result.SearchRow row)Clones provided row and copies values of alias key and val columns into respective key and val positions.voidremove(org.h2.engine.Session session)voidremove(org.h2.engine.Session session, org.h2.result.Row row)voidtruncate(org.h2.engine.Session session)org.h2.index.IndexunderlyingIndex()-
Methods inherited from class org.apache.ignite.internal.processors.query.h2.opt.H2IndexCostedBase
getCostRangeIndex
-
Methods inherited from class org.h2.index.BaseIndex
canFindNext, canScan, checkIndexColumnTypes, commit, compareRows, find, findNext, getColumnIndex, getColumns, getCostRangeIndex, getCreateSQL, getCreateSQLForCopy, getDropSQL, getDuplicateKeyException, getIndexColumns, getIndexType, getPlanSQL, getRow, getTable, getType, initBaseIndex, isFindUsingFullTableScan, isFirstColumn, isHidden, isRowIdIndex, mayHaveNullDuplicates, removeChildrenAndResources, setSortedInsertMode
-
Methods inherited from class org.h2.engine.DbObjectBase
getChildren, getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, isValid, rename, setComment, setModified, setObjectName, setTemporary, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
GridH2ProxyIndex
public GridH2ProxyIndex(GridH2Table tbl, String name, List<org.h2.table.IndexColumn> colsList, org.h2.index.Index idx)
- Parameters:
tbl- Table.name- Name of the proxy index.colsList- Column list for the proxy index.idx- Target index.
-
-
Method Detail
-
underlyingIndex
public org.h2.index.Index underlyingIndex()
- Returns:
- Underlying index.
-
checkRename
public void checkRename()
- Specified by:
checkRenamein interfaceorg.h2.engine.DbObject- Specified by:
checkRenamein classorg.h2.engine.DbObjectBase
-
close
public void close(org.h2.engine.Session session)
-
add
public void add(org.h2.engine.Session session, org.h2.result.Row row)
-
remove
public void remove(org.h2.engine.Session session, org.h2.result.Row row)
-
find
public org.h2.index.Cursor find(org.h2.engine.Session session, org.h2.result.SearchRow first, org.h2.result.SearchRow last)
-
getCost
public double getCost(org.h2.engine.Session session, int[] masks, org.h2.table.TableFilter[] filters, int filter, org.h2.result.SortOrder sortOrder, HashSet<org.h2.table.Column> allColumnsSet)
-
remove
public void remove(org.h2.engine.Session session)
-
truncate
public void truncate(org.h2.engine.Session session)
-
canGetFirstOrLast
public boolean canGetFirstOrLast()
-
findFirstOrLast
public org.h2.index.Cursor findFirstOrLast(org.h2.engine.Session session, boolean first)
-
needRebuild
public boolean needRebuild()
-
getRowCount
public long getRowCount(org.h2.engine.Session session)
-
getRowCountApproximation
public long getRowCountApproximation()
-
getDiskSpaceUsed
public long getDiskSpaceUsed()
-
createLookupBatch
public org.h2.index.IndexLookupBatch createLookupBatch(org.h2.table.TableFilter[] filters, int filter)- Specified by:
createLookupBatchin interfaceorg.h2.index.Index- Overrides:
createLookupBatchin classorg.h2.index.BaseIndex
-
prepareProxyIndexRow
public static org.h2.result.SearchRow prepareProxyIndexRow(GridQueryRowDescriptor desc, org.h2.result.SearchRow row)
Clones provided row and copies values of alias key and val columns into respective key and val positions.- Parameters:
desc- Row descriptor.row- Source row.- Returns:
- Result.
-
-