summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/operators.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-03-19 19:35:42 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-03-19 19:35:42 +0000
commit0cc04e6e1b70abc4817f275a898aa063da3de007 (patch)
treeef3635ca30317f49fa296deea56a263dad2d8167 /lib/sqlalchemy/sql/operators.py
parenta86dc8cbac51893e400e9e49f5e9d358c9845897 (diff)
downloadsqlalchemy-0cc04e6e1b70abc4817f275a898aa063da3de007.tar.gz
- like() and ilike() take an optional keyword argument
"escape=<somestring>", which is set as the escape character using the syntax "x LIKE y ESCAPE '<somestring>'" [ticket:993]
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r--lib/sqlalchemy/sql/operators.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py
index e31d27075..13f5e6131 100644
--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -25,16 +25,16 @@ def isnot():
def op(a, opstring, b):
return a.op(opstring)(b)
-def like_op(a, b):
- return a.like(b)
+def like_op(a, b, escape=None):
+ return a.like(b, escape=escape)
-def notlike_op(a, b):
+def notlike_op(a, b, escape=None):
raise NotImplementedError()
-def ilike_op(a, b):
- return a.ilike(b)
+def ilike_op(a, b, escape=None):
+ return a.ilike(b, escape=escape)
-def notilike_op(a, b):
+def notilike_op(a, b, escape=None):
raise NotImplementedError()
def between_op(a, b, c):