remove deprecated/obsolete Dialect-related stuff

This commit is contained in:
Gavin King 2024-12-01 14:59:04 +01:00
parent 2a4f4304c7
commit d5b7289686
12 changed files with 10 additions and 60 deletions

View File

@ -25,6 +25,7 @@ import java.util.TimeZone;
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;
@ -47,7 +48,6 @@ import org.hibernate.dialect.pagination.DB2LimitHandler;
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;

View File

@ -7,8 +7,8 @@ package org.hibernate.community.dialect;
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;
@ -129,7 +129,7 @@ public class DB2iLegacyDialect extends DB2LegacyDialect {
public IdentityColumnSupport getIdentityColumnSupport() {
return getVersion().isSameOrAfter(7, 3)
? DB2IdentityColumnSupport.INSTANCE
: DB2390IdentityColumnSupport.INSTANCE;
: DB2zIdentityColumnSupport.INSTANCE;
}
@Override

View File

@ -9,7 +9,7 @@ import org.hibernate.boot.model.FunctionContributions;
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;
@ -146,7 +146,7 @@ public class DB2zLegacyDialect extends DB2LegacyDialect {
@Override
public IdentityColumnSupport getIdentityColumnSupport() {
return DB2390IdentityColumnSupport.INSTANCE;
return DB2zIdentityColumnSupport.INSTANCE;
}
@Override

View File

@ -199,7 +199,6 @@ public class SybaseASELegacyDialect extends SybaseLegacyDialect {
return false;
}
@Override
public boolean isAnsiNullOn() {
return ansiNull;
}

View File

@ -393,7 +393,7 @@ public class SybaseASELegacySqlAstTranslator<T extends JdbcOperation> extends Ab
}
}
// I think intersect is only supported in 16.0 SP3
if ( getDialect().isAnsiNullOn() ) {
if ( ( (SybaseASELegacyDialect) getDialect() ).isAnsiNullOn() ) {
if ( isLob ) {
switch ( operator ) {
case DISTINCT_FROM:

View File

@ -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();
@ -42,4 +40,4 @@ public class LegacyDB2SequenceSupport implements SequenceSupport {
public String getDropSequenceString(String sequenceName) {
return "drop sequence " + sequenceName + " restrict";
}
}
}

View File

@ -3820,17 +3820,6 @@ public abstract class Dialect implements ConversionContext, TypeContributor, Fun
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?

View File

@ -1052,11 +1052,6 @@ public class DialectDelegateWrapper extends Dialect {
return wrapped.supportsNullPrecedence();
}
@Override
@Deprecated(since = "6")
public boolean isAnsiNullOn() {
return wrapped.isAnsiNullOn();
}
@Override
public boolean requiresCastForConcatenatingNonStrings() {

View File

@ -237,7 +237,6 @@ public class SybaseASEDialect extends SybaseDialect {
return getInt( SYBASE_PAGE_SIZE, info.getConfigurationValues(), MAX_PAGE_SIZE );
}
@Override
public boolean isAnsiNullOn() {
return ansiNull;
}

View File

@ -377,7 +377,7 @@ public class SybaseASESqlAstTranslator<T extends JdbcOperation> extends Abstract
}
}
// I think intersect is only supported in 16.0 SP3
if ( getDialect().isAnsiNullOn() ) {
if ( ( (SybaseASEDialect) getDialect() ).isAnsiNullOn() ) {
if ( isLob ) {
switch ( operator ) {
case DISTINCT_FROM:

View File

@ -1,13 +0,0 @@
/*
* SPDX-License-Identifier: LGPL-2.1-or-later
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.dialect.identity;
/**
* @author Jan Schatteman
* @deprecated use {@code DB2zIdentityColumnSupport}
*/
@Deprecated(since="6.4")
public class DB2390IdentityColumnSupport extends DB2zIdentityColumnSupport {
}

View File

@ -1,17 +0,0 @@
/*
* SPDX-License-Identifier: LGPL-2.1-or-later
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.dialect.unique;
import org.hibernate.dialect.Dialect;
/**
* @deprecated use {@link org.hibernate.dialect.unique.AlterTableUniqueDelegate}
*/
@Deprecated(since="6.2", forRemoval = true)
public class DefaultUniqueDelegate extends AlterTableUniqueDelegate {
public DefaultUniqueDelegate(Dialect dialect) {
super(dialect);
}
}