Removed Dialect#areStringComparisonsCaseInsensitive() method
This commit is contained in:
parent
ca83c6ca7e
commit
573d146046
|
@ -397,11 +397,6 @@ public class CacheDialect extends Dialect {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areStringComparisonsCaseInsensitive() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsOrderByInSubquery() {
|
||||
// This is just a guess
|
||||
|
|
|
@ -341,11 +341,6 @@ public class TeradataDialect extends Dialect {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areStringComparisonsCaseInsensitive() {
|
||||
return getVersion() < 14;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsEmptyInList() {
|
||||
return false;
|
||||
|
|
|
@ -2930,18 +2930,6 @@ public abstract class Dialect implements ConversionContext {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Are string comparisons implicitly case insensitive.
|
||||
* <p/>
|
||||
* In other words, does [where 'XYZ' = 'xyz'] resolve to true?
|
||||
*
|
||||
* @return True if comparisons are case insensitive.
|
||||
* @since 3.2
|
||||
*/
|
||||
public boolean areStringComparisonsCaseInsensitive() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this dialect known to support what ANSI-SQL terms "row value
|
||||
* constructor" syntax; sometimes called tuple syntax.
|
||||
|
|
|
@ -787,11 +787,6 @@ public class MySQLDialect extends Dialect {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areStringComparisonsCaseInsensitive() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsLobValueChangePropagation() {
|
||||
// note: at least my local MySQL 5.1 install shows this not working...
|
||||
|
|
|
@ -387,11 +387,6 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
|
|||
|
||||
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@Override
|
||||
public boolean areStringComparisonsCaseInsensitive() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor() {
|
||||
return false;
|
||||
|
|
|
@ -482,19 +482,6 @@ public class SybaseASEDialect extends SybaseDialect {
|
|||
return 30;
|
||||
}
|
||||
|
||||
/**
|
||||
* By default, Sybase string comparisons are case-insensitive.
|
||||
* <p/>
|
||||
* If the DB is configured to be case-sensitive, then this return
|
||||
* value will be incorrect.
|
||||
* <p/>
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean areStringComparisonsCaseInsensitive() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public String getCurrentTimestampSQLFunctionName() {
|
||||
|
|
|
@ -371,15 +371,11 @@ public class QueryCacheTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@RequiresDialectFeature(
|
||||
feature = DialectFeatureChecks.CaseSensitiveCheck.class,
|
||||
comment = "i.name='widget' should not match on case sensitive database."
|
||||
)
|
||||
public void testCaseInsensitiveComparison(SessionFactoryScope scope) {
|
||||
public void testComparison(SessionFactoryScope scope) {
|
||||
Item item = new Item();
|
||||
scope.inTransaction(
|
||||
session -> {
|
||||
item.setName( "Widget" );
|
||||
item.setName( "widget" );
|
||||
item.setDescription( "A really top-quality, full-featured widget." );
|
||||
session.save( item );
|
||||
}
|
||||
|
@ -390,7 +386,7 @@ public class QueryCacheTest {
|
|||
List result = session.createQuery( queryString ).list();
|
||||
assertEquals( 1, result.size() );
|
||||
Item i = session.get( Item.class, item.getId() );
|
||||
assertEquals( "Widget", i.getName() );
|
||||
assertEquals( "widget", i.getName() );
|
||||
session.delete( i );
|
||||
}
|
||||
);
|
||||
|
|
|
@ -63,12 +63,6 @@ abstract public class DialectChecks {
|
|||
}
|
||||
}
|
||||
|
||||
public static class CaseSensitiveCheck implements DialectCheck {
|
||||
public boolean isMatch(Dialect dialect) {
|
||||
return dialect.areStringComparisonsCaseInsensitive();
|
||||
}
|
||||
}
|
||||
|
||||
public static class SupportsResultSetPositioningOnForwardOnlyCursorCheck implements DialectCheck {
|
||||
public boolean isMatch(Dialect dialect) {
|
||||
return dialect.supportsResultSetPositionQueryMethodsOnForwardOnlyCursor();
|
||||
|
|
|
@ -80,12 +80,6 @@ abstract public class DialectFeatureChecks {
|
|||
}
|
||||
}
|
||||
|
||||
public static class CaseSensitiveCheck implements DialectFeatureCheck {
|
||||
public boolean apply(Dialect dialect) {
|
||||
return dialect.areStringComparisonsCaseInsensitive();
|
||||
}
|
||||
}
|
||||
|
||||
public static class SupportsNoColumnInsert implements DialectFeatureCheck {
|
||||
public boolean apply(Dialect dialect) {
|
||||
return dialect.supportsNoColumnsInsert();
|
||||
|
|
Loading…
Reference in New Issue