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
- All Implemented Interfaces:
HasSQL
This class is responsible to build the INFORMATION_SCHEMA tables.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe number of meta table types.Fields inherited from class org.h2.table.MetaTable
indexColumn, metaIndex, ROW_COUNT_APPROXIMATION, typeFields inherited from class org.h2.table.Table
columns, compareMode, EXCLUSIVE_LOCK, READ_LOCK, TYPE_CACHED, TYPE_MEMORY, WRITE_LOCKFields 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, USERFields 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
ConstructorsConstructorDescriptionInformationSchemaTable(Schema schema, int id, int type) Create a new metadata table. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanGetRowCount(SessionLocal session) Check if the row count can be retrieved quickly.generateRows(SessionLocal session, SearchRow first, SearchRow last) Generate the data for the given metadata table using the given first and last row filters.longGet 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, truncateMethods 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, updateRowsMethods inherited from class org.h2.schema.SchemaObject
getSchema, getSQL, getSQLMethods inherited from class org.h2.engine.DbObject
equals, getComment, getCreateSQLForCopy, getCreateSQLForMeta, getDatabase, getDropSQL, getId, getModificationId, getName, hashCode, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.h2.util.HasSQL
getTraceSQL
-
Field Details
-
META_TABLE_TYPE_COUNT
public static final int META_TABLE_TYPE_COUNTThe number of meta table types. Supported meta table types are0..META_TABLE_TYPE_COUNT - 1.- See Also:
-
-
Constructor Details
-
InformationSchemaTable
Create a new metadata table.- Parameters:
schema- the schemaid- the object idtype- the meta table type
-
-
Method Details
-
generateRows
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
-
isView
public boolean isView() -
getRowCount
Description copied from class:TableGet the row count for this table.- Overrides:
getRowCountin classMetaTable- Parameters:
session- the session- Returns:
- the row count
-
getRowCountApproximation
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
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
-