summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.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/databases/mysql.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/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index e2ee5330c..f40fa71c1 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -1887,7 +1887,8 @@ class MySQLCompiler(compiler.DefaultCompiler):
operators = compiler.DefaultCompiler.operators.copy()
operators.update({
sql_operators.concat_op: lambda x, y: "concat(%s, %s)" % (x, y),
- sql_operators.mod: '%%'
+ sql_operators.mod: '%%',
+ sql_operators.match_op: lambda x, y: "MATCH (%s) AGAINST (%s IN BOOLEAN MODE)" % (x, y)
})
functions = compiler.DefaultCompiler.functions.copy()
functions.update ({