HHH-12856 Add AS400V7R3Dialect as default for V7R3 of IBM i
This commit is contained in:
parent
622978b725
commit
7b1d1a1f3a
|
@ -47,7 +47,7 @@ public enum Database {
|
|||
DB2 {
|
||||
@Override
|
||||
public Class<? extends Dialect> latestDialect() {
|
||||
return DB2400Dialect.class;
|
||||
return DB2400V7R3Dialect.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,9 +55,18 @@ public enum Database {
|
|||
final String databaseName = info.getDatabaseName();
|
||||
|
||||
if ( "DB2 UDB for AS/400".equals( databaseName ) ) {
|
||||
return new DB2400Dialect();
|
||||
final int majorVersion = info.getDatabaseMajorVersion();
|
||||
final int minorVersion = info.getDatabaseMinorVersion();
|
||||
|
||||
if ( majorVersion > 7 || ( majorVersion == 7 && minorVersion >= 3 ) ) {
|
||||
return latestDialectInstance( this );
|
||||
}
|
||||
else {
|
||||
return new DB2400Dialect();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( databaseName.startsWith( "DB2/" ) ) {
|
||||
return new DB2Dialect();
|
||||
}
|
||||
|
|
|
@ -153,6 +153,7 @@ public class DialectFactoryTest extends BaseUnitTestCase {
|
|||
testDetermination( "DB2/LINUX390", DB2Dialect.class, resolver );
|
||||
testDetermination( "DB2/AIX64", DB2Dialect.class, resolver );
|
||||
testDetermination( "DB2 UDB for AS/400", DB2400Dialect.class, resolver );
|
||||
testDetermination( "DB2 UDB for AS/400", 7, 3, DB2400V7R3Dialect.class, resolver );
|
||||
testDetermination( "Oracle", 8, Oracle8iDialect.class, resolver );
|
||||
testDetermination( "Oracle", 9, Oracle9iDialect.class, resolver );
|
||||
testDetermination( "Oracle", 10, Oracle10gDialect.class, resolver );
|
||||
|
|
Loading…
Reference in New Issue