Class AbstractReactiveInformationSchemaBasedExtractorImpl
java.lang.Object
org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
org.hibernate.reactive.provider.service.AbstractReactiveInformationSchemaBasedExtractorImpl
- All Implemented Interfaces:
InformationExtractor
- Direct Known Subclasses:
MySqlReactiveInformationExtractorImpl
,OracleSqlReactiveInformationExtractorImpl
,PostgreSqlReactiveInformationExtractorImpl
,SqlServerReactiveInformationExtractorImpl
public abstract class AbstractReactiveInformationSchemaBasedExtractorImpl
extends org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
An implementation of
InformationExtractor
that obtains metadata
information from a database's information_schema.-
Nested Class Summary
Nested classes/interfaces inherited from class org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl.ForeignKeyBuilder, org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl.ForeignKeyBuilderImpl
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractReactiveInformationSchemaBasedExtractorImpl
(ExtractionContext extractionContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
appendClauseAndParameterIfNotNullOrEmpty
(String clause, Object parameter, StringBuilder sb, List<Object> parameters) protected org.hibernate.tool.schema.extract.internal.ColumnInformationImpl
columnInformation
(TableInformation tableInformation, ResultSet resultSet) protected int
dataTypeCode
(String typeName) Return a JDBC Type code for the given type nameprotected String
getDatabaseCatalogColumnName
(String catalogColumnName, String schemaColumnName) Given a catalog column name and a schema column name in an information_schema table/view, this method returns the column used for storing the catalog name, or, if there is no valid column containing the catalog name.
protected String
getDatabaseSchemaColumnName
(String catalogColumnName, String schemaColumnName) Given a catalog column name and a schema column name in an information_schema table/view, this method returns the column used for storing the schema name, or, if there is no valid column containing the schema name.
protected String
Gets the name of column in information_schema.columns for the database-specific column type.protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
parameterMarker
(int pos) protected <T> T
processCatalogsResultSet
(ExtractionContext.ResultSetProcessor<T> processor) protected <T> T
processColumnsResultSet
(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern, ExtractionContext.ResultSetProcessor<T> processor) protected <T> T
processCrossReferenceResultSet
(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable, ExtractionContext.ResultSetProcessor<T> processor) protected <T> T
processSchemaResultSet
(String catalog, String schemaPattern, ExtractionContext.ResultSetProcessor<T> processor) protected <T> T
processTableResultSet
(String catalog, String schemaPattern, String tableNamePattern, String[] types, ExtractionContext.ResultSetProcessor<T> processor) Methods inherited from class org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
addColumns, catalogExists, convertSQLException, getExtractionContext, getForeignKeys, getIndexes, getJdbcEnvironment, getPrimaryKey, getTable, getTables, interpretTruthValue, isPhysicalTableType, processImportedKeysResultSet, processIndexInfoResultSet, processPrimaryKeysResultSet, schemaExists, toMetaDataObjectName
-
Constructor Details
-
AbstractReactiveInformationSchemaBasedExtractorImpl
-
-
Method Details
-
getResultSetCatalogLabel
- Overrides:
getResultSetCatalogLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetSchemaLabel
- Overrides:
getResultSetSchemaLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetTableNameLabel
- Overrides:
getResultSetTableNameLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetTableTypeLabel
- Overrides:
getResultSetTableTypeLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetRemarksLabel
- Overrides:
getResultSetRemarksLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetColumnNameLabel
- Overrides:
getResultSetColumnNameLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetSqlTypeCodeLabel
- Overrides:
getResultSetSqlTypeCodeLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetTypeNameLabel
- Overrides:
getResultSetTypeNameLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetColumnSizeLabel
- Overrides:
getResultSetColumnSizeLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetDecimalDigitsLabel
- Overrides:
getResultSetDecimalDigitsLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetIsNullableLabel
- Overrides:
getResultSetIsNullableLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetIndexTypeLabel
- Overrides:
getResultSetIndexTypeLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetIndexNameLabel
- Overrides:
getResultSetIndexNameLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetForeignKeyLabel
- Overrides:
getResultSetForeignKeyLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetPrimaryKeyNameLabel
- Overrides:
getResultSetPrimaryKeyNameLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetColumnPositionColumn
- Overrides:
getResultSetColumnPositionColumn
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetPrimaryKeyColumnNameLabel
- Overrides:
getResultSetPrimaryKeyColumnNameLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetForeignKeyColumnNameLabel
- Overrides:
getResultSetForeignKeyColumnNameLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetPrimaryKeyCatalogLabel
- Overrides:
getResultSetPrimaryKeyCatalogLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetPrimaryKeySchemaLabel
- Overrides:
getResultSetPrimaryKeySchemaLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetPrimaryKeyTableLabel
- Overrides:
getResultSetPrimaryKeyTableLabel
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
getResultSetTableTypesPhysicalTableConstant
- Specified by:
getResultSetTableTypesPhysicalTableConstant
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
processCatalogsResultSet
protected <T> T processCatalogsResultSet(ExtractionContext.ResultSetProcessor<T> processor) throws SQLException - Specified by:
processCatalogsResultSet
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
- Throws:
SQLException
-
processCrossReferenceResultSet
protected <T> T processCrossReferenceResultSet(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable, ExtractionContext.ResultSetProcessor<T> processor) - Specified by:
processCrossReferenceResultSet
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
-
processSchemaResultSet
protected <T> T processSchemaResultSet(String catalog, String schemaPattern, ExtractionContext.ResultSetProcessor<T> processor) throws SQLException - Specified by:
processSchemaResultSet
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
- Throws:
SQLException
-
appendClauseAndParameterIfNotNullOrEmpty
protected boolean appendClauseAndParameterIfNotNullOrEmpty(String clause, Object parameter, StringBuilder sb, List<Object> parameters) -
parameterMarker
-
processTableResultSet
protected <T> T processTableResultSet(String catalog, String schemaPattern, String tableNamePattern, String[] types, ExtractionContext.ResultSetProcessor<T> processor) throws SQLException - Specified by:
processTableResultSet
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
- Throws:
SQLException
-
processColumnsResultSet
protected <T> T processColumnsResultSet(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern, ExtractionContext.ResultSetProcessor<T> processor) throws SQLException - Specified by:
processColumnsResultSet
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
- Throws:
SQLException
-
getInformationSchemaColumnsDataTypeColumn
Gets the name of column in information_schema.columns for the database-specific column type.- Returns:
- the name of column in information_schema.columns for the database-specific column type
-
getDatabaseCatalogColumnName
Given a catalog column name and a schema column name in an information_schema table/view, this method returns the column used for storing the catalog name, or, if there is no valid column containing the catalog name. MySQL, for example, uses the schema name column in the information_schema to store the catalog name. (@see MySqlReactiveInformationExtractorImpl)
- Parameters:
catalogColumnName
- - the catalog column nameschemaColumnName
- - the schema column name- Returns:
- the column used for storing the catalog name,
or
if there is no valid column containing the catalog name.
-
getDatabaseSchemaColumnName
Given a catalog column name and a schema column name in an information_schema table/view, this method returns the column used for storing the schema name, or, if there is no valid column containing the schema name. MySQL, for example, does not have a valid column in the information_schema to store the schema name. (@see MySqlReactiveInformationExtractorImpl)
- Parameters:
catalogColumnName
- - the catalog column nameschemaColumnName
- - the schema column name- Returns:
- the column used for storing the schema name,
or
if there is no valid column containing the schema name.
-
columnInformation
protected org.hibernate.tool.schema.extract.internal.ColumnInformationImpl columnInformation(TableInformation tableInformation, ResultSet resultSet) throws SQLException - Overrides:
columnInformation
in classorg.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
- Throws:
SQLException
-
dataTypeCode
Return a JDBC Type code for the given type name
-