def test_like(self): self.map.put("key-1", "a_value") self.map.put("key-2", "b_value") self.map.put("key-3", "aa_value") self.map.put("key-4", "AA_value") predicate = like("this", "a%") self.assertCountEqual(self.map.key_set(predicate), ["key-1", "key-3"])
"CustomStreamSerializable": _custom_serializable, "CustomByteArraySerializable": _custom_byte_array_serializable, "AnIdentifiedDataSerializable": _identified, "APortable": _portable, "ArrayList": [None, _non_null_list], "LinkedList": [None, _non_null_list], "TruePredicate": predicate.true(), "FalsePredicate": predicate.false(), "SqlPredicate": predicate.sql(_sql_string), "EqualPredicate": predicate.equal(_sql_string, REFERENCE_OBJECTS["Integer"]), "NotEqualPredicate": predicate.not_equal(_sql_string, REFERENCE_OBJECTS["Integer"]), "GreaterLessPredicate": predicate.greater(_sql_string, REFERENCE_OBJECTS["Integer"]), "BetweenPredicate": predicate.between( _sql_string, REFERENCE_OBJECTS["Integer"], REFERENCE_OBJECTS["Integer"] ), "LikePredicate": predicate.like(_sql_string, _sql_string), "ILikePredicate": predicate.ilike(_sql_string, _sql_string), "InPredicate": predicate.in_( _sql_string, REFERENCE_OBJECTS["Integer"], REFERENCE_OBJECTS["Integer"] ), "RegexPredicate": predicate.regex(_sql_string, _sql_string), "AndPredicate": predicate.and_( predicate.sql(_sql_string), predicate.equal(_sql_string, REFERENCE_OBJECTS["Integer"]), predicate.not_equal(_sql_string, REFERENCE_OBJECTS["Integer"]), predicate.greater(_sql_string, REFERENCE_OBJECTS["Integer"]), predicate.greater_or_equal(_sql_string, REFERENCE_OBJECTS["Integer"]), ), "OrPredicate": predicate.or_( predicate.sql(_sql_string), predicate.equal(_sql_string, REFERENCE_OBJECTS["Integer"]),
predicate.true(), "FalsePredicate": predicate.false(), "SqlPredicate": predicate.sql(_sql_string), "EqualPredicate": predicate.equal(_sql_string, REFERENCE_OBJECTS["Integer"]), "NotEqualPredicate": predicate.not_equal(_sql_string, REFERENCE_OBJECTS["Integer"]), "GreaterLessPredicate": predicate.greater(_sql_string, REFERENCE_OBJECTS["Integer"]), "BetweenPredicate": predicate.between(_sql_string, REFERENCE_OBJECTS["Integer"], REFERENCE_OBJECTS["Integer"]), "LikePredicate": predicate.like(_sql_string, _sql_string), "ILikePredicate": predicate.ilike(_sql_string, _sql_string), "InPredicate": predicate.in_(_sql_string, REFERENCE_OBJECTS["Integer"], REFERENCE_OBJECTS["Integer"]), "RegexPredicate": predicate.regex(_sql_string, _sql_string), "AndPredicate": predicate.and_( predicate.sql(_sql_string), predicate.equal(_sql_string, REFERENCE_OBJECTS["Integer"]), predicate.not_equal(_sql_string, REFERENCE_OBJECTS["Integer"]), predicate.greater(_sql_string, REFERENCE_OBJECTS["Integer"]), predicate.greater_or_equal(_sql_string, REFERENCE_OBJECTS["Integer"])), "OrPredicate":
def test_like(self): predicate = like("this", "a%") self.assertEqual(str(predicate), "LikePredicate(attribute='this', expression='a%')")