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
- All Implemented Interfaces:
HasSQL
This class is responsible to build the legacy variant of INFORMATION_SCHEMA
tables.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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
static 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 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
ConstructorsConstructorDescriptionInformationSchemaTableLegacy
(Schema schema, int id, int type) Create a new metadata table. -
Method Summary
Modifier and TypeMethodDescriptionprivate 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) generateRows
(SessionLocal session, SearchRow first, SearchRow last) Generate the data for the given metadata table using the given first and last row filters.private ArrayList
<SchemaObject> getAllSchemaObjects
(int type) getAllTables
(SessionLocal session) Get all tables of this database, including local temporary tables for the session.long
Get the last data modification id.private static short
getRefAction
(ConstraintActionType action) getTablesByName
(SessionLocal session, String tableName) private static String
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 Details
-
CHARACTER_SET_NAME
- See Also:
-
TABLES
private static final int TABLES- See Also:
-
COLUMNS
private static final int COLUMNS- See Also:
-
INDEXES
private static final int INDEXES- See Also:
-
TABLE_TYPES
private static final int TABLE_TYPES- See Also:
-
TYPE_INFO
private static final int TYPE_INFO- See Also:
-
CATALOGS
private static final int CATALOGS- See Also:
-
SETTINGS
private static final int SETTINGS- See Also:
-
HELP
private static final int HELP- See Also:
-
SEQUENCES
private static final int SEQUENCES- See Also:
-
USERS
private static final int USERS- See Also:
-
ROLES
private static final int ROLES- See Also:
-
RIGHTS
private static final int RIGHTS- See Also:
-
FUNCTION_ALIASES
private static final int FUNCTION_ALIASES- See Also:
-
SCHEMATA
private static final int SCHEMATA- See Also:
-
TABLE_PRIVILEGES
private static final int TABLE_PRIVILEGES- See Also:
-
COLUMN_PRIVILEGES
private static final int COLUMN_PRIVILEGES- See Also:
-
COLLATIONS
private static final int COLLATIONS- See Also:
-
VIEWS
private static final int VIEWS- See Also:
-
IN_DOUBT
private static final int IN_DOUBT- See Also:
-
CROSS_REFERENCES
private static final int CROSS_REFERENCES- See Also:
-
FUNCTION_COLUMNS
private static final int FUNCTION_COLUMNS- See Also:
-
CONSTRAINTS
private static final int CONSTRAINTS- See Also:
-
CONSTANTS
private static final int CONSTANTS- See Also:
-
DOMAINS
private static final int DOMAINS- See Also:
-
TRIGGERS
private static final int TRIGGERS- See Also:
-
SESSIONS
private static final int SESSIONS- See Also:
-
LOCKS
private static final int LOCKS- See Also:
-
SESSION_STATE
private static final int SESSION_STATE- See Also:
-
QUERY_STATISTICS
private static final int QUERY_STATISTICS- See Also:
-
SYNONYMS
private static final int SYNONYMS- See Also:
-
TABLE_CONSTRAINTS
private static final int TABLE_CONSTRAINTS- See Also:
-
DOMAIN_CONSTRAINTS
private static final int DOMAIN_CONSTRAINTS- See Also:
-
KEY_COLUMN_USAGE
private static final int KEY_COLUMN_USAGE- See Also:
-
REFERENTIAL_CONSTRAINTS
private static final int REFERENTIAL_CONSTRAINTS- See Also:
-
CHECK_CONSTRAINTS
private static final int CHECK_CONSTRAINTS- See Also:
-
CONSTRAINT_COLUMN_USAGE
private static final int CONSTRAINT_COLUMN_USAGE- 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:
-
-
Constructor Details
-
InformationSchemaTableLegacy
Create a new metadata table.- Parameters:
schema
- the schemaid
- the object idtype
- the meta table type
-
-
Method Details
-
replaceNullWithEmpty
-
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
-
getRefAction
-
addConstraintColumnUsage
private void addConstraintColumnUsage(SessionLocal session, ArrayList<Row> rows, String catalog, Constraint constraint, Column column) -
addPrivileges
-
addPrivilege
-
getAllSchemaObjects
-
getAllTables
Get all tables of this database, including local temporary tables for the session.- Parameters:
session
- the session- Returns:
- the array of tables
-
getTablesByName
-
getMaxDataModificationId
public long getMaxDataModificationId()Description copied from class:Table
Get the last data modification id.- Specified by:
getMaxDataModificationId
in classTable
- Returns:
- the modification id
-