§
    ‘Õ[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  G d
„ de
ej        ¦  «        ZdS )é   )Úexc)Úutil)Ú	coercions)Úelements)Ú	operators)Úroles)Ú_generative)Ú
Generative)ÚSelfc                   ó~   ‡ — e Zd ZdZdZdZˆ fd„Zedefd„¦   «         Z	edefd„¦   «         Z
edef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_matchTc                 óŒ  •— |st          j        d¦  «        ‚|                     dd ¦  «        }|€t          j        d¦  «        ‚t          j        t
          j        |¦  «        }t          j         	                    t          j        |¬¦  «        }d|_        t          j        |                     dd¦  «        |                     dd¦  «        |                     dd¦  «        d	œ¦  «        }|r*t          j        d
d                     |¦  «        z  ¦  «        ‚t!          ¦   «                              ||t          j        |¬¦  «         d S )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, )Ú	modifiers)r   ÚArgumentErrorÚpopr   Úexpectr   ÚExpressionElementRoler   ÚBooleanClauseListÚ_construct_rawr   Úcomma_opÚgroupr   ÚimmutabledictÚjoinÚsuperÚ__init__Úmatch_op)ÚselfÚcolsÚkwr   ÚleftÚflagsÚ	__class__s         €ús/var/www/api.easyaligner.net/htdocs/venv_linux/lib/python3.11/site-packages/sqlalchemy/dialects/mysql/expression.pyr$   zmatch.__init__M   sA  ø€ Øð 	<ÝÔ#Ð$:Ñ;Ô;Ð;à—&’&˜ DÑ)Ô)ˆàˆ?ÝÔ#Ð$9Ñ:Ô:Ð:ÝÔ"ÝÔ'Øñ
ô 
ˆõ
 Ô)×8Ò8ÝÔØð 9ñ 
ô 
ˆð ˆŒ
åÔ"à&(§f¢fÐ->ÀÑ&FÔ&FØ*,¯&ª&Ø.°ñ+ô +ð *,¯ªÐ0FÈÑ)NÔ)Nðð ñ
ô 
ˆð ð 	OÝÔ#Ð$;¸t¿yºyÈ¹}¼}Ñ$MÑNÔNÐNå‰Œ×Ò˜˜w­	Ô(:ÀeÐÑLÔLÐLÐLÐLó    Úreturnc                 óH   — | 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_modeo   s&   € ð œ×-Ò-Ð/CÀTÐ.JÑKÔKˆŒØˆr-   c                 óH   — | 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   Tr0   r2   s    r,   r   zmatch.in_natural_language_modez   s&   € ð œ×-Ò-Ð/GÈÐ.NÑOÔOˆŒØˆr-   c                 óH   — | 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   Tr0   r2   s    r,   r   zmatch.with_query_expansion†   s&   € ð œ×-Ò-Ð/FÈÐ.MÑNÔNˆŒØˆr-   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__visit_name__Úinherit_cacher$   r	   r   r   r   r   Ú__classcell__)r+   s   @r,   r   r      sÊ   ø€ € € € € ð1ð 1ðf #€Nà€Mð Mð  Mð  Mð  Mð  MðD ð ð ð ð ñ „[ðð ð	¨$ð 	ð 	ð 	ñ „[ð	ð ð dð ð ð ñ „[ðð ð ð ð r-   r   N)Ú r   r   Úsqlr   r   r   r   Úsql.baser	   r
   Úutil.typingr   ÚBinaryExpressionr   © r-   r,   ú<module>rB      sì   ðð Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø #Ð #Ð #Ð #Ð #Ð #Ø "Ð "Ð "Ð "Ð "Ð "Ø Ð Ð Ð Ð Ð ðzð zð zð zð zˆJ˜Ô1ñ zô zð zð zð zr-   