HHH-18301 DB2 LUW supports DROP TABLE IF EXISTS since 11.5

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-06-25 16:13:21 +02:00
parent bf3b7e09e7
commit 5645b3440a
4 changed files with 20 additions and 0 deletions

View File

@ -31,6 +31,11 @@ public class DB2400Dialect extends DB2Dialect {
return NoSequenceSupport.INSTANCE;
}
@Override
public boolean supportsIfExistsBeforeTableName() {
return false;
}
@Override
public String getQuerySequencesString() {
return null;

View File

@ -883,6 +883,11 @@ public class DB2Dialect extends Dialect {
return true;
}
@Override
public boolean supportsIfExistsBeforeTableName() {
return getVersion().isSameOrAfter( 11, 5 );
}
@Override
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(
EntityMappingType rootEntityDescriptor,

View File

@ -87,6 +87,11 @@ public class DB2iDialect extends DB2Dialect {
return "";
}
@Override
public boolean supportsIfExistsBeforeTableName() {
return false;
}
@Override
public boolean supportsDistinctFromPredicate() {
return true;

View File

@ -95,6 +95,11 @@ public class DB2zDialect extends DB2Dialect {
return DB2_LUW_VERSION;
}
@Override
public boolean supportsIfExistsBeforeTableName() {
return false;
}
@Override
public String getCreateIndexString(boolean unique) {
// we only create unique indexes, as opposed to unique constraints,