Top Description Fields Constructors Methods
org.h2.table

public final Class InformationSchemaTableLegacy

extends MetaTable
Class Inheritance
Imports
java.io.ByteArrayInputStream, .InputStreamReader, .Reader, java.nio.charset.StandardCharsets, java.sql.DatabaseMetaData, .ResultSet, .Types, java.util.ArrayList, .BitSet, .HashSet, .Locale, .Map, org.h2.command.Command, .ParserBase, org.h2.command.dml.Help, org.h2.constraint.Constraint, .Constraint.Type, .ConstraintActionType, .ConstraintDomain, .ConstraintReferential, .ConstraintUnique, org.h2.engine.Constants, .DbObject, .QueryStatisticsData, .Right, .RightOwner, .Role, .SessionLocal, .SessionLocal.State, .Setting, .User, org.h2.expression.Expression, .ExpressionVisitor, .ValueExpression, org.h2.index.Index, .MetaIndex, org.h2.message.DbException, org.h2.result.Row, .SearchRow, .SortOrder, org.h2.schema.Constant, .Domain, .FunctionAlias, .FunctionAlias.JavaMethod, .Schema, .SchemaObject, .Sequence, .TriggerObject, .UserDefinedFunction, org.h2.store.InDoubtTransaction, org.h2.tools.Csv, org.h2.util.DateTimeUtils, .HasSQL, .MathUtils, .NetworkConnectionInfo, .StringUtils, .TimeZoneProvider, .Utils, org.h2.value.CompareMode, .DataType, .TypeInfo, .Value, .ValueBigint, .ValueBoolean, .ValueDouble, .ValueInteger, .ValueSmallint, .ValueToObjectConverter2

This class is responsible to build the legacy variant of INFORMATION_SCHEMA tables.

Field Summary

Modifier and TypeField and Description
private static final int
private static final String
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
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
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 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
InformationSchemaTableLegacy(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
addConstraintColumnUsage(SessionLocal session, ArrayList<Row> rows, String catalog, Constraint constraint, Column column)

private void
addPrivilege(SessionLocal session, ArrayList<Row> rows, DbObject grantee, String catalog, Table table, String column, String right)

private void
addPrivileges(SessionLocal session, ArrayList<Row> rows, DbObject grantee, String catalog, Table table, String column, int rightMask)

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.

private ArrayList<SchemaObject>
public long
getMaxDataModificationId()

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

Get the last data modification id.

private static short
private static String
Inherited from org.h2.table.MetaTable:
addaddIndexaddRowcanDropcanGetRowCountcanReferencecheckIndexcheckRenamecheckSupportAlterclosecolumncolumngetAllConstraintsgetAllTablesgetCreateSQLgetIndexesgetRowCountgetRowCountApproximationgetScanIndexgetTableTypeidentifierisDeterministicisInsertableremoveChildrenAndResourcesremoveRowsetMetaTableNametruncate

Field Detail

CATALOGSback to summary
private static final int CATALOGS
CHARACTER_SET_NAMEback to summary
private static final String CHARACTER_SET_NAME
CHECK_CONSTRAINTSback to summary
private static final int CHECK_CONSTRAINTS
COLLATIONSback to summary
private static final int COLLATIONS
COLUMN_PRIVILEGESback to summary
private static final int COLUMN_PRIVILEGES
COLUMNSback to summary
private static final int COLUMNS
CONSTANTSback to summary
private static final int CONSTANTS
CONSTRAINT_COLUMN_USAGEback to summary
private static final int CONSTRAINT_COLUMN_USAGE
CONSTRAINTSback to summary
private static final int CONSTRAINTS
CROSS_REFERENCESback to summary
private static final int CROSS_REFERENCES
DOMAIN_CONSTRAINTSback to summary
private static final int DOMAIN_CONSTRAINTS
DOMAINSback to summary
private static final int DOMAINS
FUNCTION_ALIASESback to summary
private static final int FUNCTION_ALIASES
FUNCTION_COLUMNSback to summary
private static final int FUNCTION_COLUMNS
HELPback to summary
private static final int HELP
IN_DOUBTback to summary
private static final int IN_DOUBT
INDEXESback to summary
private static final int INDEXES
KEY_COLUMN_USAGEback to summary
private static final int KEY_COLUMN_USAGE
LOCKSback to summary
private static final int LOCKS
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.

QUERY_STATISTICSback to summary
private static final int QUERY_STATISTICS
REFERENTIAL_CONSTRAINTSback to summary
private static final int REFERENTIAL_CONSTRAINTS
RIGHTSback to summary
private static final int RIGHTS
ROLESback to summary
private static final int ROLES
SCHEMATAback to summary
private static final int SCHEMATA
SEQUENCESback to summary
private static final int SEQUENCES
SESSION_STATEback to summary
private static final int SESSION_STATE
SESSIONSback to summary
private static final int SESSIONS
SETTINGSback to summary
private static final int SETTINGS
SYNONYMSback to summary
private static final int SYNONYMS
TABLE_CONSTRAINTSback to summary
private static final int TABLE_CONSTRAINTS
TABLE_PRIVILEGESback to summary
private static final int TABLE_PRIVILEGES
TABLE_TYPESback to summary
private static final int TABLE_TYPES
TABLESback to summary
private static final int TABLES
TRIGGERSback to summary
private static final int TRIGGERS
TYPE_INFOback to summary
private static final int TYPE_INFO
USERSback to summary
private static final int USERS
VIEWSback to summary
private static final int VIEWS

Constructor Detail

InformationSchemaTableLegacyback to summary
public InformationSchemaTableLegacy(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

addConstraintColumnUsageback to summary
private void addConstraintColumnUsage(SessionLocal session, ArrayList<Row> rows, String catalog, Constraint constraint, Column column)
addPrivilegeback to summary
private void addPrivilege(SessionLocal session, ArrayList<Row> rows, DbObject grantee, String catalog, Table table, String column, String right)
addPrivilegesback to summary
private void addPrivileges(SessionLocal session, ArrayList<Row> rows, DbObject grantee, String catalog, Table table, String column, int rightMask)
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
getAllSchemaObjectsback to summary
private ArrayList<SchemaObject> getAllSchemaObjects(int type)
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
getRefActionback to summary
private static short getRefAction(ConstraintActionType action)
replaceNullWithEmptyback to summary
private static String replaceNullWithEmpty(String s)