public class MySqlReactiveInformationExtractorImpl extends AbstractReactiveInformationSchemaBasedExtractorImpl
AbstractReactiveInformationSchemaBasedExtractorImpl
specifically for MySQL that obtains metadata from MySQL's non-standard
information_schema tables.
MySQL's schema is actually a catalog. MySQL's implementation of
DatabaseMetaData
automatically changes catalog
arguments to refer to schema columns instead. Unfortunately,
MySQL's information_schema stores catalog names in
a schema name column. This class works around that idiosyncrasy.org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl.ForeignKeyBuilder, org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl.ForeignKeyBuilderImpl
Constructor and Description |
---|
MySqlReactiveInformationExtractorImpl(org.hibernate.tool.schema.extract.spi.ExtractionContext extractionContext) |
Modifier and Type | Method and Description |
---|---|
protected 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 |
getResultSetTableTypesPhysicalTableConstant() |
protected <T> T |
processCatalogsResultSet(org.hibernate.tool.schema.extract.spi.ExtractionContext.ResultSetProcessor<T> processor) |
protected <T> T |
processImportedKeysResultSet(String catalog,
String schema,
String table,
org.hibernate.tool.schema.extract.spi.ExtractionContext.ResultSetProcessor<T> processor) |
protected <T> T |
processIndexInfoResultSet(String catalog,
String schema,
String table,
boolean unique,
boolean approximate,
org.hibernate.tool.schema.extract.spi.ExtractionContext.ResultSetProcessor<T> processor) |
protected <T> T |
processPrimaryKeysResultSet(String catalogFilter,
String schemaFilter,
org.hibernate.boot.model.naming.Identifier tableName,
org.hibernate.tool.schema.extract.spi.ExtractionContext.ResultSetProcessor<T> processor) |
addExtractedColumnInformation, appendClauseAndParameterIfNotNullOrEmpty, dataTypeCode, getInformationSchemaColumnsDataTypeColumn, getResultSetCatalogLabel, getResultSetColumnNameLabel, getResultSetColumnPositionColumn, getResultSetColumnSizeLabel, getResultSetDecimalDigitsLabel, getResultSetForeignKeyColumnNameLabel, getResultSetForeignKeyLabel, getResultSetIndexNameLabel, getResultSetIndexTypeLabel, getResultSetIsNullableLabel, getResultSetPrimaryKeyCatalogLabel, getResultSetPrimaryKeyColumnNameLabel, getResultSetPrimaryKeyNameLabel, getResultSetPrimaryKeySchemaLabel, getResultSetPrimaryKeyTableLabel, getResultSetRemarksLabel, getResultSetSchemaLabel, getResultSetSqlTypeCodeLabel, getResultSetTableNameLabel, getResultSetTableTypeLabel, getResultSetTypeNameLabel, processColumnsResultSet, processSchemaResultSet, processTableResultSet
addColumns, catalogExists, convertSQLException, determineCatalogFilter, determineSchemaFilter, getExtractionContext, getForeignKeys, getIndexes, getPrimaryKey, getTable, getTables, identifierHelper, interpretNullable, isPhysicalTableType, schemaExists, toMetaDataObjectName
public MySqlReactiveInformationExtractorImpl(org.hibernate.tool.schema.extract.spi.ExtractionContext extractionContext)
protected String getResultSetTableTypesPhysicalTableConstant()
protected String getDatabaseCatalogColumnName(String catalogColumnName, String schemaColumnName)
AbstractReactiveInformationSchemaBasedExtractorImpl
, 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)getDatabaseCatalogColumnName
in class AbstractReactiveInformationSchemaBasedExtractorImpl
catalogColumnName
- - the catalog column nameschemaColumnName
- - the schema column name
if there is no valid column containing
the catalog name.protected String getDatabaseSchemaColumnName(String catalogColumnName, String schemaColumnName)
AbstractReactiveInformationSchemaBasedExtractorImpl
, if there
is no valid column containing the schema name.
MySQL, for example, does not have a valid column in
in the information_schema to store the schema name.
(@see MySqlReactiveInformationExtractorImpl)getDatabaseSchemaColumnName
in class AbstractReactiveInformationSchemaBasedExtractorImpl
catalogColumnName
- - the catalog column nameschemaColumnName
- - the schema column name
if there is no valid column containing
the schema name.protected <T> T processPrimaryKeysResultSet(String catalogFilter, String schemaFilter, org.hibernate.boot.model.naming.Identifier tableName, org.hibernate.tool.schema.extract.spi.ExtractionContext.ResultSetProcessor<T> processor) throws SQLException
processPrimaryKeysResultSet
in class org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
SQLException
protected <T> T processCatalogsResultSet(org.hibernate.tool.schema.extract.spi.ExtractionContext.ResultSetProcessor<T> processor) throws SQLException
processCatalogsResultSet
in class AbstractReactiveInformationSchemaBasedExtractorImpl
SQLException
protected <T> T processIndexInfoResultSet(String catalog, String schema, String table, boolean unique, boolean approximate, org.hibernate.tool.schema.extract.spi.ExtractionContext.ResultSetProcessor<T> processor) throws SQLException
processIndexInfoResultSet
in class org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
SQLException
protected <T> T processImportedKeysResultSet(String catalog, String schema, String table, org.hibernate.tool.schema.extract.spi.ExtractionContext.ResultSetProcessor<T> processor) throws SQLException
processImportedKeysResultSet
in class org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl
SQLException
Copyright © 2020-2022 Red Hat, Inc. All Rights Reserved.