summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py
index dbd119fd1..e0bae905a 100644
--- a/lib/sqlalchemy/sql.py
+++ b/lib/sqlalchemy/sql.py
@@ -1076,8 +1076,14 @@ class _BinaryClause(ClauseElement):
self.left.compare(other.left) and self.right.compare(other.right)
)
-class _BooleanExpression(_BinaryClause):
- """represents a boolean expression, which is only useable in WHERE criterion."""
+class _BinaryExpression(_BinaryClause, ColumnElement):
+ """represents a binary expression, which can be in a WHERE criterion or in the column list
+ of a SELECT. By adding "ColumnElement" to its inherited list, it becomes a Selectable
+ unit which can be placed in the column list of a SELECT."""
+ pass
+
+class _BooleanExpression(_BinaryExpression):
+ """represents a boolean expression."""
def __init__(self, *args, **kwargs):
self.negate = kwargs.pop('negate', None)
super(_BooleanExpression, self).__init__(*args, **kwargs)
@@ -1087,13 +1093,6 @@ class _BooleanExpression(_BinaryClause):
else:
return super(_BooleanExpression, self)._negate()
-class _BinaryExpression(_BinaryClause, ColumnElement):
- """represents a binary expression, which can be in a WHERE criterion or in the column list
- of a SELECT. By adding "ColumnElement" to its inherited list, it becomes a Selectable
- unit which can be placed in the column list of a SELECT."""
- pass
-
-
class Join(FromClause):
def __init__(self, left, right, onclause=None, isouter = False):
self.left = left._selectable()