Package org.h2.table
Class InformationSchemaTableLegacy
- java.lang.Object
-
- org.h2.engine.DbObject
-
- org.h2.schema.SchemaObject
-
- org.h2.table.Table
-
- org.h2.table.MetaTable
-
- org.h2.table.InformationSchemaTableLegacy
-
-
Field Summary
Fields Modifier and Type Field Description private static int
CATALOGS
private static java.lang.String
CHARACTER_SET_NAME
private static int
CHECK_CONSTRAINTS
private static int
COLLATIONS
private static int
COLUMN_PRIVILEGES
private static int
COLUMNS
private static int
CONSTANTS
private static int
CONSTRAINT_COLUMN_USAGE
private static int
CONSTRAINTS
private static int
CROSS_REFERENCES
private static int
DOMAIN_CONSTRAINTS
private static int
DOMAINS
private static int
FUNCTION_ALIASES
private static int
FUNCTION_COLUMNS
private static int
HELP
private static int
IN_DOUBT
private static int
INDEXES
private static int
KEY_COLUMN_USAGE
private static int
LOCKS
static int
META_TABLE_TYPE_COUNT
The number of meta table types.private static int
QUERY_STATISTICS
private static int
REFERENTIAL_CONSTRAINTS
private static int
RIGHTS
private static int
ROLES
private static int
SCHEMATA
private static int
SEQUENCES
private static int
SESSION_STATE
private static int
SESSIONS
private static int
SETTINGS
private static int
SYNONYMS
private static int
TABLE_CONSTRAINTS
private static int
TABLE_PRIVILEGES
private static int
TABLE_TYPES
private static int
TABLES
private static int
TRIGGERS
private static int
TYPE_INFO
private static int
USERS
private static int
VIEWS
-
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
Constructors Constructor Description InformationSchemaTableLegacy(Schema schema, int id, int type)
Create a new metadata table.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addConstraintColumnUsage(SessionLocal session, java.util.ArrayList<Row> rows, java.lang.String catalog, Constraint constraint, Column column)
private void
addPrivilege(SessionLocal session, java.util.ArrayList<Row> rows, DbObject grantee, java.lang.String catalog, Table table, java.lang.String column, java.lang.String right)
private void
addPrivileges(SessionLocal session, java.util.ArrayList<Row> rows, DbObject grantee, java.lang.String catalog, Table table, java.lang.String column, int rightMask)
java.util.ArrayList<Row>
generateRows(SessionLocal session, SearchRow first, SearchRow last)
Generate the data for the given metadata table using the given first and last row filters.private java.util.ArrayList<SchemaObject>
getAllSchemaObjects(int type)
private java.util.ArrayList<Table>
getAllTables(SessionLocal session)
Get all tables of this database, including local temporary tables for the session.long
getMaxDataModificationId()
Get the last data modification id.private static short
getRefAction(ConstraintActionType action)
private java.util.ArrayList<Table>
getTablesByName(SessionLocal session, java.lang.String tableName)
private static java.lang.String
replaceNullWithEmpty(java.lang.String s)
-
Methods inherited from class org.h2.table.MetaTable
add, addIndex, addRow, canDrop, canGetRowCount, canReference, checkIndex, checkRename, checkSupportAlter, close, column, 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 Detail
-
CHARACTER_SET_NAME
private static final java.lang.String CHARACTER_SET_NAME
- See Also:
- Constant Field Values
-
TABLES
private static final int TABLES
- See Also:
- Constant Field Values
-
COLUMNS
private static final int COLUMNS
- See Also:
- Constant Field Values
-
INDEXES
private static final int INDEXES
- See Also:
- Constant Field Values
-
TABLE_TYPES
private static final int TABLE_TYPES
- See Also:
- Constant Field Values
-
TYPE_INFO
private static final int TYPE_INFO
- See Also:
- Constant Field Values
-
CATALOGS
private static final int CATALOGS
- See Also:
- Constant Field Values
-
SETTINGS
private static final int SETTINGS
- See Also:
- Constant Field Values
-
HELP
private static final int HELP
- See Also:
- Constant Field Values
-
SEQUENCES
private static final int SEQUENCES
- See Also:
- Constant Field Values
-
USERS
private static final int USERS
- See Also:
- Constant Field Values
-
ROLES
private static final int ROLES
- See Also:
- Constant Field Values
-
RIGHTS
private static final int RIGHTS
- See Also:
- Constant Field Values
-
FUNCTION_ALIASES
private static final int FUNCTION_ALIASES
- See Also:
- Constant Field Values
-
SCHEMATA
private static final int SCHEMATA
- See Also:
- Constant Field Values
-
TABLE_PRIVILEGES
private static final int TABLE_PRIVILEGES
- See Also:
- Constant Field Values
-
COLUMN_PRIVILEGES
private static final int COLUMN_PRIVILEGES
- See Also:
- Constant Field Values
-
COLLATIONS
private static final int COLLATIONS
- See Also:
- Constant Field Values
-
VIEWS
private static final int VIEWS
- See Also:
- Constant Field Values
-
IN_DOUBT
private static final int IN_DOUBT
- See Also:
- Constant Field Values
-
CROSS_REFERENCES
private static final int CROSS_REFERENCES
- See Also:
- Constant Field Values
-
FUNCTION_COLUMNS
private static final int FUNCTION_COLUMNS
- See Also:
- Constant Field Values
-
CONSTRAINTS
private static final int CONSTRAINTS
- See Also:
- Constant Field Values
-
CONSTANTS
private static final int CONSTANTS
- See Also:
- Constant Field Values
-
DOMAINS
private static final int DOMAINS
- See Also:
- Constant Field Values
-
TRIGGERS
private static final int TRIGGERS
- See Also:
- Constant Field Values
-
SESSIONS
private static final int SESSIONS
- See Also:
- Constant Field Values
-
LOCKS
private static final int LOCKS
- See Also:
- Constant Field Values
-
SESSION_STATE
private static final int SESSION_STATE
- See Also:
- Constant Field Values
-
QUERY_STATISTICS
private static final int QUERY_STATISTICS
- See Also:
- Constant Field Values
-
SYNONYMS
private static final int SYNONYMS
- See Also:
- Constant Field Values
-
TABLE_CONSTRAINTS
private static final int TABLE_CONSTRAINTS
- See Also:
- Constant Field Values
-
DOMAIN_CONSTRAINTS
private static final int DOMAIN_CONSTRAINTS
- See Also:
- Constant Field Values
-
KEY_COLUMN_USAGE
private static final int KEY_COLUMN_USAGE
- See Also:
- Constant Field Values
-
REFERENTIAL_CONSTRAINTS
private static final int REFERENTIAL_CONSTRAINTS
- See Also:
- Constant Field Values
-
CHECK_CONSTRAINTS
private static final int CHECK_CONSTRAINTS
- See Also:
- Constant Field Values
-
CONSTRAINT_COLUMN_USAGE
private static final int CONSTRAINT_COLUMN_USAGE
- See Also:
- Constant Field Values
-
META_TABLE_TYPE_COUNT
public static final int META_TABLE_TYPE_COUNT
The number of meta table types. Supported meta table types are0..META_TABLE_TYPE_COUNT - 1
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InformationSchemaTableLegacy
public InformationSchemaTableLegacy(Schema schema, int id, int type)
Create a new metadata table.- Parameters:
schema
- the schemaid
- the object idtype
- the meta table type
-
-
Method Detail
-
replaceNullWithEmpty
private static java.lang.String replaceNullWithEmpty(java.lang.String s)
-
generateRows
public java.util.ArrayList<Row> generateRows(SessionLocal session, SearchRow first, SearchRow last)
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
-
getRefAction
private static short getRefAction(ConstraintActionType action)
-
addConstraintColumnUsage
private void addConstraintColumnUsage(SessionLocal session, java.util.ArrayList<Row> rows, java.lang.String catalog, Constraint constraint, Column column)
-
addPrivileges
private void addPrivileges(SessionLocal session, java.util.ArrayList<Row> rows, DbObject grantee, java.lang.String catalog, Table table, java.lang.String column, int rightMask)
-
addPrivilege
private void addPrivilege(SessionLocal session, java.util.ArrayList<Row> rows, DbObject grantee, java.lang.String catalog, Table table, java.lang.String column, java.lang.String right)
-
getAllSchemaObjects
private java.util.ArrayList<SchemaObject> getAllSchemaObjects(int type)
-
getAllTables
private java.util.ArrayList<Table> getAllTables(SessionLocal session)
Get all tables of this database, including local temporary tables for the session.- Parameters:
session
- the session- Returns:
- the array of tables
-
getTablesByName
private java.util.ArrayList<Table> getTablesByName(SessionLocal session, java.lang.String tableName)
-
getMaxDataModificationId
public long getMaxDataModificationId()
Description copied from class:Table
Get the last data modification id.- Specified by:
getMaxDataModificationId
in classTable
- Returns:
- the modification id
-
-