QEmpty

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
class QEmpty(object):
    def __init__(self):
        pass

    def __and__(self, other):
        return QAnd(self, other)

    def __or__(self, other):
        return QOr(self, other)

    def get_sql(self, opts):
        return {}, ['42=0'], []

More like this

  1. CustomQueryManager by zvoase 3 years, 7 months ago
  2. QLeftOuterJoins by dottedmag 4 years, 8 months ago
  3. Humanize lists of strings in templates by ChipX86 4 years, 8 months ago
  4. Bitwise operator queryset filter by hgeerts@osso.nl 1 year, 9 months ago
  5. make a combined set of db.Q objects out of a list of dicts and an operator by jdunck 2 weeks, 2 days ago

Comments

buriy (on August 2, 2007):

Good to use with http://buffis.com/blog/?p=46

#

(Forgotten your password?)