From a4c73cc8ae154c3a54678fec7f2e11798ee25b7f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 8 Jan 2007 19:09:02 +0000 Subject: - the "op()" function is now treated as an "operation", rather than a "comparison". the difference is, an operation produces a BinaryExpression from which further operations can occur whereas comparison produces the more restrictive BooleanExpression --- lib/sqlalchemy/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql.py') diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index 98191552b..f6e23d583 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -562,7 +562,7 @@ class _CompareMixin(object): def between(self, cleft, cright): return _BooleanExpression(self, and_(self._check_literal(cleft), self._check_literal(cright)), 'BETWEEN') def op(self, operator): - return lambda other: self._compare(operator, other) + return lambda other: self._operate(operator, other) # and here come the math operators: def __add__(self, other): return self._operate('+', other) -- cgit v1.2.1