diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-05-24 09:54:20 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-05-24 09:54:20 -0400 |
commit | 931685bac9161056cda3337ca2515ae9add236d8 (patch) | |
tree | 0c63c2e4816521262644ba77039e99e6382087d3 /lib/sqlalchemy/sql/operators.py | |
parent | bc91884a4125ebda230ae8ff20f2af1dbc7e63c6 (diff) | |
download | sqlalchemy-931685bac9161056cda3337ca2515ae9add236d8.tar.gz |
- hyperlink all the column operators listed in the ORM tutorial common filter operators section
- add language to MATCH explicitly stating this operator varies by backend and is not available
on SQLite, as the tutorial defaults to SQLite to start with, fix #3059
- on the actual match() documentation fix this up to be more accurate, list some example renderings
for different backends. again mention SQLite not supported
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r-- | lib/sqlalchemy/sql/operators.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py index 402610fa5..9ad30e49e 100644 --- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -518,11 +518,17 @@ class ColumnOperators(Operators): return self.operate(contains_op, other, **kwargs) def match(self, other, **kwargs): - """Implements the 'match' operator. + """Implements a database-specific 'match' operator. - In a column context, this produces a MATCH clause, i.e. - ``MATCH '<other>'``. The allowed contents of ``other`` - are database backend specific. + :meth:`~.ColumnOperators.match` attempts to resolve to + a MATCH-like function or operator provided by the backend. + Examples include: + + * Postgresql - renders ``x @@ to_tsquery(y)`` + * MySQL - renders ``MATCH (x) AGAINST (y IN BOOLEAN MODE)`` + * Oracle - renders ``CONTAINS(x, y)`` + * other backends may provide special implementations; + some backends such as SQLite have no support. """ return self.operate(match_op, other, **kwargs) |