Top Description Fields Constructors Methods
org.h2.mode

public final Class PgCatalogTable

extends MetaTable
Class Inheritance
Imports
java.util.ArrayList, .HashSet, org.h2.constraint.Constraint, org.h2.engine.Constants, .RightOwner, .SessionLocal, .User, org.h2.index.Index, org.h2.message.DbException, org.h2.result.Row, .SearchRow, org.h2.schema.Schema, .TriggerObject, org.h2.server.pg.PgServer, org.h2.table.Column, .MetaTable, .Table, org.h2.util.StringUtils, .Utils, org.h2.value.DataType, .TypeInfo, .Value, .ValueArray, .ValueBoolean, .ValueDouble, .ValueInteger, .ValueSmallint

This class is responsible to build the pg_catalog tables.

Field Summary

Modifier and TypeField and Description
public static final int
META_TABLE_TYPE_COUNT

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
Inherited from org.h2.table.MetaTable:
indexColumnmetaIndexROW_COUNT_APPROXIMATIONtype

Constructor Summary

AccessConstructor and Description
public
PgCatalogTable(Schema
the schema
schema
,
int
the object id
id
,
int
the meta table type
type
)

Create a new metadata table.

Method Summary

Modifier and TypeMethod and Description
private void
addAttribute(SessionLocal session, ArrayList<Row> rows, int id, int relId, Column column, int ordinal)

private void
addClass(SessionLocal session, ArrayList<Row> rows, int id, String name, int schema, String kind, boolean index, int triggers)

public ArrayList<Row>
generateRows(SessionLocal
the session
session
,
SearchRow
the first row to return
first
,
SearchRow
the last row to return
last
)

Implements abstract org.h2.table.MetaTable.generateRows.

Generate the data for the given metadata table using the given first and last row filters.

public long
getMaxDataModificationId()

Implements abstract org.h2.table.Table.getMaxDataModificationId.

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
Inherited from org.h2.table.MetaTable:
addaddIndexaddRowcanDropcanGetRowCountcanReferencecheckIndexcheckRenamecheckSupportAlterclosecolumngetAllConstraintsgetAllTablesgetCreateSQLgetIndexesgetRowCountgetRowCountApproximationgetScanIndexgetTableTypeidentifierisDeterministicisInsertableremoveChildrenAndResourcesremoveRowsetMetaTableNametruncate

Field Detail

META_TABLE_TYPE_COUNTback to summary
public static final int META_TABLE_TYPE_COUNT

The number of meta table types. Supported meta table types are 0..META_TABLE_TYPE_COUNT - 1.

PG_AMback to summary
private static final int PG_AM
PG_ATTRDEFback to summary
private static final int PG_ATTRDEF
PG_ATTRIBUTEback to summary
private static final int PG_ATTRIBUTE
PG_AUTHIDback to summary
private static final int PG_AUTHID
PG_CLASSback to summary
private static final int PG_CLASS
PG_CONSTRAINTback to summary
private static final int PG_CONSTRAINT
PG_DATABASEback to summary
private static final int PG_DATABASE
PG_DESCRIPTIONback to summary
private static final int PG_DESCRIPTION
PG_EXTRA_TYPESback to summary
private static final Object[][] PG_EXTRA_TYPES
PG_GROUPback to summary
private static final int PG_GROUP
PG_INDEXback to summary
private static final int PG_INDEX
PG_INHERITSback to summary
private static final int PG_INHERITS
PG_NAMESPACEback to summary
private static final int PG_NAMESPACE
PG_PROCback to summary
private static final int PG_PROC
PG_ROLESback to summary
private static final int PG_ROLES
PG_SETTINGSback to summary
private static final int PG_SETTINGS
PG_TABLESPACEback to summary
private static final int PG_TABLESPACE
PG_TRIGGERback to summary
private static final int PG_TRIGGER
PG_TYPEback to summary
private static final int PG_TYPE
PG_USERback to summary
private static final int PG_USER

Constructor Detail

PgCatalogTableback to summary
public PgCatalogTable(Schema schema, int id, int type)

Create a new metadata table.

Parameters
schema:Schema

the schema

id:int

the object id

type:int

the meta table type

Method Detail

addAttributeback to summary
private void addAttribute(SessionLocal session, ArrayList<Row> rows, int id, int relId, Column column, int ordinal)
addClassback to summary
private void addClass(SessionLocal session, ArrayList<Row> rows, int id, String name, int schema, String kind, boolean index, int triggers)
generateRowsback to summary
public ArrayList<Row> generateRows(SessionLocal session, SearchRow first, SearchRow last)

Implements abstract org.h2.table.MetaTable.generateRows.

Doc from org.h2.table.MetaTable.generateRows.

Generate the data for the given metadata table using the given first and last row filters.

Parameters
session:SessionLocal

the session

first:SearchRow

the first row to return

last:SearchRow

the last row to return

Returns:ArrayList<Row>

the generated rows

Annotations
@Override
getMaxDataModificationIdback to summary
public long getMaxDataModificationId()

Implements abstract org.h2.table.Table.getMaxDataModificationId.

Doc from org.h2.table.Table.getMaxDataModificationId.

Get the last data modification id.

Returns:long

the modification id

Annotations
@Override
pgAttributeback to summary
private void pgAttribute(SessionLocal session, ArrayList<Row> rows, Table table)
pgClassback to summary
private void pgClass(SessionLocal session, ArrayList<Row> rows, Table table)
pgConstraintback to summary
private void pgConstraint(SessionLocal session, ArrayList<Row> rows)