Package org.h2.index
Class RegularQueryExpressionIndex
- java.lang.Object
-
- org.h2.engine.DbObject
-
- org.h2.schema.SchemaObject
-
- org.h2.index.Index
-
- org.h2.index.QueryExpressionIndex
-
- org.h2.index.RegularQueryExpressionIndex
-
- All Implemented Interfaces:
SpatialIndex,HasSQL
public final class RegularQueryExpressionIndex extends QueryExpressionIndex implements SpatialIndex
A regular query expression index.
-
-
Field Summary
-
Fields inherited from class org.h2.index.Index
columnIds, columns, indexColumns, indexType, uniqueColumnColumn
-
Fields inherited from class org.h2.engine.DbObject
AGGREGATE, comment, COMMENT, CONSTANT, CONSTRAINT, database, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, trace, TRIGGER, USER
-
Fields inherited from interface org.h2.util.HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS
-
-
Constructor Summary
Constructors Constructor Description RegularQueryExpressionIndex(QueryExpressionTable table, java.lang.String querySQL, java.util.ArrayList<Parameter> originalParameters, SessionLocal session, int[] masks)Creates a new instance of a regular query expression index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cursorfind(SessionLocal session, SearchRow first, SearchRow last, boolean reverse)Find a row or a list of rows and create a cursor to iterate over the result.CursorfindByGeometry(SessionLocal session, SearchRow first, SearchRow last, boolean reverse, SearchRow intersection)Find a row or a list of rows and create a cursor to iterate over the result.doublegetCost(SessionLocal session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, AllColumnsForPlan allColumnsSet, boolean isSelectCommand)Estimate the cost to search for rows given the search mask.booleanisExpired()-
Methods inherited from class org.h2.index.QueryExpressionIndex
add, checkRename, close, getPlanSQL, getQuery, getRowCount, getRowCountApproximation, needRebuild, remove, remove, truncate
-
Methods inherited from class org.h2.index.Index
areRowsEquivalent, canFindNext, canGetFirstOrLast, canScan, checkIndexColumnTypes, compareRows, findFirstOrLast, findNext, getColumnIndex, getColumns, getCostRangeIndex, getCreateSQL, getCreateSQLForCopy, getDiskSpaceUsed, getDuplicateKeyException, getDuplicatePrimaryKeyMessage, getIndexColumns, getIndexType, getRow, getRowFactory, getTable, getType, getUniqueColumnCount, getUniqueRowFactory, isFindUsingFullTableScan, isFirstColumn, isRowIdIndex, needsUniqueCheck, removeChildrenAndResources, update
-
Methods inherited from class org.h2.schema.SchemaObject
getSchema, getSQL, getSQL
-
Methods inherited from class org.h2.engine.DbObject
equals, getChildren, getComment, getCreateSQLForMeta, getDatabase, getDropSQL, getId, getModificationId, getName, hashCode, invalidate, isTemporary, isValid, rename, setComment, setModified, setObjectName, setTemporary, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.h2.util.HasSQL
getTraceSQL
-
-
-
-
Constructor Detail
-
RegularQueryExpressionIndex
public RegularQueryExpressionIndex(QueryExpressionTable table, java.lang.String querySQL, java.util.ArrayList<Parameter> originalParameters, SessionLocal session, int[] masks)
Creates a new instance of a regular query expression index.- Parameters:
table- the query expression tablequerySQL- the query SQLoriginalParameters- the original parameterssession- the sessionmasks- the masks
-
-
Method Detail
-
isExpired
public boolean isExpired()
- Specified by:
isExpiredin classQueryExpressionIndex
-
getCost
public double getCost(SessionLocal session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, AllColumnsForPlan allColumnsSet, boolean isSelectCommand)
Description copied from class:IndexEstimate the cost to search for rows given the search mask. There is one element per column in the search mask. For possible search masks, see IndexCondition.- Specified by:
getCostin classIndex- Parameters:
session- 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 columnsisSelectCommand- is this for an SELECT command- Returns:
- the estimated cost
-
find
public Cursor find(SessionLocal session, SearchRow first, SearchRow last, boolean reverse)
Description copied from class:IndexFind a row or a list of rows and create a cursor to iterate over the result.
-
findByGeometry
public Cursor findByGeometry(SessionLocal session, SearchRow first, SearchRow last, boolean reverse, SearchRow intersection)
Description copied from interface:SpatialIndexFind a row or a list of rows and create a cursor to iterate over the result.- Specified by:
findByGeometryin interfaceSpatialIndex- Parameters:
session- the sessionfirst- the lower boundlast- the upper boundreverse- if true, iterate in reverse (descending) orderintersection- the geometry which values should intersect with, or null for anything- Returns:
- the cursor to iterate over the results
-
-