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 intThe number of meta table types.private static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final Object[][]private static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intFields inherited from class MetaTable
indexColumn, metaIndex, ROW_COUNT_APPROXIMATION, typeFields inherited from class Table
columns, compareMode, EXCLUSIVE_LOCK, isHidden, READ_LOCK, TYPE_CACHED, TYPE_MEMORY, WRITE_LOCKFields inherited from class 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 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 voidaddAttribute(SessionLocal session, ArrayList<Row> rows, int id, int relId, Table table, Column column, int ordinal) private voidaddClass(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.longGet the last data modification id.private voidpgAttribute(SessionLocal session, ArrayList<Row> rows, Table table) private voidpgClass(SessionLocal session, ArrayList<Row> rows, Table table) private voidpgConstraint(SessionLocal session, ArrayList<Row> rows) Methods inherited from class 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, truncateMethods inherited from class 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, updateRowsMethods inherited from class SchemaObject
getSchema, getSQL, getSQLMethods inherited from class DbObject
getComment, getCreateSQLForMeta, getDatabase, getDropSQL, getId, getModificationId, getName, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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: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
-
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:TableGet the last data modification id.- Specified by:
getMaxDataModificationIdin classTable- Returns:
- the modification id
-