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/postgres.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/postgres.py')
-rw-r--r-- | lib/sqlalchemy/databases/postgres.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index 6e77f02d8..9adade2a6 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -648,6 +648,7 @@ class PGCompiler(compiler.DefaultCompiler): sql_operators.mod : '%%', sql_operators.ilike_op: lambda x, y, escape=None: '%s ILIKE %s' % (x, y) + (escape and ' ESCAPE \'%s\'' % escape or ''), sql_operators.notilike_op: lambda x, y, escape=None: '%s NOT ILIKE %s' % (x, y) + (escape and ' ESCAPE \'%s\'' % escape or ''), + sql_operators.match_op: lambda x, y: '%s @@ to_tsquery(%s)' % (x, y), } ) |