Class DatabaseMetaLocal
java.lang.Object
org.h2.jdbc.meta.DatabaseMeta
org.h2.jdbc.meta.DatabaseMetaLocalBase
org.h2.jdbc.meta.DatabaseMetaLocal
Local implementation of database meta information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ValueSmallintprivate static final ValueSmallintprivate static final ValueIntegerprivate static final ValueSmallintprivate static final ValueIntegerprivate static final ValueSmallintprivate static final ValueSmallintprivate static final ValueSmallintprivate static final ValueSmallintprivate static final ValueSmallintprivate static final ValueSmallintprivate static final Valueprivate static final Valueprivate static final ValueSmallintprivate static final ValueSmallintprivate static final ValueSmallintprivate static final ValueSmallintprivate final SessionLocalprivate static final ValueSmallintprivate static final ValueSmallintprivate static final String[]private static final ValueSmallintprivate static final ValueSmallintprivate static final Value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddCrossReferenceResult(SimpleResult result, Value catalog, String pkSchema, Table pkTable, String fkSchema, Table fkTable, ConstraintReferential fk) private voidaddPrivilege(SimpleResult result, Value catalogValue, Value schemaValue, Value tableValue, Value granteeValue, String right, boolean isAdmin, CompareLike columnLike, Column[] columns) private voidaddPrivileges(SimpleResult result, Value catalogValue, String schemaName, String tableName, DbObject grantee, int rightMask, CompareLike columnLike, Column[] columns) private booleancheckCatalogName(String catalog) (package private) voidprivate booleancheckSchema(String schemaName, Schema schema) final DefaultNullOrderingINTERNALgetBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) INTERNALINTERNALgetColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) INTERNALgetColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) INTERNALprivate voidgetColumnsAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value tableName, Table t, CompareLike columnLike) getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) INTERNALprivate ValuegetDataTypeName(TypeInfo typeInfo) getExportedKeys(String catalog, String schema, String table) INTERNALprivate StringgetFunctions(String section) getImportedKeys(String catalog, String schema, String table) INTERNALgetIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) INTERNALprivate voidgetIndexInfo(Value catalogValue, Value schemaValue, Table table, boolean unique, boolean approximate, SimpleResult result, Database db) private CompareLikeINTERNALgetPrimaryKeys(String catalog, String schema, String table) INTERNALprivate voidgetProcedureColumnAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value procedureNameValue, Value specificNameValue, TypeInfo type, boolean notNull, int ordinal) getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) INTERNALgetProcedures(String catalog, String schemaPattern, String procedureNamePattern) INTERNALprivate voidgetProceduresAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value procedureNameValue, String comment, ValueSmallint procedureType, Value specificNameValue) getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) INTERNALprivate voidgetPseudoColumnsAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value tableName, CompareLike columnLike, Column c) private voidgetPseudoColumnsAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value tableName, Table t, CompareLike columnLike) private static ValuegetRadix(int valueType, boolean small) private static ValueSmallintgetRefAction(ConstraintActionType action) INTERNALprivate Collection<Schema> getSchemas(String schema) getSchemas(String catalog, String schemaPattern) INTERNALprivate Collection<Schema> getSchemasForPattern(String schemaPattern) INTERNALINTERNAL(package private) ValueINTERNALINTERNALgetTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) INTERNALINTERNALprivate voidgetTablesAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value tableName, Table t, boolean synonym, HashSet<String> typesSet) private Collection<? extends SchemaObject> getTablesForPattern(Schema schema, String tablePattern) INTERNALINTERNALINTERNALprivate SimpleResult
-
Field Details
-
YES
-
NO
-
BEST_ROW_SESSION
-
BEST_ROW_NOT_PSEUDO
-
COLUMN_NO_NULLS
-
COLUMN_NO_NULLS_SMALL
-
COLUMN_NULLABLE
-
COLUMN_NULLABLE_UNKNOWN_SMALL
-
IMPORTED_KEY_CASCADE
-
IMPORTED_KEY_RESTRICT
-
IMPORTED_KEY_DEFAULT
-
IMPORTED_KEY_SET_NULL
-
IMPORTED_KEY_NOT_DEFERRABLE
-
PROCEDURE_COLUMN_IN
-
PROCEDURE_COLUMN_RETURN
-
PROCEDURE_NO_RESULT
-
PROCEDURE_RETURNS_RESULT
-
TABLE_INDEX_HASHED
-
TABLE_INDEX_OTHER
-
TABLE_TYPES
-
TYPE_NULLABLE
-
TYPE_SEARCHABLE
-
NO_USAGE_RESTRICTIONS
-
session
-
-
Constructor Details
-
DatabaseMetaLocal
-
-
Method Details
-
defaultNullOrdering
Description copied from class:DatabaseMetaINTERNAL- Specified by:
defaultNullOrderingin classDatabaseMeta- Returns:
- DefaultNullOrdering
- See Also:
-
getSQLKeywords
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getSQLKeywordsin classDatabaseMeta- Returns:
- list of supported SQL keywords
- See Also:
-
getNumericFunctions
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getNumericFunctionsin classDatabaseMeta- Returns:
- list of supported numeric functions
- See Also:
-
getStringFunctions
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getStringFunctionsin classDatabaseMeta- Returns:
- list of supported string functions
- See Also:
-
getSystemFunctions
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getSystemFunctionsin classDatabaseMeta- Returns:
- list of supported system functions
- See Also:
-
getTimeDateFunctions
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getTimeDateFunctionsin classDatabaseMeta- Returns:
- list of supported time/date functions
- See Also:
-
getFunctions
-
getSearchStringEscape
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getSearchStringEscapein classDatabaseMeta- Returns:
- search string escape sequence
- See Also:
-
getProcedures
public ResultInterface getProcedures(String catalog, String schemaPattern, String procedureNamePattern) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getProceduresin classDatabaseMeta- Parameters:
catalog- to inspectschemaPattern- "LIKE" style pattern to filter resultprocedureNamePattern- "LIKE" style pattern to filter result- Returns:
- ResultInterface
- See Also:
-
getProceduresAdd
private void getProceduresAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value procedureNameValue, String comment, ValueSmallint procedureType, Value specificNameValue) -
getProcedureColumns
public ResultInterface getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getProcedureColumnsin classDatabaseMeta- Parameters:
catalog- to inspectschemaPattern- "LIKE" style pattern to filter resultprocedureNamePattern- "LIKE" style pattern to filter resultcolumnNamePattern- "LIKE" style pattern to filter result- Returns:
- ResultInterface
- See Also:
-
getProcedureColumnAdd
-
getTables
public ResultInterface getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getTablesin classDatabaseMeta- Parameters:
catalog- to inspectschemaPattern- "LIKE" style pattern to filter resulttableNamePattern- "LIKE" style pattern to filter resulttypes- String[]- Returns:
- ResultInterface
- See Also:
-
getTablesAdd
-
getSchemas
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getSchemasin classDatabaseMeta- Returns:
- ResultInterface
- See Also:
-
getCatalogs
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getCatalogsin classDatabaseMeta- Returns:
- ResultInterface
- See Also:
-
getTableTypes
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getTableTypesin classDatabaseMeta- Returns:
- ResultInterface
- See Also:
-
getColumns
public ResultInterface getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getColumnsin classDatabaseMeta- Parameters:
catalog- to inspectschemaPattern- "LIKE" style pattern to filter resulttableNamePattern- "LIKE" style pattern to filter resultcolumnNamePattern- "LIKE" style pattern to filter result- Returns:
- ResultInterface
- See Also:
-
getColumnsAdd
private void getColumnsAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value tableName, Table t, CompareLike columnLike) -
getColumnPrivileges
public ResultInterface getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getColumnPrivilegesin classDatabaseMeta- Parameters:
catalog- to inspectschema- to inspecttable- to inspectcolumnNamePattern- "LIKE" style pattern to filter result- Returns:
- ResultInterface
- See Also:
-
getTablePrivileges
public ResultInterface getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getTablePrivilegesin classDatabaseMeta- Parameters:
catalog- to inspectschemaPattern- "LIKE" style pattern to filter resulttableNamePattern- "LIKE" style pattern to filter result- Returns:
- ResultInterface
- See Also:
-
addPrivileges
private void addPrivileges(SimpleResult result, Value catalogValue, String schemaName, String tableName, DbObject grantee, int rightMask, CompareLike columnLike, Column[] columns) -
addPrivilege
private void addPrivilege(SimpleResult result, Value catalogValue, Value schemaValue, Value tableValue, Value granteeValue, String right, boolean isAdmin, CompareLike columnLike, Column[] columns) -
getBestRowIdentifier
public ResultInterface getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getBestRowIdentifierin classDatabaseMeta- Parameters:
catalog- "LIKE" style pattern to filter resultschema- "LIKE" style pattern to filter resulttable- table of interestscope- of interestnullable- include nullable columns- Returns:
- ResultInterface
- See Also:
-
getDataTypeName
-
getPrimaryKeys
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getPrimaryKeysin classDatabaseMeta- Parameters:
catalog- to inspectschema- to inspecttable- to inspect- Returns:
- ResultInterface
- See Also:
-
getImportedKeys
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getImportedKeysin classDatabaseMeta- Parameters:
catalog- to inspectschema- to inspecttable- to inspect- Returns:
- ResultInterface
- See Also:
-
getExportedKeys
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getExportedKeysin classDatabaseMeta- Parameters:
catalog- to inspectschema- to inspecttable- to inspect- Returns:
- ResultInterface
- See Also:
-
getCrossReference
public ResultInterface getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getCrossReferencein classDatabaseMeta- Parameters:
primaryCatalog- to inspectprimarySchema- to inspectprimaryTable- to inspectforeignCatalog- to inspectforeignSchema- to inspectforeignTable- to inspect- Returns:
- ResultInterface
- See Also:
-
initCrossReferenceResult
-
addCrossReferenceResult
private void addCrossReferenceResult(SimpleResult result, Value catalog, String pkSchema, Table pkTable, String fkSchema, Table fkTable, ConstraintReferential fk) -
getRefAction
-
getTypeInfo
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getTypeInfoin classDatabaseMeta- Returns:
- ResultInterface
- See Also:
-
getRadix
-
getIndexInfo
public ResultInterface getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getIndexInfoin classDatabaseMeta- Parameters:
catalog- to inspectschema- to inspecttable- to inspectunique- onlyapproximate- allowed- Returns:
- ResultInterface
- See Also:
-
getIndexInfo
private void getIndexInfo(Value catalogValue, Value schemaValue, Table table, boolean unique, boolean approximate, SimpleResult result, Database db) -
getSchemas
Description copied from class:DatabaseMetaINTERNAL- Specified by:
getSchemasin classDatabaseMeta- Parameters:
catalog- to inspectschemaPattern- "LIKE" style pattern to filter result- Returns:
- ResultInterface
- See Also:
-
getPseudoColumns
public ResultInterface getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) Description copied from class:DatabaseMetaINTERNAL- Specified by:
getPseudoColumnsin classDatabaseMeta- Parameters:
catalog- to inspectschemaPattern- "LIKE" style pattern to filter resulttableNamePattern- "LIKE" style pattern to filter resultcolumnNamePattern- "LIKE" style pattern to filter result- Returns:
- ResultInterface
- See Also:
-
getPseudoColumnsAdd
private void getPseudoColumnsAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value tableName, Table t, CompareLike columnLike) -
getPseudoColumnsAdd
private void getPseudoColumnsAdd(SimpleResult result, Value catalogValue, Value schemaValue, Value tableName, CompareLike columnLike, Column c) -
checkClosed
void checkClosed()- Specified by:
checkClosedin classDatabaseMetaLocalBase
-
getString
-
checkCatalogName
-
getSchemas
-
getSchemasForPattern
-
getTablesForPattern
-
checkSchema
-
getLike
-