summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/operators.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-11-18 22:19:05 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-11-18 22:19:05 +0000
commit64d0ffee96d6fd907099d4fafd1314ddc5a6e4de (patch)
treeae7c7f3caeeea9b750cc77875922ec152b02dfee /lib/sqlalchemy/sql/operators.py
parentb3ec17153bd75107e7e6f8164c9fbea537685b5b (diff)
downloadsqlalchemy-64d0ffee96d6fd907099d4fafd1314ddc5a6e4de.tar.gz
- added op() operator to instrumented attributes; i.e.
User.name.op('ilike')('%somename%') [ticket:767]
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r--lib/sqlalchemy/sql/operators.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py
index 78159697b..4ee5f4a18 100644
--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -21,6 +21,9 @@ def is_():
def isnot():
raise NotImplementedError()
+def op(a, opstring, b):
+ return a.op(opstring)(b)
+
def like_op(a, b):
return a.like(b)