From 931685bac9161056cda3337ca2515ae9add236d8 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 24 May 2014 09:54:20 -0400 Subject: - 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 --- lib/sqlalchemy/sql/operators.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/sql/operators.py') 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 ''``. 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) -- cgit v1.2.1