コード例 #1
0
 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.not_equal(_sql_string, REFERENCE_OBJECTS["Integer"]),
     predicate.greater(_sql_string, REFERENCE_OBJECTS["Integer"]),
コード例 #2
0
    def test_in(self):
        self.fill_map_numeric(count=10)
        predicate = in_("this", 1, 5, 7)

        self.assertCountEqual(self.map.key_set(predicate), [1, 5, 7])
コード例 #3
0
 def test_in(self):
     predicate = in_("this", 1, 5, 7)
     self.assertEqual(str(predicate),
                      "InPredicate(attribute='this', 1,5,7)")