diff options
author | Michael Trier <mtrier@gmail.com> | 2008-07-13 04:45:37 +0000 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2008-07-13 04:45:37 +0000 |
commit | f899157ca9f6f5104a358420eba8f1b9019ece6f (patch) | |
tree | 37baa09bec04f9c1f93fa4ea4a798158cc3c75e1 /lib/sqlalchemy/databases/mysql.py | |
parent | bad78d9767fb9b076c7a6388286a0c37a81d8bc5 (diff) | |
download | sqlalchemy-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.py | 3 |
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 ({ |