Top Description Fields Constructors Methods
org.h2.index

public abstract Class VirtualTableIndex

extends Index
Class Inheritance
Known Direct Subclasses
org.h2.index.DualIndex, org.h2.index.RangeIndex, org.h2.index.VirtualConstructedTableIndex
Imports
org.h2.engine.SessionLocal, org.h2.message.DbException, org.h2.result.Row, org.h2.table.IndexColumn, .VirtualTable

An base class for indexes of virtual tables.

Field Summary

Inherited from org.h2.index.Index:
columnIdscolumnsindexColumnsindexTypetableuniqueColumnColumn

Constructor Summary

AccessConstructor and Description
protected

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 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 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:
canFindNextcanGetFirstOrLastcanScancheckIndexColumnTypescompareRowsfindfindFirstOrLastfindNextgetColumnIndexgetColumnsgetCostgetCostRangeIndexgetCreateSQLgetCreateSQLForCopygetDiskSpaceUsedgetDuplicateKeyExceptiongetDuplicatePrimaryKeyMessagegetIndexColumnsgetIndexTypegetPlanSQLgetRowgetRowFactorygetTablegetTypegetUniqueColumnCountgetUniqueRowFactoryisFindUsingFullTableScanisFirstColumnisRowIdIndexneedsUniqueCheckremoveChildrenAndResourcesupdate

Constructor Detail

VirtualTableIndexback to summary
protected VirtualTableIndex(VirtualTable table, String name, IndexColumn[] columns)

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
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
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