Package org.h2.table
Class InformationSchemaTable
- java.lang.Object
-
- org.h2.engine.DbObject
-
- org.h2.schema.SchemaObject
-
- org.h2.table.Table
-
- org.h2.table.MetaTable
-
- org.h2.table.InformationSchemaTable
-
-
Field Summary
Fields Modifier and Type Field Description static intMETA_TABLE_TYPE_COUNTThe number of meta table types.-
Fields inherited from class org.h2.table.MetaTable
indexColumn, metaIndex, ROW_COUNT_APPROXIMATION, type
-
Fields inherited from class org.h2.table.Table
columns, compareMode, EXCLUSIVE_LOCK, READ_LOCK, TYPE_CACHED, TYPE_MEMORY, WRITE_LOCK
-
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 InformationSchemaTable(Schema schema, int id, int type)Create a new metadata table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanGetRowCount(SessionLocal session)Check if the row count can be retrieved quickly.java.util.ArrayList<Row>generateRows(SessionLocal session, SearchRow first, SearchRow last)Generate the data for the given metadata table using the given first and last row filters.longgetMaxDataModificationId()Get the last data modification id.longgetRowCount(SessionLocal session)Get the row count for this table.longgetRowCountApproximation(SessionLocal session)Get the approximated row count for this table.booleanisView()-
Methods inherited from class org.h2.table.MetaTable
add, addIndex, addRow, canDrop, canReference, checkIndex, checkRename, checkSupportAlter, close, column, getAllConstraints, getAllTables, getCreateSQL, getIndexes, getScanIndex, getTableType, identifier, isDeterministic, isInsertable, removeChildrenAndResources, removeRow, setColumns, setMetaTableName, truncate
-
Methods inherited from class org.h2.table.Table
addConstraint, addDependencies, addDependentMaterializedView, addDependentView, addSequence, addSynonym, addTrigger, canTruncate, checkDeadlock, checkWritingAllowed, compareValues, convertInsertRow, convertUpdateRow, createRow, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findColumn, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getDependentMaterializedViews, getDependentViews, getDiskSpaceUsed, getIdentityColumn, getIndex, getIndexForColumn, getMainIndexColumn, getNullRow, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getRow, getRowFactory, getRowIdColumn, getScanIndex, getSQLTableType, getTemplateRow, getTemplateSimpleRow, getTriggers, getType, getVisibleColumns, hasSelectTrigger, isGlobalTemporary, isLockedExclusively, isLockedExclusivelyBy, isPersistData, isPersistIndexes, isQueryComparable, isRowLockable, lock, lockRow, removeColumnExpressionsDependencies, removeConstraint, removeDependentMaterializedView, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setOnCommitDrop, setOnCommitTruncate, unlock, updateRow, updateRows
-
Methods inherited from class org.h2.schema.SchemaObject
getSchema, getSQL, getSQL
-
Methods inherited from class org.h2.engine.DbObject
equals, getComment, getCreateSQLForCopy, getCreateSQLForMeta, getDatabase, getDropSQL, getId, getModificationId, getName, hashCode, invalidate, isTemporary, isValid, 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
-
-
-
-
Field Detail
-
META_TABLE_TYPE_COUNT
public static final int META_TABLE_TYPE_COUNT
The number of meta table types. Supported meta table types are0..META_TABLE_TYPE_COUNT - 1.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InformationSchemaTable
public InformationSchemaTable(Schema schema, int id, int type)
Create a new metadata table.- Parameters:
schema- the schemaid- the object idtype- the meta table type
-
-
Method Detail
-
generateRows
public java.util.ArrayList<Row> generateRows(SessionLocal session, SearchRow first, SearchRow last)
Description copied from class:MetaTableGenerate the data for the given metadata table using the given first and last row filters.- Specified by:
generateRowsin classMetaTable- Parameters:
session- the sessionfirst- the first row to returnlast- the last row to return- Returns:
- the generated rows
-
getMaxDataModificationId
public long getMaxDataModificationId()
Description copied from class:TableGet the last data modification id.- Specified by:
getMaxDataModificationIdin classTable- Returns:
- the modification id
-
getRowCount
public long getRowCount(SessionLocal session)
Description copied from class:TableGet the row count for this table.- Overrides:
getRowCountin classMetaTable- Parameters:
session- the session- Returns:
- the row count
-
getRowCountApproximation
public long getRowCountApproximation(SessionLocal session)
Description copied from class:TableGet the approximated row count for this table.- Overrides:
getRowCountApproximationin classMetaTable- Parameters:
session- the session- Returns:
- the approximated row count
-
canGetRowCount
public boolean canGetRowCount(SessionLocal session)
Description copied from class:TableCheck if the row count can be retrieved quickly.- Overrides:
canGetRowCountin classMetaTable- Parameters:
session- the session- Returns:
- true if it can
-
-