if ( "Apache Derby".equals( databaseName ) ) {
final int majorVersion = info.getDatabaseMajorVersion();
final int minorVersion = info.getDatabaseMinorVersion();
if ( majorVersion > 10 || ( majorVersion == 10 && minorVersion >= 7 ) ) {
return new DerbyTenSevenDialect();
}
else if ( majorVersion == 10 && minorVersion == 6 ) {
return new DerbyTenSixDialect();
}
else if ( majorVersion == 10 && minorVersion == 5 ) {