HHH-18056 Support for JPA 32 table options
This commit is contained in:
parent
47b460ecc1
commit
79e7cc6f01
|
@ -1196,9 +1196,4 @@ public class CockroachDialect extends Dialect {
|
|||
public boolean supportsFromClauseInUpdate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTableOptions() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1316,9 +1316,4 @@ public class DB2Dialect extends Dialect {
|
|||
public boolean supportsFromClauseInUpdate() {
|
||||
return getDB2Version().isSameOrAfter( 11 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTableOptions() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1007,8 +1007,4 @@ public class H2Dialect extends Dialect {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTableOptions() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -727,9 +727,4 @@ public class HSQLDialect extends Dialect {
|
|||
public DmlTargetColumnQualifierSupport getDmlTargetColumnQualifierSupport() {
|
||||
return DmlTargetColumnQualifierSupport.TABLE_ALIAS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTableOptions() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1581,9 +1581,4 @@ public class MySQLDialect extends Dialect {
|
|||
}
|
||||
return sqlCheckConstraint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTableOptions() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1702,9 +1702,4 @@ public class OracleDialect extends Dialect {
|
|||
}
|
||||
return sqlCheckConstraint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTableOptions() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1598,9 +1598,4 @@ public class PostgreSQLDialect extends Dialect {
|
|||
public boolean supportsFromClauseInUpdate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTableOptions() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,13 +113,12 @@ public class StandardTableExporter implements Exporter<Table> {
|
|||
applyTableTypeString( createTable );
|
||||
}
|
||||
|
||||
final List<String> sqlStrings = new ArrayList<>();
|
||||
if ( StringHelper.isNotEmpty( table.getOptions() ) ) {
|
||||
if ( dialect.supportsTableOptions() ) {
|
||||
createTable.append( " " );
|
||||
createTable.append( table.getOptions() );
|
||||
}
|
||||
createTable.append( " " );
|
||||
createTable.append( table.getOptions() );
|
||||
}
|
||||
|
||||
final List<String> sqlStrings = new ArrayList<>();
|
||||
sqlStrings.add( createTable.toString() );
|
||||
applyComments( table, formattedTableName, sqlStrings );
|
||||
applyInitCommands( table, sqlStrings, context );
|
||||
|
|
|
@ -14,8 +14,6 @@ import org.hibernate.tool.hbm2ddl.SchemaExport;
|
|||
import org.hibernate.tool.schema.TargetType;
|
||||
|
||||
import org.hibernate.testing.orm.junit.BaseUnitTest;
|
||||
import org.hibernate.testing.orm.junit.DialectFeatureChecks;
|
||||
import org.hibernate.testing.orm.junit.RequiresDialectFeature;
|
||||
import org.hibernate.testing.util.ServiceRegistryUtil;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
@ -24,7 +22,6 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@BaseUnitTest
|
||||
@RequiresDialectFeature( feature = DialectFeatureChecks.SupportsTableOptions.class)
|
||||
public class TableOptionsTest {
|
||||
static final String TABLE_NAME = "PRIMARY_TABLE";
|
||||
static final String TABLE_OPTIONS = "option_1";
|
||||
|
|
|
@ -705,11 +705,4 @@ abstract public class DialectFeatureChecks {
|
|||
return dialect.getNationalizationSupport() == NationalizationSupport.EXPLICIT;
|
||||
}
|
||||
}
|
||||
|
||||
public static class SupportsTableOptions implements DialectFeatureCheck{
|
||||
@Override
|
||||
public boolean apply(Dialect dialect) {
|
||||
return dialect.supportsTableOptions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue