Ë L i‘ãóº—ddlmZddlmZddlmZddlmZddlmZddlm Z ddlm Z dd lm Z dd l m Z dd l mZdd lmZGd „dee j"e«Zy)é)Ú annotations)ÚAnyé)Úexc)Úutil)Ú coercions)Úelements)Ú operators)Úroles)Ú _generative)Ú Generative)ÚSelfcón‡—eZdZUdZdZdZded<d ˆfd„ Zed d„«Z ed d„«Z ed d „«Z ˆxZ S) ÚmatchasProduce 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_matchTzutil.immutabledict[str, Any]Ú modifierscó`•—|stjd«‚|jdd«}|€tjd«‚tjt j |«}tjjtj|¬«}d|_ tj|jdd«|jdd«|jdd«d œ«}|r'tjd d j|«z«‚t ‰|E||tj$|¬ «y) Nzcolumns are requiredÚagainstzagainst is required)ÚclausesFÚin_boolean_modeÚin_natural_language_modeÚwith_query_expansion)Úmysql_boolean_modeÚmysql_natural_languageÚmysql_query_expansionzunknown 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 €új/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/expression.pyr'zmatch.__init__Psø€ÙÜ×#Ñ#Ð$:Ó;Ð ;à—&‘&˜ DÓ)ˆà ˆ?Ü×#Ñ#Ð$9Ó:Ð :Ü×"Ñ"Ü × 'Ñ 'Ø ó ˆô ×)Ñ)×8Ñ8Ü × Ñ Øð9ó ˆðˆŒ ä×"Ñ"à&(§f¡fÐ->ÀÓ&FØ*,¯&©&Ø.°ó+ð*,¯©Ð0FÈÓ)Nñ  ó ˆñ Ü×#Ñ#Ð$;¸t¿y¹yÈ»}Ñ$MÓNÐ Nä ‰Ñ˜˜w¬ ×(:Ñ(:ÀeÐÕLócóJ—|jjddi«|_|S)z¢Apply the "IN BOOLEAN MODE" modifier to the MATCH expression. :return: a new :class:`_mysql.match` instance with modifications applied. rT©rÚunion©r)s r/rzmatch.in_boolean_moders%€ðŸ™×-Ñ-Ð/CÀTÐ.JÓKˆŒØˆ r0cóJ—|jjddi«|_|S)z³Apply the "IN NATURAL LANGUAGE MODE" modifier to the MATCH expression. :return: a new :class:`_mysql.match` instance with modifications applied. rTr2r4s r/rzmatch.in_natural_language_mode}s%€ðŸ™×-Ñ-Ð/GÈÐ.NÓOˆŒØˆ r0cóJ—|jjddi«|_|S)z§Apply the "WITH QUERY EXPANSION" modifier to the MATCH expression. :return: a new :class:`_mysql.match` instance with modifications applied. rTr2r4s r/rzmatch.with_query_expansion‰s%€ðŸ™×-Ñ-Ð/FÈÐ.MÓNˆŒØˆ r0)r*zelements.ColumnElement[Any]r+r)Úreturnr) Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú__visit_name__Ú inherit_cacheÚ__annotations__r'r rrrÚ __classcell__)r.s@r/rrs^ø…ñ1ðf#€Nà€MØ+Ó+õ MðDòóððò óð ðòóôr0rN)Ú __future__rÚtypingrÚrrÚsqlrr r r Úsql.baser r Ú util.typingrÚBinaryExpressionr©r0r/úrHsCðõ#ååÝÝÝÝÝÝ#Ý"Ýô{ˆJ˜×1Ñ1°#Ñ6õ{r0