This commit is contained in:
Julian Freeman
2024-07-20 18:15:23 -04:00
parent 4c6ee85f5a
commit d05e3dba49
6 changed files with 105 additions and 36 deletions

View File

@@ -134,8 +134,11 @@ class Expression(object):
def and_(self, expression: Expression):
return Expression(f"{self._expr} AND {expression}")
def or_(self, expression: Expression):
return Expression(f"{self._expr} OR {expression}")
def or_(self, expression: Expression, high_priority: bool = False):
statement = f"{self._expr} OR {expression}"
if high_priority:
statement = f"({statement})"
return Expression(statement)
def exists(self, not_: bool = False):
mark = "EXISTS"