diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-13 14:37:58 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-13 14:37:58 -0400 |
commit | d9b5991f9c21836e1d48555b949a402fc4ce6b35 (patch) | |
tree | dfe0d8d1635bab0659b8634faa8ba4580ac1bade /lib/sqlalchemy/sql/operators.py | |
parent | 96650157083f9c691a7a8a737724159cd6a1d668 (diff) | |
download | sqlalchemy-d9b5991f9c21836e1d48555b949a402fc4ce6b35.tar.gz |
- develop new system of applying custom operators to ColumnElement classes. resembles
that of the ORM so far.
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r-- | lib/sqlalchemy/sql/operators.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py index 89681fa6a..f851a5b00 100644 --- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -176,6 +176,10 @@ class custom_op(object): self.opstring = opstring self.precedence = precedence + def __eq__(self, other): + return isinstance(other, custom_op) and \ + other.opstring == self.opstring + def __call__(self, left, right, **kw): return left.operate(self, right, **kw) |