
    Bh                        S SK Jr  S SKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr  SSKJr  SSKJr   " S S\\	R"                  \   5      rg)    )annotations)Any   )exc)util)	coercions)elements)	operators)roles)_generative)
Generative)Selfc                     ^  \ rS rSr% SrSrSrS\S'   SU 4S jjr\	SS j5       r
\	SS	 j5       r\	SS
 j5       rSrU =r$ )match   a  Produce a ``MATCH (X, Y) AGAINST ('TEXT')`` clause.

E.g.::

    from sqlalchemy import desc
    from sqlalchemy.dialects.mysql import match

    match_expr = match(
        users_table.c.firstname,
        users_table.c.lastname,
        against="Firstname Lastname",
    )

    stmt = (
        select(users_table)
        .where(match_expr.in_boolean_mode())
        .order_by(desc(match_expr))
    )

Would produce SQL resembling:

.. sourcecode:: sql

    SELECT id, firstname, lastname
    FROM user
    WHERE MATCH(firstname, lastname) AGAINST (:param_1 IN BOOLEAN MODE)
    ORDER BY MATCH(firstname, lastname) AGAINST (:param_2) DESC

The :func:`_mysql.match` function is a standalone version of the
:meth:`_sql.ColumnElement.match` method available on all
SQL expressions, as when :meth:`_expression.ColumnElement.match` is
used, but allows to pass multiple columns

:param cols: column expressions to match against

:param against: expression to be compared towards

:param in_boolean_mode: boolean, set "boolean mode" to true

:param in_natural_language_mode: boolean , set "natural language" to true

:param with_query_expansion: boolean, set "query expansion" to true

.. versionadded:: 1.4.19

.. seealso::

    :meth:`_expression.ColumnElement.match`

mysql_matchTzutil.immutabledict[str, Any]	modifiersc                r  > U(       d  [         R                  " S5      eUR                  SS 5      nUc  [         R                  " S5      e[        R                  " [
        R                  U5      n[        R                  R                  [        R                  US9nSUl        [        R                  " UR                  SS5      UR                  SS5      UR                  SS5      S	.5      nU(       a(  [         R                  " S
SR                  U5      -  5      e[         TU ]E  XC[        R$                  US9  g )Nzcolumns are requiredagainstzagainst is required)clausesFin_boolean_modein_natural_language_modewith_query_expansion)mysql_boolean_modemysql_natural_languagemysql_query_expansionzunknown arguments: %sz, r   )r   ArgumentErrorpopr   expectr   ExpressionElementRoler	   BooleanClauseList_construct_rawr
   comma_opgroupr   immutabledictjoinsuper__init__match_op)selfcolskwr   leftflags	__class__s         g/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/sqlalchemy/dialects/mysql/expression.pyr)   match.__init__P   s   ##$:;;&&D)?##$9::""''

 ))88 9 
 
""&(ff->&F*,&&.+ *,0F)N
 ##$;tyy}$MNN	(:(:eL    c                J    U R                   R                  SS05      U l         U $ )zApply the "IN BOOLEAN MODE" modifier to the MATCH expression.

:return: a new :class:`_mysql.match` instance with modifications
 applied.
r   Tr   unionr+   s    r1   r   match.in_boolean_moder   s%     --/CT.JKr3   c                J    U R                   R                  SS05      U l         U $ )zApply the "IN NATURAL LANGUAGE MODE" modifier to the MATCH
expression.

:return: a new :class:`_mysql.match` instance with modifications
 applied.
r   Tr5   r7   s    r1   r   match.in_natural_language_mode}   s%     --/G.NOr3   c                J    U R                   R                  SS05      U l         U $ )zApply the "WITH QUERY EXPANSION" modifier to the MATCH expression.

:return: a new :class:`_mysql.match` instance with modifications
 applied.
r   Tr5   r7   s    r1   r   match.with_query_expansion   s%     --/F.MNr3   r   )r,   zelements.ColumnElement[Any]r-   r   )returnr   )__name__
__module____qualname____firstlineno____doc____visit_name__inherit_cache__annotations__r)   r   r   r   r   __static_attributes____classcell__)r0   s   @r1   r   r      s^    1f #NM++ MD   	 	  r3   r   N)
__future__r   typingr    r   r   sqlr   r	   r
   r   sql.baser   r   util.typingr   BinaryExpressionr    r3   r1   <module>rP      sC    #        # " {J11#6 {r3   