Top Description Fields Constructors Methods
org.h2.index

public abstract Class QueryExpressionIndex

extends Index
Class Inheritance
Known Direct Subclasses
org.h2.index.RecursiveIndex, org.h2.index.RegularQueryExpressionIndex
Imports
java.util.ArrayList, org.h2.command.query.Query, org.h2.engine.SessionLocal, org.h2.expression.Parameter, org.h2.message.DbException, org.h2.result.Row, org.h2.table.Column, .QueryExpressionTable

This object represents a virtual index for a query expression.

Field Summary

Modifier and TypeField and Description
pack-priv final ArrayList<Parameter>
pack-priv Query
pack-priv final String
pack-priv final QueryExpressionTable
Inherited from org.h2.index.Index:
columnIdscolumnsindexColumnsindexTypeuniqueColumnColumn

Constructor Summary

AccessConstructor and Description
pack-priv
QueryExpressionIndex(QueryExpressionTable table, String querySQL, ArrayList<Parameter> originalParameters)

Method Summary

Modifier and TypeMethod and Description
public void
add(SessionLocal
the session to use
session
,
Row
the row to add
row
)

Implements abstract org.h2.index.Index.add.

Add a row to the index.

public void
checkRename()

Overrides org.h2.engine.DbObject.checkRename.

Check if renaming is allowed.

public void
close(SessionLocal
the session used to write data
session
)

Implements abstract org.h2.index.Index.close.

Close this index.

public String
getPlanSQL()

Overrides org.h2.index.Index.getPlanSQL.

Get the message to show in a EXPLAIN statement.

public Query
public long
getRowCount(SessionLocal
the session
session
)

Implements abstract org.h2.index.Index.getRowCount.

Get the row count of this table, for the given session.

public long
getRowCountApproximation(SessionLocal
the session
session
)

Implements abstract org.h2.index.Index.getRowCountApproximation.

Get the approximated row count for this table.

public abstract boolean
public boolean
needRebuild()

Implements abstract org.h2.index.Index.needRebuild.

Check if the index needs to be rebuilt.

public void
remove(SessionLocal
the session
session
,
Row
the row
row
)

Implements abstract org.h2.index.Index.remove.

Remove a row from the index.

public void
remove(SessionLocal
the session
session
)

Implements abstract org.h2.index.Index.remove.

Remove the index.

public void
truncate(SessionLocal
the session
session
)

Implements abstract org.h2.index.Index.truncate.

Remove all rows from the index.

Inherited from org.h2.index.Index:
canFindNextcanGetFirstOrLastcanScancheckIndexColumnTypescompareRowsfindfindFirstOrLastfindNextgetColumnIndexgetColumnsgetCostgetCostRangeIndexgetCreateSQLgetCreateSQLForCopygetDiskSpaceUsedgetDuplicateKeyExceptiongetDuplicatePrimaryKeyMessagegetIndexColumnsgetIndexTypegetRowgetRowFactorygetTablegetTypegetUniqueColumnCountgetUniqueRowFactoryisFindUsingFullTableScanisFirstColumnisRowIdIndexneedsUniqueCheckremoveChildrenAndResourcesupdate

Field Detail

originalParametersback to summary
pack-priv final ArrayList<Parameter> originalParameters
queryback to summary
pack-priv Query query
querySQLback to summary
pack-priv final String querySQL
tableback to summary
pack-priv final QueryExpressionTable table

Hides org.h2.index.Index.table.

Constructor Detail

QueryExpressionIndexback to summary
pack-priv QueryExpressionIndex(QueryExpressionTable table, String querySQL, ArrayList<Parameter> originalParameters)

Method Detail

addback to summary
public void add(SessionLocal session, Row row)

Implements abstract org.h2.index.Index.add.

Doc from org.h2.index.Index.add.

Add a row to the index.

Parameters
session:SessionLocal

the session to use

row:Row

the row to add

Annotations
@Override
checkRenameback to summary
public void checkRename()

Overrides org.h2.engine.DbObject.checkRename.

Doc from org.h2.engine.DbObject.checkRename.

Check if renaming is allowed. Does nothing when allowed.

Annotations
@Override
closeback to summary
public void close(SessionLocal session)

Implements abstract org.h2.index.Index.close.

Doc from org.h2.index.Index.close.

Close this index.

Parameters
session:SessionLocal

the session used to write data

Annotations
@Override
getPlanSQLback to summary
public String getPlanSQL()

Overrides org.h2.index.Index.getPlanSQL.

Doc from org.h2.index.Index.getPlanSQL.

Get the message to show in a EXPLAIN statement.

Returns:String

the plan

Annotations
@Override
getQueryback to summary
public Query getQuery()
getRowCountback to summary
public long getRowCount(SessionLocal session)

Implements abstract org.h2.index.Index.getRowCount.

Doc from org.h2.index.Index.getRowCount.

Get the row count of this table, for the given session.

Parameters
session:SessionLocal

the session

Returns:long

the row count

Annotations
@Override
getRowCountApproximationback to summary
public long getRowCountApproximation(SessionLocal session)

Implements abstract org.h2.index.Index.getRowCountApproximation.

Doc from org.h2.index.Index.getRowCountApproximation.

Get the approximated row count for this table.

Parameters
session:SessionLocal

the session

Returns:long

the approximated row count

Annotations
@Override
isExpiredback to summary
public abstract boolean isExpired()
needRebuildback to summary
public boolean needRebuild()

Implements abstract org.h2.index.Index.needRebuild.

Doc from org.h2.index.Index.needRebuild.

Check if the index needs to be rebuilt. This method is called after opening an index.

Returns:boolean

true if a rebuild is required.

Annotations
@Override
removeback to summary
public void remove(SessionLocal session, Row row)

Implements abstract org.h2.index.Index.remove.

Doc from org.h2.index.Index.remove.

Remove a row from the index.

Parameters
session:SessionLocal

the session

row:Row

the row

Annotations
@Override
removeback to summary
public void remove(SessionLocal session)

Implements abstract org.h2.index.Index.remove.

Doc from org.h2.index.Index.remove.

Remove the index.

Parameters
session:SessionLocal

the session

Annotations
@Override
truncateback to summary
public void truncate(SessionLocal session)

Implements abstract org.h2.index.Index.truncate.

Doc from org.h2.index.Index.truncate.

Remove all rows from the index.

Parameters
session:SessionLocal

the session

Annotations
@Override