Skip to content

HHH-14744 : Refactor contextual information for SchemaManagementTool to be more easily extended by Hibernate Reactive #4106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion databases/pgsql/resources/hibernate.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory

hibernate.service.allow_crawling=false
hibernate.session.events.log=true
hibernate.session.events.log=true

Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@
*/
package org.hibernate.dialect;

import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.util.List;

import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.identity.PostgreSQL10IdentityColumnSupport;
import org.hibernate.engine.jdbc.env.spi.AnsiSqlKeywords;
import org.hibernate.engine.jdbc.env.spi.IdentifierCaseStrategy;
import org.hibernate.engine.jdbc.env.spi.IdentifierHelper;
import org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder;
import org.hibernate.engine.jdbc.env.spi.NameQualifierSupport;
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorPostgresSQLDatabaseImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;

/**
* An SQL dialect for Postgres 10 and later.
Expand All @@ -31,4 +40,21 @@ public void augmentRecognizedTableTypes(List<String> tableTypesList) {
super.augmentRecognizedTableTypes( tableTypesList );
tableTypesList.add( "PARTITIONED TABLE" );
}

@Override
public NameQualifierSupport getNameQualifierSupport() {
// This method is overridden so the correct value will be returned when
// DatabaseMetaData is not available.
return NameQualifierSupport.SCHEMA;
}

@Override
public SequenceInformationExtractor getSequenceInformationExtractor() {
return SequenceInformationExtractorPostgresSQLDatabaseImpl.INSTANCE;
}

@Override
public String getCurrentSchemaCommand() {
return "select current_schema from sys.dummy";
}
}
Loading