HHH-15046: moved overlapping db2_luw version to constant

This commit is contained in:
Atgoogat 2022-01-24 13:46:54 +01:00 committed by Christian Beikov
parent 77ea0c7c1f
commit 9ad64e5001
4 changed files with 12 additions and 4 deletions

View File

@ -33,6 +33,8 @@ import org.hibernate.sql.exec.spi.JdbcOperation;
*/
public class DB2iDialect extends DB2Dialect {
final static DatabaseVersion DB2_LUW_VERSION9 = DatabaseVersion.make(9, 0);
public DB2iDialect(DialectResolutionInfo info) {
this( info.makeCopy() );
registerKeywords( info );
@ -48,7 +50,7 @@ public class DB2iDialect extends DB2Dialect {
@Override
public DatabaseVersion getDB2Version() {
return DatabaseVersion.make(9, 0);
return DB2_LUW_VERSION9;
}
@Override

View File

@ -14,6 +14,8 @@ import org.hibernate.sql.ast.tree.expression.Literal;
import org.hibernate.sql.ast.tree.select.QueryPart;
import org.hibernate.sql.exec.spi.JdbcOperation;
import static org.hibernate.dialect.DB2iDialect.DB2_LUW_VERSION9;
/**
* A SQL AST translator for DB2i.
*
@ -50,6 +52,6 @@ public class DB2iSqlAstTranslator<T extends JdbcOperation> extends DB2SqlAstTran
@Override
public DatabaseVersion getDB2Version() {
return DatabaseVersion.make(9, 0);
return DB2_LUW_VERSION9;
}
}

View File

@ -36,6 +36,8 @@ import static org.hibernate.type.SqlTypes.TIMESTAMP_WITH_TIMEZONE;
*/
public class DB2zDialect extends DB2Dialect {
final static DatabaseVersion DB2_LUW_VERSION9 = DatabaseVersion.make(9, 0);
public DB2zDialect(DialectResolutionInfo info) {
this( info.makeCopy() );
registerKeywords( info );
@ -60,7 +62,7 @@ public class DB2zDialect extends DB2Dialect {
@Override
public DatabaseVersion getDB2Version() {
return DatabaseVersion.make(9, 0);
return DB2_LUW_VERSION9;
}
@Override

View File

@ -19,6 +19,8 @@ import org.hibernate.sql.ast.tree.from.TableReference;
import org.hibernate.sql.ast.tree.select.QueryPart;
import org.hibernate.sql.exec.spi.JdbcOperation;
import static org.hibernate.dialect.DB2zDialect.DB2_LUW_VERSION9;
/**
* A SQL AST translator for DB2z.
*
@ -78,6 +80,6 @@ public class DB2zSqlAstTranslator<T extends JdbcOperation> extends DB2SqlAstTran
@Override
public DatabaseVersion getDB2Version() {
return DatabaseVersion.make(9, 0);
return DB2_LUW_VERSION9;
}
}