MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / match

Method match

lib/sqlalchemy/sql/operators.py:1789–1817  ·  view source on GitHub ↗

Implements a database-specific 'match' operator. :meth:`_sql.ColumnOperators.match` attempts to resolve to a MATCH-like function or operator provided by the backend. Examples include: * PostgreSQL - renders ``x @@ plainto_tsquery(y)`` .. versionchanged:

(self, other: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

1787 return self.operate(icontains_op, other, **kw)
1788
1789 def match(self, other: Any, **kwargs: Any) -> ColumnOperators:
1790 """Implements a database-specific 'match' operator.
1791
1792 :meth:`_sql.ColumnOperators.match` attempts to resolve to
1793 a MATCH-like function or operator provided by the backend.
1794 Examples include:
1795
1796 * PostgreSQL - renders ``x @@ plainto_tsquery(y)``
1797
1798 .. versionchanged:: 2.0 ``plainto_tsquery()`` is used instead
1799 of ``to_tsquery()`` for PostgreSQL now; for compatibility with
1800 other forms, see :ref:`postgresql_match`.
1801
1802
1803 * MySQL - renders ``MATCH (x) AGAINST (y IN BOOLEAN MODE)``
1804
1805 .. seealso::
1806
1807 :class:`_mysql.match` - MySQL specific construct with
1808 additional features.
1809
1810 * Oracle Database - renders ``CONTAINS(x, y)``
1811 * other backends may provide special implementations.
1812 * Backends without any special implementation will emit
1813 the operator as "MATCH". This is compatible with SQLite, for
1814 example.
1815
1816 """
1817 return self.operate(match_op, other, **kwargs)
1818
1819 def regexp_match(
1820 self, pattern: Any, flags: Optional[str] = None

Callers 15

process_functionsFunction · 0.45
process_moduleFunction · 0.45
_is_py_versionFunction · 0.45
_python_to_tagFunction · 0.45
run_fileFunction · 0.45
_grab_overloadsFunction · 0.45
process_classFunction · 0.45
process_moduleFunction · 0.45
_format_blockFunction · 0.45
format_fileFunction · 0.45
iter_filesFunction · 0.45
__init__Method · 0.45

Calls 1

operateMethod · 0.95

Tested by 15

test_match_1Method · 0.36
test_match_2Method · 0.36
test_match_3Method · 0.36
test_match_4Method · 0.36
test_match_5Method · 0.36