summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/operators.py
diff options
context:
space:
mode:
authorMichael Trier <mtrier@gmail.com>2008-07-13 04:45:37 +0000
committerMichael Trier <mtrier@gmail.com>2008-07-13 04:45:37 +0000
commitf899157ca9f6f5104a358420eba8f1b9019ece6f (patch)
tree37baa09bec04f9c1f93fa4ea4a798158cc3c75e1 /lib/sqlalchemy/sql/operators.py
parentbad78d9767fb9b076c7a6388286a0c37a81d8bc5 (diff)
downloadsqlalchemy-f899157ca9f6f5104a358420eba8f1b9019ece6f.tar.gz
Added new basic match() operator that performs a full-text search. Supported on PostgreSQL, SQLite, MySQL, MS-SQL, and Oracle backends.
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r--lib/sqlalchemy/sql/operators.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py
index 46dcaba66..37070a451 100644
--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -61,6 +61,9 @@ def endswith_op(a, b, escape=None):
def contains_op(a, b, escape=None):
return a.contains(b, escape=escape)
+def match_op(a, b):
+ return a.match(b)
+
def comma_op(a, b):
raise NotImplementedError()
@@ -88,6 +91,7 @@ _PRECEDENCE = {
add:6,
sub:6,
concat_op:6,
+ match_op:6,
ilike_op:5,
notilike_op:5,
like_op:5,