Package org.h2.mode
Class PgCatalogTable
java.lang.Object
org.h2.engine.DbObject
org.h2.schema.SchemaObject
org.h2.table.Table
org.h2.table.MetaTable
org.h2.mode.PgCatalogTable
- All Implemented Interfaces:
HasSQL
This class is responsible to build the pg_catalog tables.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The number of meta table types.private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final Object[][]
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
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, isHidden, 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
ConstructorsConstructorDescriptionPgCatalogTable
(Schema schema, int id, int type) Create a new metadata table. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addAttribute
(SessionLocal session, ArrayList<Row> rows, int id, int relId, Table table, Column column, int ordinal) private void
addClass
(SessionLocal session, ArrayList<Row> rows, int id, String name, int schema, String kind, boolean index, int triggers) generateRows
(SessionLocal session, SearchRow first, SearchRow last) Generate the data for the given metadata table using the given first and last row filters.long
Get the last data modification id.private void
pgAttribute
(SessionLocal session, ArrayList<Row> rows, Table table) private void
pgClass
(SessionLocal session, ArrayList<Row> rows, Table table) private void
pgConstraint
(SessionLocal session, ArrayList<Row> rows) Methods inherited from class org.h2.table.MetaTable
add, addIndex, addRow, canDrop, canGetRowCount, canReference, checkIndex, checkRename, checkSupportAlter, close, column, getCreateSQL, getIndexes, getRowCount, getRowCountApproximation, getScanIndex, getTableType, hideTable, identifier, isDeterministic, isInsertable, removeChildrenAndResources, removeRow, setMetaTableName, truncate
Methods inherited from class org.h2.table.Table
addConstraint, addDependencies, 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, getCreateSQLForCopy, getDependentViews, getDiskSpaceUsed, getIdentityColumn, getIndex, getIndexForColumn, getMainIndexColumn, getNullRow, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getRow, getRowFactory, getRowIdColumn, getScanIndex, getSQLTableType, getTemplateRow, getTemplateSimpleRow, getTriggers, getType, hasSelectTrigger, isGlobalTemporary, isHidden, isLockedExclusively, isLockedExclusivelyBy, isPersistData, isPersistIndexes, isQueryComparable, isRowLockable, isTableExpression, isView, lock, lockRow, removeColumnExpressionsDependencies, removeConstraint, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, setTableExpression, unlock, updateRow, updateRows
Methods inherited from class org.h2.schema.SchemaObject
getSchema, getSQL, getSQL
Methods inherited from class org.h2.engine.DbObject
getComment, getCreateSQLForMeta, getDatabase, getDropSQL, getId, getModificationId, getName, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.h2.util.HasSQL
getTraceSQL
-
Field Details
-
PG_AM
private static final int PG_AM- See Also:
-
PG_ATTRDEF
private static final int PG_ATTRDEF- See Also:
-
PG_ATTRIBUTE
private static final int PG_ATTRIBUTE- See Also:
-
PG_AUTHID
private static final int PG_AUTHID- See Also:
-
PG_CLASS
private static final int PG_CLASS- See Also:
-
PG_CONSTRAINT
private static final int PG_CONSTRAINT- See Also:
-
PG_DATABASE
private static final int PG_DATABASE- See Also:
-
PG_DESCRIPTION
private static final int PG_DESCRIPTION- See Also:
-
PG_GROUP
private static final int PG_GROUP- See Also:
-
PG_INDEX
private static final int PG_INDEX- See Also:
-
PG_INHERITS
private static final int PG_INHERITS- See Also:
-
PG_NAMESPACE
private static final int PG_NAMESPACE- See Also:
-
PG_PROC
private static final int PG_PROC- See Also:
-
PG_ROLES
private static final int PG_ROLES- See Also:
-
PG_SETTINGS
private static final int PG_SETTINGS- See Also:
-
PG_TABLESPACE
private static final int PG_TABLESPACE- See Also:
-
PG_TRIGGER
private static final int PG_TRIGGER- See Also:
-
PG_TYPE
private static final int PG_TYPE- See Also:
-
PG_USER
private static final int PG_USER- See Also:
-
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:
-
PG_EXTRA_TYPES
-
-
Constructor Details
-
PgCatalogTable
Create a new metadata table.- Parameters:
schema
- the schemaid
- the object idtype
- the meta table type
-
-
Method Details
-
generateRows
Description copied from class:MetaTable
Generate the data for the given metadata table using the given first and last row filters.- Specified by:
generateRows
in classMetaTable
- Parameters:
session
- the sessionfirst
- the first row to returnlast
- the last row to return- Returns:
- the generated rows
-
pgAttribute
-
pgClass
-
pgConstraint
-
addAttribute
private void addAttribute(SessionLocal session, ArrayList<Row> rows, int id, int relId, Table table, Column column, int ordinal) -
addClass
private void addClass(SessionLocal session, ArrayList<Row> rows, int id, String name, int schema, String kind, boolean index, int triggers) -
getMaxDataModificationId
public long getMaxDataModificationId()Description copied from class:Table
Get the last data modification id.- Specified by:
getMaxDataModificationId
in classTable
- Returns:
- the modification id
-