Class FilterQueryUtilsTest

java.lang.Object
ubic.gemma.persistence.util.FilterQueryUtilsTest

public class FilterQueryUtilsTest extends Object
  • 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 escape clause the pattern relies on the backslash default, which MySQL disables under NO_BACKSLASH_ESCAPES; the escaped wildcard then matches NOTHING. Measured against production before the fix: name like AFFX-BioB-3 returned 1 row and name like AFFX-BioB-3_at returned 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()