Class FilterQueryUtilsTest
java.lang.Object
ubic.gemma.persistence.util.FilterQueryUtilsTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidThe escape character must itself be escaped when it occurs in user data, or a value containing a tilde would silently change meaning.voidvoidA value containing an underscore must still match its own literal text.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Constructor Details
-
FilterQueryUtilsTest
public FilterQueryUtilsTest()
-
-
Method Details
-
testLikeRestrictionClause
@Test public void testLikeRestrictionClause() -
testLikeWithUnderscoreEmitsAMatchingEscapeClause
@Test public void testLikeWithUnderscoreEmitsAMatchingEscapeClause()A value containing an underscore must still match its own literal text.Underscore is a single-character SQL wildcard, so it has to be escaped — but escaping it is only half the job. Without a matching
escapeclause the pattern relies on the backslash default, which MySQL disables underNO_BACKSLASH_ESCAPES; the escaped wildcard then matches NOTHING. Measured against production before the fix:name like AFFX-BioB-3returned 1 row andname like AFFX-BioB-3_atreturned 0, so every Affymetrix probe name — nearly all of which carry an underscore — was unsearchable. -
testLikeEscapesTheEscapeCharacterItself
@Test public void testLikeEscapesTheEscapeCharacterItself()The escape character must itself be escaped when it occurs in user data, or a value containing a tilde would silently change meaning. -
testComplexClause
@Test public void testComplexClause() -
testRestrictionClauseWithCollection
@Test public void testRestrictionClauseWithCollection() -
testRestrictionClauseWithNullRequiredValue
@Test public void testRestrictionClauseWithNullRequiredValue() -
testRestrictionClauseWithNullObjectAlias
@Test public void testRestrictionClauseWithNullObjectAlias() -
testFormRestrictionAndGroupByAndOrderByClauses
@Test public void testFormRestrictionAndGroupByAndOrderByClauses() -
testFormRestriction
@Test public void testFormRestriction() -
testSortByCollectionSize
@Test public void testSortByCollectionSize() -
testSortByOwnIdOmitsNullOrdering
@Test public void testSortByOwnIdOmitsNullOrdering() -
testSortByJoinedIdKeepsNullOrdering
@Test public void testSortByJoinedIdKeepsNullOrdering() -
testSortByJoinedIdResolvedThroughGetSortKeepsNullOrdering
@Test public void testSortByJoinedIdResolvedThroughGetSortKeepsNullOrdering() -
testSortByOwnIdResolvedThroughGetSortOmitsNullOrdering
@Test public void testSortByOwnIdResolvedThroughGetSortOmitsNullOrdering() -
testSortByNullablePropertyKeepsNullOrdering
@Test public void testSortByNullablePropertyKeepsNullOrdering() -
testSubquery
@Test public void testSubquery() -
testNestedSubquery
@Test public void testNestedSubquery() -
testSubqueryWithEmptyPrefix
@Test public void testSubqueryWithEmptyPrefix()
-