Removed Dialect#areStringComparisonsCaseInsensitive() method
This commit is contained in:
parent
ca83c6ca7e
commit
573d146046
|
@ -397,11 +397,6 @@ public class CacheDialect extends Dialect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean areStringComparisonsCaseInsensitive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsOrderByInSubquery() {
|
public boolean supportsOrderByInSubquery() {
|
||||||
// This is just a guess
|
// This is just a guess
|
||||||
|
|
|
@ -341,11 +341,6 @@ public class TeradataDialect extends Dialect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean areStringComparisonsCaseInsensitive() {
|
|
||||||
return getVersion() < 14;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsEmptyInList() {
|
public boolean supportsEmptyInList() {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -2930,18 +2930,6 @@ public abstract class Dialect implements ConversionContext {
|
||||||
return true;
|
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
|
* Is this dialect known to support what ANSI-SQL terms "row value
|
||||||
* constructor" syntax; sometimes called tuple syntax.
|
* constructor" syntax; sometimes called tuple syntax.
|
||||||
|
|
|
@ -787,11 +787,6 @@ public class MySQLDialect extends Dialect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean areStringComparisonsCaseInsensitive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsLobValueChangePropagation() {
|
public boolean supportsLobValueChangePropagation() {
|
||||||
// note: at least my local MySQL 5.1 install shows this not working...
|
// 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean areStringComparisonsCaseInsensitive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor() {
|
public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor() {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -482,19 +482,6 @@ public class SybaseASEDialect extends SybaseDialect {
|
||||||
return 30;
|
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
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public String getCurrentTimestampSQLFunctionName() {
|
public String getCurrentTimestampSQLFunctionName() {
|
||||||
|
|
|
@ -371,15 +371,11 @@ public class QueryCacheTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@RequiresDialectFeature(
|
public void testComparison(SessionFactoryScope scope) {
|
||||||
feature = DialectFeatureChecks.CaseSensitiveCheck.class,
|
|
||||||
comment = "i.name='widget' should not match on case sensitive database."
|
|
||||||
)
|
|
||||||
public void testCaseInsensitiveComparison(SessionFactoryScope scope) {
|
|
||||||
Item item = new Item();
|
Item item = new Item();
|
||||||
scope.inTransaction(
|
scope.inTransaction(
|
||||||
session -> {
|
session -> {
|
||||||
item.setName( "Widget" );
|
item.setName( "widget" );
|
||||||
item.setDescription( "A really top-quality, full-featured widget." );
|
item.setDescription( "A really top-quality, full-featured widget." );
|
||||||
session.save( item );
|
session.save( item );
|
||||||
}
|
}
|
||||||
|
@ -390,7 +386,7 @@ public class QueryCacheTest {
|
||||||
List result = session.createQuery( queryString ).list();
|
List result = session.createQuery( queryString ).list();
|
||||||
assertEquals( 1, result.size() );
|
assertEquals( 1, result.size() );
|
||||||
Item i = session.get( Item.class, item.getId() );
|
Item i = session.get( Item.class, item.getId() );
|
||||||
assertEquals( "Widget", i.getName() );
|
assertEquals( "widget", i.getName() );
|
||||||
session.delete( i );
|
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 static class SupportsResultSetPositioningOnForwardOnlyCursorCheck implements DialectCheck {
|
||||||
public boolean isMatch(Dialect dialect) {
|
public boolean isMatch(Dialect dialect) {
|
||||||
return dialect.supportsResultSetPositionQueryMethodsOnForwardOnlyCursor();
|
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 static class SupportsNoColumnInsert implements DialectFeatureCheck {
|
||||||
public boolean apply(Dialect dialect) {
|
public boolean apply(Dialect dialect) {
|
||||||
return dialect.supportsNoColumnsInsert();
|
return dialect.supportsNoColumnsInsert();
|
||||||
|
|
Loading…
Reference in New Issue