Ë
    ž©Ñh‘  ã                  óº   — d dl mZ d dlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 dd	lmZ dd
lmZ ddlmZ ddlmZ  G d„ dee	j"                  e   «      Zy)é    )Úannotations)ÚAnyé   )Úexc)Úutil)Ú	coercions)Úelements)Ú	operators)Úroles)Ú_generative)Ú
Generative)ÚSelfc                  ón   ‡ — e Zd ZU dZdZdZded<   d
ˆ fd„Zedd„«       Z	edd„«       Z
edd	„«       Zˆ xZS )Úmatchas  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                ó`  •— |st        j                  d«      ‚|j                  dd «      }|€t        j                  d«      ‚t        j                  t
        j                  |«      }t        j                  j                  t        j                  |¬«      }d|_        t        j                  |j                  dd«      |j                  dd«      |j                  dd«      d	œ«      }|r't        j                  d
dj                  |«      z  «      ‚t         ‰| E  ||t        j$                  |¬«       y )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         €úb/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/expression.pyr'   zmatch.__init__P   s  ø€ ÙÜ×#Ñ#Ð$:Ó;Ð;à—&‘&˜ DÓ)ˆàˆ?Ü×#Ñ#Ð$9Ó:Ð:Ü×"Ñ"Ü×'Ñ'Øó
ˆô
 ×)Ñ)×8Ñ8Ü×ÑØð 9ó 
ˆð ˆŒ
ä×"Ñ"à&(§f¡fÐ->ÀÓ&FØ*,¯&©&Ø.°ó+ð *,¯©Ð0FÈÓ)Nñó
ˆñ Ü×#Ñ#Ð$;¸t¿y¹yÈ»}Ñ$MÓNÐNä‰Ñ˜˜w¬	×(:Ñ(:ÀeÐÕLó    c                óJ   — | j                   j                  ddi«      | _         | S )z¢Apply 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    r/   r   zmatch.in_boolean_moder   s%   € ð Ÿ™×-Ñ-Ð/CÀTÐ.JÓKˆŒØˆr0   c                óJ   — | j                   j                  ddi«      | _         | S )z³Apply the "IN NATURAL LANGUAGE MODE" modifier to the MATCH
        expression.

        :return: a new :class:`_mysql.match` instance with modifications
         applied.
        r   Tr2   r4   s    r/   r   zmatch.in_natural_language_mode}   s%   € ð Ÿ™×-Ñ-Ð/GÈÐ.NÓOˆŒØˆr0   c                óJ   — | j                   j                  ddi«      | _         | S )z§Apply the "WITH QUERY EXPANSION" modifier to the MATCH expression.

        :return: a new :class:`_mysql.match` instance with modifications
         applied.
        r   Tr2   r4   s    r/   r   zmatch.with_query_expansion‰   s%   € ð Ÿ™×-Ñ-Ð/FÈÐ.MÓNˆŒØˆr0   )r*   zelements.ColumnElement[Any]r+   r   )Úreturnr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__visit_name__Úinherit_cacheÚ__annotations__r'   r   r   r   r   Ú__classcell__)r.   s   @r/   r   r      s^   ø… ñ1ðf #€Nà€MØ+Ó+õ MðD òó ðð ò	ó ð	ð òó ôr0   r   N)Ú
__future__r   Útypingr   Ú r   r   Úsqlr   r	   r
   r   Úsql.baser   r   Úutil.typingr   ÚBinaryExpressionr   © r0   r/   ú<module>rH      sC   ðõ #å å Ý Ý Ý Ý Ý Ý #Ý "Ý ô{ˆJ˜×1Ñ1°#Ñ6õ {r0   