Merge pull request #79 from z4y4ts/master
Adds Query.__rand__ and dal.Query.__ror__
This commit is contained in:
commit
c17e642f1f
1 file changed
+4
@@ -9578,9 +9578,13 @@ class Query(object):
|
|||||||
def __and__(self, other):
|
def __and__(self, other):
|
||||||
return Query(self.db,self.db._adapter.AND,self,other)
|
return Query(self.db,self.db._adapter.AND,self,other)
|
||||||
|
|
||||||
|
__rand__ = __and__
|
||||||
|
|
||||||
def __or__(self, other):
|
def __or__(self, other):
|
||||||
return Query(self.db,self.db._adapter.OR,self,other)
|
return Query(self.db,self.db._adapter.OR,self,other)
|
||||||
|
|
||||||
|
__ror__ = __or__
|
||||||
|
|
||||||
def __invert__(self):
|
def __invert__(self):
|
||||||
if self.op==self.db._adapter.NOT:
|
if self.op==self.db._adapter.NOT:
|
||||||
return self.first
|
return self.first
|
||||||
|
|||||||
Reference in new issue
Block a user