Skip to content

Commit

Permalink
remove deprecated/obsolete Dialect-related stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Dec 1, 2024
1 parent 2a4f430 commit d5b7289
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.hibernate.LockOptions;
import org.hibernate.boot.model.FunctionContributions;
import org.hibernate.boot.model.TypeContributions;
import org.hibernate.community.dialect.sequence.LegacyDB2SequenceSupport;
import org.hibernate.dialect.DB2Dialect;
import org.hibernate.dialect.DB2GetObjectExtractor;
import org.hibernate.dialect.DB2StructJdbcType;
Expand All @@ -47,7 +48,6 @@
import org.hibernate.dialect.pagination.LegacyDB2LimitHandler;
import org.hibernate.dialect.pagination.LimitHandler;
import org.hibernate.dialect.sequence.DB2SequenceSupport;
import org.hibernate.dialect.sequence.LegacyDB2SequenceSupport;
import org.hibernate.dialect.sequence.SequenceSupport;
import org.hibernate.dialect.unique.AlterTableUniqueIndexDelegate;
import org.hibernate.dialect.unique.SkipNullableUniqueDelegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import org.hibernate.boot.model.FunctionContributions;
import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.function.CommonFunctionFactory;
import org.hibernate.dialect.identity.DB2390IdentityColumnSupport;
import org.hibernate.dialect.identity.DB2IdentityColumnSupport;
import org.hibernate.dialect.identity.DB2zIdentityColumnSupport;
import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.pagination.FetchLimitHandler;
import org.hibernate.dialect.pagination.LegacyDB2LimitHandler;
Expand Down Expand Up @@ -129,7 +129,7 @@ public LimitHandler getLimitHandler() {
public IdentityColumnSupport getIdentityColumnSupport() {
return getVersion().isSameOrAfter(7, 3)
? DB2IdentityColumnSupport.INSTANCE
: DB2390IdentityColumnSupport.INSTANCE;
: DB2zIdentityColumnSupport.INSTANCE;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.TimeZoneSupport;
import org.hibernate.dialect.function.CommonFunctionFactory;
import org.hibernate.dialect.identity.DB2390IdentityColumnSupport;
import org.hibernate.dialect.identity.DB2zIdentityColumnSupport;
import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.pagination.FetchLimitHandler;
import org.hibernate.dialect.pagination.LimitHandler;
Expand Down Expand Up @@ -146,7 +146,7 @@ public LimitHandler getLimitHandler() {

@Override
public IdentityColumnSupport getIdentityColumnSupport() {
return DB2390IdentityColumnSupport.INSTANCE;
return DB2zIdentityColumnSupport.INSTANCE;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ private static boolean isAnsiNull(DatabaseMetaData databaseMetaData) {
return false;
}

@Override
public boolean isAnsiNullOn() {
return ansiNull;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ protected void renderComparison(Expression lhs, ComparisonOperator operator, Exp
}
}
// I think intersect is only supported in 16.0 SP3
if ( getDialect().isAnsiNullOn() ) {
if ( ( (SybaseASELegacyDialect) getDialect() ).isAnsiNullOn() ) {
if ( isLob ) {
switch ( operator ) {
case DISTINCT_FROM:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
* SPDX-License-Identifier: LGPL-2.1-or-later
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.dialect.sequence;
package org.hibernate.community.dialect.sequence;

import org.hibernate.MappingException;
import org.hibernate.dialect.sequence.SequenceSupport;

/**
* Sequence support for {@link org.hibernate.dialect.DB2Dialect}.
*
* @author Gavin King
*
* @deprecated use {@code DB2SequenceSupport}
*/
@Deprecated(since="6.4")
public class LegacyDB2SequenceSupport implements SequenceSupport {

public static final SequenceSupport INSTANCE = new LegacyDB2SequenceSupport();
Expand Down Expand Up @@ -42,4 +40,4 @@ public String getSequencePreviousValString(String sequenceName) throws MappingEx
public String getDropSequenceString(String sequenceName) {
return "drop sequence " + sequenceName + " restrict";
}
}
}
11 changes: 0 additions & 11 deletions hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
Original file line number Diff line number Diff line change
Expand Up @@ -3820,17 +3820,6 @@ public boolean supportsNullPrecedence() {
return true;
}

/**
* A setting specific to {@link SybaseASEDialect}.
*
* @deprecated This is only called from {@link SybaseASESqlAstTranslator}
* so it doesn't need to be declared here.
*/
@Deprecated(since = "6")
public boolean isAnsiNullOn() {
return true;
}

/**
* Does this dialect/database require casting of non-string arguments
* in the {@code concat()} function?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1052,11 +1052,6 @@ public boolean supportsNullPrecedence() {
return wrapped.supportsNullPrecedence();
}

@Override
@Deprecated(since = "6")
public boolean isAnsiNullOn() {
return wrapped.isAnsiNullOn();
}

@Override
public boolean requiresCastForConcatenatingNonStrings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ private int pageSize(DialectResolutionInfo info) {
return getInt( SYBASE_PAGE_SIZE, info.getConfigurationValues(), MAX_PAGE_SIZE );
}

@Override
public boolean isAnsiNullOn() {
return ansiNull;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ protected void renderComparison(Expression lhs, ComparisonOperator operator, Exp
}
}
// I think intersect is only supported in 16.0 SP3
if ( getDialect().isAnsiNullOn() ) {
if ( ( (SybaseASEDialect) getDialect() ).isAnsiNullOn() ) {
if ( isLob ) {
switch ( operator ) {
case DISTINCT_FROM:
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit d5b7289

Please sign in to comment.