� k\�g/���:�dZddlmZddlmZddlmZddlZddlZddl Z ddl Z ddl m Z ddl m Z ddl m Z dd l mZdd l mZdd l mZdd l mZdd l mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl m!Z!ddl m"Z"ddl m#Z#ddl m$Z$ddl m%Z%dd l&m'Z'dd!l&m(Z(dd"l&m)Z)dd#l&m*Z*dd$l+m,Z,dd%l+m-Z-dd&l.m/Z/dd'l.m0Z0dd(l.m1Z1dd)l.m2Z2dd*l.m3Z3dd+l.m4Z4dd,l.m5Z5dd-l.m6Z6dd.l.m7Z7dd/l.m8Z8dd0l9m:Z:dd1l9m;Z;dd2l!m<Z<dd3l"m=Z=dd4l$m>Z>dd5l?m@Z@dd6l?mAZAdd7l?mBZBdd8l?mCZCdd9l?mDZDd:d;l mEZEd:d<l mFZFd:d=l mGZGd:d>lGmHZHd:d?lGmIZId:d@lJmKZKd:dAlJmLZLd:dBlJmMZMe jr�ddCl&mNZNddDl&mOZOddEl&mPZPddFl&mQZQddGl&mRZRddHl&mSZSddIl&mTZTddJl.mUZUddKl9mVZVddLl9mWZWddMlXmYZYddNlXmZZZddOl[m\Z\ddPl"m]Z]ddQl^m_Z_ddRl^m`Z`ddSl^maZaddTl^mbZbddUlcmdZdddVlcmeZeddWlcmfZfddXlcmgZgddYlhmiZiddZl%mjZjdd[l?mkZkdd\l?mlZldd]l?mmZmd:d^lnmoZod:d_lnmpZpd:d`lqmrZrd:dalqmsZsd:dblqmtZtd:dclqmuZud:ddlqmvZvd:delwmxZxeeyefZzeeye{efZ|edfdg�h��Z}edie dj�k��Z~edldg�h��Zedmdn�h��Z�edodp�h��Z�e d�d�dy���Z�e d��dd{���Z�e d��dd~���Z� d��dd�Z� �d�dd��Z�Gd��d�eD��Z�eFj�Gd��d�e-e:e>eAe�����Z�Gd��d�e���Z�Gd��d�e#j�e#j�e#j�e���Z�Gd��d�ee~e=eI��Z�Gd��d�e�e~e#j�e~eI��Z�e�Z�Gd��d�e#j�e#j�e#j�e#j�e}e#j�e#j�e#j�e#j�e#j�e#j�e�e}e���Z�Gd��d�e�e}��Z�Gd��d�e�e}��Z�Gd��d�e#j�e�e}��Z�Gd��d�e���Z�Gd��d�e#j�e#j�e#j�e#j�e#j�e#j�e#j�e#j�e4e3e�e#j�e eFj�d���Z�Gd��d�e8e#j�de�d��Z�e�����Gd��d�e8e#j�e�e�e���Z�e�����Gd��d�e8e#j�e�e�e���Z�e�����Gd��d�e#j�e#j�e#j�e#j�e���Z�Gd��d�e�e}��Z�Gd��d�e�e}��Z�Gd��d�e�e���Z�e�j�Z�e�j�Z�Gd��d�e�e�ee d�f��ZGd��d�e�e}��Z�Gd��d�e�e}��Z�Gd��d�e�e}��Z�Gd��d�e�e}��Z�Gd��d�e�e{��Z�Gd��d�e�e}��Z�Gd��d�e�e ��Z�Gd��d�e�e}��Z�Gd��d�e�e}��Z�Gd��d�e�e�e�e���Z�Gd„d�e�e}��Z�GdĄd�e�e ��Z�GdƄd�e�e ��Z�GdȄd�e���Z�Gdʄd�e�e�e}��Z�Gd̄d�e�e}��Z�Gd΄d�e��Z�e�j�Z�e�j�Z�ee{e�fZ�GdЄd�e�e}��Z�Gd҄d�e�e}��Z�GdԄd�e4e�e}��Z�Gdքd�e�e}��Z�eLdئ�Z�Gdلd�e#j�e}e�e}��Z�Gdۄd�e#j�e#j�e}e#j�e6e�e}��Z�Gd݄d�e�e}��Z�Gd߄d�e�e���Z�Gd�d�e3e���Z�Gd�d�eΦ�Z�Gd�d�eΦ�Z�Gd�d�eΦ�Z�Gd�d�eGj�e̦�ZӐdd�ZԐdd�Z�d�d�Z�Gd�d�eGj�d���Z�Gd��d�e,��Z�Gd��d�eӦ�Z�Gd��d�eڦ�Z�e�Z�Gd��d�eڦ�Z�dS(z�Core SQL expression elements, including :class:`_expression.ClauseElement`, :class:`_expression.ColumnElement`, and derived classes. �)� annotations)�Decimal)�EnumN)� AbstractSet)�Any)�Callable)�cast)�Dict)� FrozenSet)�Generic)�Iterable)�Iterator)�List)�Mapping)�Optional)�overload)�Sequence)�Set)�Tuple)�Type)� TYPE_CHECKING)�TypeVar)�Union�)� coercions)� operators)�roles)� traversals)�type_api)�has_schema_attr)�is_named_from_clause)�is_quoted_name)� is_tuple_type)� Annotated)�SupportsWrappingAnnotations)�_clone)�_expand_cloned)� _generative)�_NoArg)� Executable)� Generative)� HasMemoized)� Immutable)�NO_ARG)�SingletonConstant)�MemoizedHasCacheKey)�NO_CACHE)�_document_text_coercion)�ColumnOperators)�HasCopyInternals)�cloned_traverse)�ExternallyTraversible)�InternalTraversal)�traverse)� Visitable�)�exc)� inspection)�util)�!HasMemoized_ro_memoized_attribute)� TypingOnly)�Literal)� ParamSpec)�Self)� _ByArgument)�_ColumnExpressionArgument)�#_ColumnExpressionOrStrLabelArgument)� _HasDialect)� _InfoType)�_PropagateAttrsType)�_TypeEngineArgument)� ColumnSet)�_CacheKeyTraversalType)�CacheKey)�Compiled)� SQLCompiler)�FunctionElement)� OperatorType)�Column)�DefaultGenerator)� FetchedValue)� ForeignKey)�_SelectIterable)� FromClause)�NamedFromClause)� TextualSelect)� TupleType)� TypeEngine)�_CloneCallableType)�_TraverseInternalsType)�anon_map)� Connection)�Dialect)�_CoreMultiExecuteParams)� CacheStats)�CompiledCacheType)�CoreExecuteOptionsParameter)�SchemaTranslateMapType)�Result�_Tr)�bound�_T_coT)rg� covariant�_OPT�_NT�_NUMERIC�_NMT�_NUMBERF�value�type_�_TypeEngineArgument[_T]�literal_execute�bool�return�BindParameter[_T]c��dS�N��rorprrs �g/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sqlalchemy/sql/elements.py�literalr{�� �� ���Nonec��dSrwrxrys rzr{r{�r|r}�"Optional[_TypeEngineArgument[Any]]�BindParameter[Any]c��dSrwrxrys rzr{r{�s �� �r}c�F�tjtj|||���S)aReturn a literal clause, bound to a bind parameter. Literal clauses are created automatically when non- :class:`_expression.ClauseElement` objects (such as strings, ints, dates, etc.) are used in a comparison operation with a :class:`_expression.ColumnElement` subclass, such as a :class:`~sqlalchemy.schema.Column` object. Use this function to force the generation of a literal clause, which will be created as a :class:`BindParameter` with a bound value. :param value: the value to be bound. Can be any Python object supported by the underlying DB-API, or is translatable via the given type argument. :param type\_: an optional :class:`~sqlalchemy.types.TypeEngine` which will provide bind-parameter translation for this literal. :param literal_execute: optional bool, when True, the SQL engine will attempt to render the bound value directly in the SQL statement at execution time rather than providing as a parameter value. .. versionadded:: 2.0 )rprr)r�expectr�LiteralValueRolerys rzr{r{�s-��: � � �� ��'�  � � �r}�text�str�!Optional[_TypeEngineArgument[_T]]�ColumnClause[_T]c�&�t||d���S)a�Produce a :class:`.ColumnClause` object that has the :paramref:`_expression.column.is_literal` flag set to True. :func:`_expression.literal_column` is similar to :func:`_expression.column`, except that it is more often used as a "standalone" column expression that renders exactly as stated; while :func:`_expression.column` stores a string name that will be assumed to be part of a table and may be quoted as such, :func:`_expression.literal_column` can be that, or any other arbitrary column-oriented expression. :param text: the text of the expression; can be any SQL expression. Quoting rules will not be applied. To specify a column-name expression which should be subject to quoting rules, use the :func:`column` function. :param type\_: an optional :class:`~sqlalchemy.types.TypeEngine` object which will provide result-set translation and additional expression semantics for this column. If left as ``None`` the type will be :class:`.NullType`. .. seealso:: :func:`_expression.column` :func:`_expression.text` :ref:`tutorial_select_arbitrary_text` T)rp� is_literal�� ColumnClause)r�rps rz�literal_columnr��s��F ��E�d� ;� ;� ;�;r}c��eZdZdZdZdZdZdZej d��ej d�� ddd�����Z dd�Z dd�Z dS)�CompilerElementznbase class for SQL elements that can be compiled to produce a SQL string. .. versionadded:: 2.0 rx�compiler_elementF�defaultzsqlalchemy.engine.defaultzsqlalchemy.engine.urlN�bind�Optional[_HasDialect]�dialect�Optional[Dialect]�kwrrtrMc �,�|��|r|j}n{|jdkr&tjj}|���}nJtjj}|j�|j��� ����}|j |fi|��S)a�Compile this SQL expression. The return value is a :class:`~.Compiled` object. Calling ``str()`` or ``unicode()`` on the returned value will yield a string representation of the result. The :class:`~.Compiled` object also can return a dictionary of bind parameter names and values using the ``params`` accessor. :param bind: An :class:`.Connection` or :class:`.Engine` which can provide a :class:`.Dialect` in order to generate a :class:`.Compiled` object. If the ``bind`` and ``dialect`` parameters are both omitted, a default SQL compiler is used. :param column_keys: Used for INSERT and UPDATE statements, a list of column names which should be present in the VALUES clause of the compiled statement. If ``None``, all columns from the target table object are rendered. :param dialect: A :class:`.Dialect` instance which can generate a :class:`.Compiled` object. This argument takes precedence over the ``bind`` argument. :param compile_kwargs: optional dictionary of additional parameters that will be passed through to the compiler within all "visit" methods. This allows any custom flag to be passed through to a custom compilation construct, for example. It is also used for the case of passing the ``literal_binds`` flag through:: from sqlalchemy.sql import table, column, select t = table("t", column("x")) s = select(t).where(t.c.x == 5) print(s.compile(compile_kwargs={"literal_binds": True})) .. seealso:: :ref:`faq_sql_expression_string` Nr�) r��stringify_dialectr=� preloaded�engine_default�StrCompileDialect� engine_url�URL�create� get_dialect� _compiler)�selfr�r�r�r��urls rz�compilezCompilerElement.compile�s���h �?�� "��,����'�9�4�4��.�7��!�3�3�5�5����n�/�� �#�'�.�.��*����+�-�-�"�"���t�~�g�,�,��,�,�,r}r_c �\�trt|t��sJ�|j||fi|��S)zNReturn a compiler appropriate for this ClauseElement, given a Dialect.)r� isinstance� ClauseElement�statement_compiler�r�r�r�s rzr�zCompilerElement._compiler7s?�� � 3��d�M�2�2� 2� 2�2�)�w�)�'�4�>�>�2�>�>�>r}r�c�D�t|�����Srw)r�r��r�s rz�__str__zCompilerElement.__str__?s���4�<�<�>�>�"�"�"r}�NN)r�r�r�r�r�rrtrM)r�r_r�rrtrM�rtr�) �__name__� __module__� __qualname__�__doc__� __slots__�__visit_name__�supports_executionr�r=�preload_moduler�r�r�rxr}rzr�r��s����������I�'�N���!���T��4�5�5��T��0�1�1�'+�%)�>-�>-�>-�>-�2�1�6�5�>-�@?�?�?�?�#�#�#�#�#�#r}r�c�2�eZdZUdZdZerejdUd���Znej Zej dVd���Z dZ d e d <d Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d Z"e#dWd���Z$dZ%de d<de d<e&jrdd�dXd�Z'ej(dYd���Z)dZd �Z*d[d!�Z+d"�Z,d#�Z-e#d$���Z.e/j0d%���Z1d&�Z2e#d'���Z3d(�Z4d\d0�Z5d]d1�Z6d^d3�Z7 d_d`d7�Z8 d_dad9�Z9dbd>�Z:dcd@�Z; d_dddC�Z<dedD�Z=d ddE�dfdP�Z>dQ�Z?dedR�Z@dS�ZAdT�ZBdS)gr�zSBase class for elements of a programmatically constructed SQL expression. �clausertrHc��dS)z�like annotations, however these propagate outwards liberally as SQL constructs are built, and are set up at construction time. Nrxr�s rz�_propagate_attrszClauseElement._propagate_attrsTs �� �Cr}� Optional[str]c��dSrwrxr�s rz� descriptionzClauseElement.description_����tr}NzOptional[Self]� _is_clone_ofTF�Optional[Label[Any]]c��dSrwrxr�s rz�_order_by_label_elementz%ClauseElement._order_by_label_element{r�r}rK�_cache_key_traversal�ColumnElement[bool]�negation_clause.)� omit_attrsr��typing_Tuple[str, ...]r�r�Iterable[ClauseElement]c ��dSrwrx)r�r�r�s rz� get_childrenzClauseElement.get_children�s��&)�cr}�List[FromClause]c��gSrwrxr�s rz� _from_objectszClauseElement._from_objects����� r}�values�Mapping[str, Any]rBc�8�tj|��|_|Srw)r=� immutabledictr�)r�r�s rz�_set_propagate_attrsz"ClauseElement._set_propagate_attrs�s��!%� 2�6� :� :���� r}c �2��|j�|j�|j��}�r=�fd�|j������D��|_n|j���|_|j}|�|n||_|S)z�Create a shallow copy of this ClauseElement. This method may be used by a generative API. Its also used as part of the "deep" copy afforded by a traversal that combines the _copy_internals() method. c�$��i|] \}}|�v� ||�� Srxrx)�.0�k�v�skips �rz� <dictcomp>z(ClauseElement._clone.<locals>.<dictcomp>�s+��������A��$����1���r})�_memoized_keys� __class__�__new__�__dict__�copy�itemsr�)r�r��c�ccr�s @rzr&zClauseElement._clone�s�����"�� �N� "� "�4�>� 2� 2�� � .�����!%��!3�!3�!5�!5�!;�!;�!=�!=����A�J�J���+�+�-�-�A�J�� ��!�~���4����r}c��|S)z�a hook to allow the right side of a binary expression to respond to a negation of the binary expression. Used for the special case of expanding bind parameter with IN. rx)r�� negated_op� original_ops rz�_negate_in_binaryzClauseElement._negate_in_binary�� ��� r}c��|S)z�in the context of binary expression, convert the type of this object to the one given. applies only to :class:`_expression.ColumnElement` classes. rx�r�rps rz�_with_binary_element_typez'ClauseElement._with_binary_element_type�r�r}c��|jS)a.return the 'constructor' for this ClauseElement. This is for the purposes for creating a new object of this type. Usually, its just the element's __class__. However, the "Annotated" version of the object overrides to return the class of its proxied element. �r�r�s rz� _constructorzClauseElement._constructor�s ���~�r}c�p�tj��}|}|�|�|��|j}|�|S)aReturn the set consisting all cloned ancestors of this ClauseElement. Includes this ClauseElement. This accessor tends to be used for FromClause objects to identify 'equivalent' FROM clauses, regardless of transformative operations. )r=� column_set�addr�)r��s�fs rz� _cloned_setzClauseElement._cloned_set�sA�� �O� � ��%)���m� �E�E�!�H�H�H���A��m��r}c�0�|j�|j}|j�|Srw)r�r�s rz� _de_clonezClauseElement._de_clone�s#����+��$�D���+�� r}c� �td���)NzFThis SQL expression has no entity namespace with which to filter from.)�AttributeErrorr�s rz�entity_namespacezClauseElement.entity_namespace�s��� )� � � r}c��|j���}|�dd��|�dd��|S)Nr��_generate_cache_key)r�r��pop)r��ds rz� __getstate__zClauseElement.__getstate__�sC�� �M� � � � �� ���n�d�#�#�#� ���#�T�*�*�*��r}� connectionr^�distilled_paramsr`�execution_optionsrc� Result[Any]c��|jr5trt|t��sJ�|�|||��St j|���rw)r�rr�r*�_execute_clauseelementr;�ObjectNotExecutableError�r�r�r�rs rz�_execute_on_connectionz$ClauseElement._execute_on_connection�sa�� � "� 5�� 4�!�$� �3�3�3�3�3��4�4��&�(9��� ��.�t�4�4� 4r}c�T�|�|||�����S)z�an additional hook for subclasses to provide a different implementation for connection.scalar() vs. connection.execute(). .. versionadded:: 2.0 )r�scalarrs rz�_execute_on_scalarz ClauseElement._execute_on_scalar s.���*�*� �(�*;� � � �&�(�(� r}�Sequence[BindParameter[Any]]c�t�|���}|�g}t|id|ji��|S|jS)a�Return the list of :class:`.BindParameter` objects embedded in the object. This accomplishes the same purpose as ``visitors.traverse()`` or similar would provide, however by making use of the cache key it takes advantage of memoization of the key to result in fewer net method calls, assuming the statement is also going to be executed. N� bindparam)r�r8�append� bindparams)r��keyrs rz�_get_embedded_bindparamsz&ClauseElement._get_embedded_bindparamssI���&�&�(�(�� �;�35�J� �T�2� �Z�->�?� @� @� @�� ��>� !r}�_ClauseElement__optionaldict�Optional[Dict[str, Any]]�kwargsc �0�|�d||��S)aReturn a copy with :func:`_expression.bindparam` elements replaced. Same functionality as :meth:`_expression.ClauseElement.params`, except adds `unique=True` to affected bind parameters so that multiple statements can be used. T��_replace_params�r�rrs rz� unique_paramszClauseElement.unique_params0s���#�#�D�.�&�A�A�Ar}�Optional[Mapping[str, Any]]c �0�|�d||��S)a�Return a copy with :func:`_expression.bindparam` elements replaced. Returns a copy of this ClauseElement with :func:`_expression.bindparam` elements replaced with values taken from the given dictionary:: >>> clause = column("x") + bindparam("foo") >>> print(clause.compile().params) {'foo':None} >>> print(clause.params({"foo": 7}).compile().params) {'foo':7} Frrs rz�paramszClauseElement.params@s��&�#�#�E�>�6�B�B�Br}�uniquers� optionaldict�Dict[str, Any]c�n���|r��|��d ��fd� }t|ddd�d|i��S) Nr�r�rtr~c�|��|j�vr�|j|_d|_�r|���dSdS�NF)rro�required�_convert_to_unique)r�rrs ��rz�visit_bindparamz6ClauseElement._replace_params.<locals>.visit_bindparam^sO����x�6�!�!�#�D�H�-�� � %�� �� *��'�'�)�)�)�)�)� *� *r}T)� maintain_key�detect_subquery_colsr )r�r�rtr~)�updater5)r�rrrr$s ` ` rzrzClauseElement._replace_paramsUsm���� � (� �M�M�,� '� '� '� *� *� *� *� *� *� *�� �!�4� @� @� �/� *� � � r}�otherc �(�tj||fi|��S)a�Compare this :class:`_expression.ClauseElement` to the given :class:`_expression.ClauseElement`. Subclasses should override the default behavior, which is a straight identity comparison. \**kw are arguments consumed by subclass ``compare()`` methods and may be used to modify the criteria for comparison (see :class:`_expression.ColumnElement`). )r�compare�r�r(r�s rzr*zClauseElement.compareks���!�$��4�4��4�4�4r}�against�Optional[OperatorType]c��|S)a�Apply a 'grouping' to this :class:`_expression.ClauseElement`. This method is overridden by subclasses to return a "grouping" construct, i.e. parenthesis. In particular it's used by "binary" expressions to provide a grouping around themselves when placed into a larger expression, as well as by :func:`_expression.select` constructs when placed into the FROM clause of another :func:`_expression.select`. (Note that subqueries should be normally created using the :meth:`_expression.Select.alias` method, as many platforms require nested SELECT statements to be named). As expressions are composed together, the application of :meth:`self_group` is automatic - end-user code should never need to use this method directly. Note that SQLAlchemy's clause constructs take operator precedence into account - so parenthesis might not be needed, for example, in an expression like ``x OR (y AND z)`` - AND takes precedence over OR. The base :meth:`self_group` method of :class:`_expression.ClauseElement` just returns self. rx�r�r,s rz� self_groupzClauseElement.self_groupys ��6� r}c��|S)zVReturn this :class:`_expression.ClauseElement` without any groupings. rxr�s rz�_ungroupzClauseElement._ungroup�s �� � r})�for_executemany�schema_translate_mapr�r_�compiled_cache�Optional[CompiledCacheType]� column_keys� List[str]r3r4� Optional[SchemaTranslateMapType]�Jtyping_Tuple[Compiled, Optional[Sequence[BindParameter[Any]]], CacheStats]c ��|�|jr|���}nd}|�ptr|�J�|\}} ||t|��t |��|f} |�| ��} | � |j} |j|f||||d�|��} | || <n=|j} n5d} |j|f||||d�|��} |js|j } n|�|j } n|j } | | | fS)N)� cache_keyr7r3r4) �_supports_statement_cacher�r�tuplers�get� CACHE_MISSr�� CACHE_HIT�NO_DIALECT_SUPPORT�CACHING_DISABLED� NO_CACHE_KEY) r�r�r5r7r3r4r��elem_cache_keyr<�extracted_paramsr� compiled_sql� cache_hits rz�_compile_w_cachezClauseElement._compile_w_cache�sa�� � %�'�*K� %�!�5�5�7�7�N�N�!�N� � %�� 2�%�1�1�1�*8� '�I�'����k�"�"��)�*�*�� �C�*�-�-�c�2�2�L��#�#�.� �-�t�~�� �,� +�$3�)=�  � � �  � � �'3��s�#�#�#�-� � �#� �)�4�>���(�'� /�%9� �� � ��L��4� 1�#�6� � ��'�#�4� � �#�0� ��-�y�8�8r}c�X�t|d��r|jS|���S)Nr�)�hasattrr��_negater�s rz� __invert__zClauseElement.__invert__�s.�� �4�*� +� +� "��'� '��<�<�>�>� !r}c��|�tj���}t|t��sJ�t |tj���S)N�r,)�operator�r0r�invr�� ColumnElement�UnaryExpression�r��groupeds rzrLzClauseElement._negate�sB���/�/�)�-�/�8�8���'�=�1�1�1�1�1��w���?�?�?�?r}c� �td���)N�+Boolean value of this clause is not defined)� TypeErrorr�s rz�__bool__zClauseElement.__bool__�s���E�F�F�Fr}c��|j}|�t�|��Sd|j|jjt |��|fzS)Nz<%s.%s at 0x%x; %s>)r��object�__repr__r�r�r��id)r��friendlys rzr]zClauseElement.__repr__�sM���#�� � ��?�?�4�(�(� (�(�����'��4���� ,�� r}�rtrH�rtr��rtr�)r�r�r�rrtr��rtr�)r�r�rtrB)r�rrtrB)r�r^r�r`rrcrtr)r�r^r�r`rrcrtr)rtr rw)rrrrrtrB)rrrrrtrB)rrsrrrrrtrB)r(r�r�rrtrs)r,r-rtr�)rtr�)r�r_r5r6r7r8r3rsr4r9r�rrtr:)Cr�r�r�r�r�rr=�memoized_propertyr�� EMPTY_DICT�ro_memoized_propertyr�r��__annotations__�is_clause_element� is_selectable�is_dml�_is_column_element�_is_keyed_column_element� _is_table�!_gen_static_annotations_cache_key� _is_textual�_is_from_clause�_is_returns_rows�_is_text_clause�_is_from_container�_is_select_container�_is_select_base�_is_select_statement�_is_bind_parameter�_is_clause_list�_is_lambda_element�_is_singleton_constant� _is_immutable�_is_star�propertyr�r��typingr��ro_non_memoized_propertyr�r�r&r�r�r�r,�memoized_attributer�r�r�r�rr rrrrr*r0r2rIrMrLrZr]rxr}rzr�r�Cs���������� �N�� +� � � � � � � � � � �?�� ��������$(�L�'�'�'�'����M� �F���$���I�(-�%��K��O����O��� ���O� �����O���"���M��H� �����X��48��7�7�7�7�(�(�(�(� ��*�;>� *� *� *� *� *� *� �"����#�"����������:������� � ��X� ��#���$�#��,��� � � ��X� � ��� 5� 5� 5� 5����� "�"�"�"�048�B�B�B�B�B�$7;�C�C�C�C�C�* � � � �, 5� 5� 5� 5�15������:����!&�AE�@9�@9�@9�@9�@9�@9�D"�"�"�@�@�@�@� G�G�G� � � � � r}r�c�:�eZdZdZejr dd�Z ddd �Zd Sd S)�DQLDMLClauseElementz|represents a :class:`.ClauseElement` that compiles to a DQL or DML expression, not DDL. .. versionadded:: 2.0 r�r_r�rrtrNc ��dS)zRReturn a compiler appropriate for this ClauseElement, given a Dialect.Nrxr�s rzr�zDQLDMLClauseElement._compilers �� �Cr}Nr�r�r�c ��dSrwrx)r�r�r�r�s rzr�zDQLDMLClauseElement.compile s �� �#r})r�r_r�rrtrNr�)r�r�r�r�r�rrtrN)r�r�r�r�r~rr�r�rxr}rzr�r��sj���������� � � � � �+/�)-� � � � � � � � � r}r�c�(�eZdZdZdZejZdZdS)�CompilerColumnElementzdA compiler-only column element used for ad-hoc string compilations. .. versionadded:: 2.0 rxFN) r�r�r�r�r�r=rer��_is_collection_aggregaterxr}rzr�r�s/������ �� �I����$���r}r�c��eZdZdZej�r�ejd�d���Zd�d �Z d�d �Z e d�dd�d�d���Z e d�d�d���Z d�d�d!�Z d�d�d#�Z d�d%�Zd�d&�Zd�d(�Zd�d*�Zd�d+�Zd�d,�Zd�d-�Zd�d.�Zd�d/�Zd�d0�Zd�d1�Zd�d2�Zd�d4�Zd�d5�Zd�d7�Ze d�d;���Ze d�d<���Zd�d=�Ze d�d>���Ze d�d?���Zd�d@�Ze d�dC���Ze d�dD���Zd�dE�Z d�d�dI�Z d�d�dJ�Z!d�dL�Z"d�dM�Z#d�dN�Z$d�dO�Z%d�dP�Z&d�dQ�Z'd�dS�Z(d�dT�Z)d�dU�Z* d�d�dV�Z+ d�d�dW�Z, d�d�dX�Z- d�d�dY�Z.d�dZ�Z/d�d[�Z0d�d\�Z1 d�d�d^�Z2 d�d�d_�Z3 d�d�d`�Z4 d�d�da�Z5d�dc�Z6d�dd�Z7d�de�Z8 d�d�dh�Z9 d�d�dj�Z:d�dk�Z;d�dl�Z<d�dm�Z=d�dn�Z>d�do�Z?d�dp�Z@d�ds�ZA d�d�dw�ZBd�dy�ZCd�d{�ZDd�d|�ZEe d�d���ZFe d�d����ZFe d�d����ZFd�d��ZFe d�d����ZGe d�d����ZGd�d��ZGe d�d����ZHe d�d����ZHd�d��ZHe d�d����ZIe d�d����ZId�d��ZIe d�d����ZJe d�d����ZJd�d��ZJe d�d����ZKe d�d����ZKd�d��ZKe d�d����ZLe d�d����ZLd�d��ZLe d�d����ZMe d�d����ZMd�d��ZMe d�d����ZNe d�d����ZNe d�d����ZNd�d��ZNe d�d����ZOe d�d����ZOd�d��ZOe d�d����ZPe d�d����ZPd�d��ZPe d�d����ZQe d�d����ZQd�d��ZQdSdS)��SQLCoreOperationsrxrtrHc��dSrwrxr�s rzr�z"SQLCoreOperations._propagate_attrs0s��;>�3r}�oprPr(rr�ColumnElement[Any]c��dSrwrx�r�r�r(rs rz�operatezSQLCoreOperations.operate3���!$�r}c ��dSrwrxr�s rz�reverse_operatez!SQLCoreOperations.reverse_operate7r�r}.N)� python_impl�opstringr�� precedence�int� is_comparisonrs� return_type�_TypeEngineArgument[_OPT]r��Optional[Callable[..., Any]]�'Callable[[Any], BinaryExpression[_OPT]]c��dSrwrx�r�r�r�r�r�r�s rzr�zSQLCoreOperations.op;s ��7:�cr}r��&Callable[[Any], BinaryExpression[Any]]c��dSrwrxr�s rzr�zSQLCoreOperations.opFs ��69�Sr}rFc��dSrwrxr�s rzr�zSQLCoreOperations.opPs ��69�Sr}�'Callable[[Any], BinaryExpression[bool]]c��dSrwrx)r�r�r�r�s rz�bool_opzSQLCoreOperations.bool_opYs �� 7:�cr}�BooleanClauseListc��dSrwrx�r�r(s rz�__and__zSQLCoreOperations.__and__`����r}c��dSrwrxr�s rz�__or__zSQLCoreOperations.__or__br�r}�ColumnElement[_T_co]c��dSrwrxr�s rzrMzSQLCoreOperations.__invert__dr�r}r�c��dSrwrxr�s rz�__lt__zSQLCoreOperations.__lt__fr�r}c��dSrwrxr�s rz�__le__zSQLCoreOperations.__le__hr�r}c��dSrwrxr�s rz�__hash__zSQLCoreOperations.__hash__nr�r}c��dSrwrxr�s rz�__eq__zSQLCoreOperations.__eq__p��� �Cr}c��dSrwrxr�s rz�__ne__zSQLCoreOperations.__ne__sr�r}c��dSrwrxr�s rz�is_distinct_fromz"SQLCoreOperations.is_distinct_fromvr�r}c��dSrwrxr�s rz�is_not_distinct_fromz&SQLCoreOperations.is_not_distinct_fromxr�r}c��dSrwrxr�s rz�__gt__zSQLCoreOperations.__gt__zr�r}c��dSrwrxr�s rz�__ge__zSQLCoreOperations.__ge__|r�r}�UnaryExpression[_T_co]c��dSrwrxr�s rz�__neg__zSQLCoreOperations.__neg__~r�r}c��dSrwrxr�s rz� __contains__zSQLCoreOperations.__contains__�r�r}�indexc��dSrwrx)r�r�s rz� __getitem__zSQLCoreOperations.__getitem__�r�r}r�� _SQO[int]�ColumnElement[int]c��dSrwrxr�s rz� __lshift__zSQLCoreOperations.__lshift__����KN�3r}c��dSrwrxr�s rzr�zSQLCoreOperations.__lshift__����@C�r}c��dSrwrxr�s rzr�zSQLCoreOperations.__lshift__�r�r}c��dSrwrxr�s rz� __rshift__zSQLCoreOperations.__rshift__�r�r}c��dSrwrxr�s rzr�zSQLCoreOperations.__rshift__�r�r}c��dSrwrxr�s rzr�zSQLCoreOperations.__rshift__�r�r}� _SQO[str]�ColumnElement[str]c��dSrwrxr�s rz�concatzSQLCoreOperations.concat�s��GJ�sr}c��dSrwrxr�s rzr�zSQLCoreOperations.concat�s��<?�Cr}c��dSrwrxr�s rzr�zSQLCoreOperations.concat�r�r}�escaper��BinaryExpression[bool]c��dSrwrx�r�r(r�s rz�likezSQLCoreOperations.like����%(�Sr}c��dSrwrxr�s rz�ilikezSQLCoreOperations.ilike�r�r}�BinaryExpression[Any]c��dSrwrxr�s rz� bitwise_xorzSQLCoreOperations.bitwise_xor�r�r}c��dSrwrxr�s rz� bitwise_orzSQLCoreOperations.bitwise_or�r�r}c��dSrwrxr�s rz� bitwise_andzSQLCoreOperations.bitwise_and�r�r}c��dSrwrxr�s rz� bitwise_notzSQLCoreOperations.bitwise_not�r�r}c��dSrwrxr�s rz�bitwise_lshiftz SQLCoreOperations.bitwise_lshift�r�r}c��dSrwrxr�s rz�bitwise_rshiftz SQLCoreOperations.bitwise_rshift�r�r}�=Union[Iterable[Any], BindParameter[Any], roles.InElementRole]c��dSrwrxr�s rz�in_zSQLCoreOperations.in_�� �� &)�Sr}c��dSrwrxr�s rz�not_inzSQLCoreOperations.not_in�r�r}c��dSrwrxr�s rz�notin_zSQLCoreOperations.notin_�r�r}c��dSrwrxr�s rz�not_likezSQLCoreOperations.not_like�r�r}c��dSrwrxr�s rz�notlikezSQLCoreOperations.notlike�r�r}c��dSrwrxr�s rz� not_ilikezSQLCoreOperations.not_ilike�r�r}c��dSrwrxr�s rz�notilikezSQLCoreOperations.notilike�r�r}c��dSrwrxr�s rz�is_zSQLCoreOperations.is_�r�r}c��dSrwrxr�s rz�is_notzSQLCoreOperations.is_not�r�r}c��dSrwrxr�s rz�isnotzSQLCoreOperations.isnot�r�r}� autoescapec��dSrwrx�r�r(r�rs rz� startswithzSQLCoreOperations.startswith�� �� #&�#r}c��dSrwrxrs rz� istartswithzSQLCoreOperations.istartswith�r r}c��dSrwrxrs rz�endswithzSQLCoreOperations.endswith�r r}c��dSrwrxrs rz� iendswithzSQLCoreOperations.iendswith�r r}r�c ��dSrwrxr+s rz�containszSQLCoreOperations.contains�r�r}c ��dSrwrxr+s rz� icontainszSQLCoreOperations.icontains�r�r}c ��dSrwrx)r�r(rs rz�matchzSQLCoreOperations.match�r�r}�pattern�flagsc��dSrwrx)r�rrs rz� regexp_matchzSQLCoreOperations.regexp_match�s��"%�#r}� replacementc��dSrwrx)r�rrrs rz�regexp_replacez SQLCoreOperations.regexp_replacer�r}c��dSrwrxr�s rz�desczSQLCoreOperations.descr�r}c��dSrwrxr�s rz�asczSQLCoreOperations.ascr�r}c��dSrwrxr�s rz� nulls_firstzSQLCoreOperations.nulls_first r�r}c��dSrwrxr�s rz� nullsfirstzSQLCoreOperations.nullsfirst r�r}c��dSrwrxr�s rz� nulls_lastzSQLCoreOperations.nulls_last r�r}c��dSrwrxr�s rz� nullslastzSQLCoreOperations.nullslastr�r}� collation�CollationClausec��dSrwrx�r�r)s rz�collatezSQLCoreOperations.collater�r}�cleft�cright� symmetricc��dSrwrx)r�r.r/r0s rz�betweenzSQLCoreOperations.betweenr�r}� _SQO[_T_co]c��dSrwrxr�s rz�distinctzSQLCoreOperations.distinctr�r}�CollectionAggregate[Any]c��dSrwrxr�s rz�any_zSQLCoreOperations.any_r�r}c��dSrwrxr�s rz�all_zSQLCoreOperations.all_r�r}� _SQO[_NMT]�ColumnElement[_NMT]c��dSrwrxr�s rz�__add__zSQLCoreOperations.__add__"� ��#&�#r}c��dSrwrxr�s rzr>zSQLCoreOperations.__add__(s ��"%�r}c��dSrwrxr�s rzr>zSQLCoreOperations.__add__.���=@�Sr}c��dSrwrxr�s rzr>zSQLCoreOperations.__add__1r�r}c��dSrwrxr�s rz�__radd__zSQLCoreOperations.__radd__3r�r}c��dSrwrxr�s rzrEzSQLCoreOperations.__radd__6s��IL�r}c��dSrwrxr�s rzrEzSQLCoreOperations.__radd__9r�r}c��dSrwrxr�s rz�__sub__zSQLCoreOperations.__sub__;r?r}c��dSrwrxr�s rzrIzSQLCoreOperations.__sub__ArBr}c��dSrwrxr�s rzrIzSQLCoreOperations.__sub__Dr�r}c��dSrwrxr�s rz�__rsub__zSQLCoreOperations.__rsub__Fr?r}c��dSrwrxr�s rzrMzSQLCoreOperations.__rsub__L���>A�cr}c��dSrwrxr�s rzrMzSQLCoreOperations.__rsub__Or�r}c��dSrwrxr�s rz�__mul__zSQLCoreOperations.__mul__Qr?r}c��dSrwrxr�s rzrRzSQLCoreOperations.__mul__WrBr}c��dSrwrxr�s rzrRzSQLCoreOperations.__mul__Zr�r}c��dSrwrxr�s rz�__rmul__zSQLCoreOperations.__rmul__\r?r}c��dSrwrxr�s rzrVzSQLCoreOperations.__rmul__brOr}c��dSrwrxr�s rzrVzSQLCoreOperations.__rmul__er�r}c��dSrwrxr�s rz�__mod__zSQLCoreOperations.__mod__gs��JM�#r}c��dSrwrxr�s rzrZzSQLCoreOperations.__mod__jrBr}c��dSrwrxr�s rzrZzSQLCoreOperations.__mod__mr�r}c��dSrwrxr�s rz�__rmod__zSQLCoreOperations.__rmod__or�r}c��dSrwrxr�s rzr^zSQLCoreOperations.__rmod__rrOr}c��dSrwrxr�s rzr^zSQLCoreOperations.__rmod__ur�r}�ColumnElement[_NUMERIC]c��dSrwrxr�s rz� __truediv__zSQLCoreOperations.__truediv__w� ��'*�cr}� _SQO[_NT]�ColumnElement[_NT]c��dSrwrxr�s rzrczSQLCoreOperations.__truediv__|s��LO�Cr}c��dSrwrxr�s rzrczSQLCoreOperations.__truediv__s��AD�r}c��dSrwrxr�s rzrczSQLCoreOperations.__truediv__�r�r}c��dSrwrxr�s rz� __rtruediv__zSQLCoreOperations.__rtruediv__�rdr}c��dSrwrxr�s rzrkzSQLCoreOperations.__rtruediv__����BE�#r}c��dSrwrxr�s rzrkzSQLCoreOperations.__rtruediv__�r�r}c��dSrwrxr�s rz� __floordiv__zSQLCoreOperations.__floordiv__�� ��#&�#r}c��dSrwrxr�s rzrpzSQLCoreOperations.__floordiv__�rmr}c��dSrwrxr�s rzrpzSQLCoreOperations.__floordiv__�r�r}c��dSrwrxr�s rz� __rfloordiv__zSQLCoreOperations.__rfloordiv__�rqr}c��dSrwrxr�s rzruzSQLCoreOperations.__rfloordiv__����CF�3r}c��dSrwrxr�s rzruzSQLCoreOperations.__rfloordiv__�r�r}r`)r�rPr(rrrrtr�)..) r�r�r�r�r�rsr�r�r�r�rtr�)....) r�r�r�r�r�rsr�r�r�r�rtr�)rFNN)rN)r�r�r�r�r�r�rtr�)r(rrtr�)rtr�)r(rrtr��rtr�)rtr�)r�rrtr�)r�r�r(rrtr�)r(rrtr�)r�r�r(rrtr�rw)r(rr�r�rtr�)r(rrtr�)r(r�rtr�)r(rrtr�r!)r(rr�r�rrsrtr�)r(rr�rrtr�)r(rrrrtr�)rrrr�rtr�)rrrrrr�rtr�)r)r�rtr*�F)r.rr/rr0rsrtr�)r�r3rtr�)rtr6)r�r;r(rrtr<)r�r�r(rrtra)r�rer(rrtrf)r�r;r(rrtra)Rr�r�r�r�r~rr=�non_memoized_propertyr�r�r�rr�r�r�r�rMr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr r rrrrrrrr r"r$r&r(r-r2r5r8r:r>rErIrMrRrVrZr^rcrkrprurxr}rzr�r�(s��������I� ��rG� � #�>�>�>� $� #�>� %� %� %� %� %� %� %� %� �"�"%�  :�9=� :� :� :� :� :� �� :� �"�"%�>A�8;�  9� 9� 9� 9� �� 9� �"'�>B�8<�  9� 9� 9� 9� 9� �8<�  :� :� :� :� :� @�?�?�?�>�>�>�>�9�9�9�9�@�@�@�@�@�@�@�@� '�&�&�&� � � � � � � � � K�J�J�J�N�N�N�N�@�@�@�@�@�@�@�@�8�8�8�8�F�F�F�F�D�D�D�D� �N�N�N� ��N� �C�C�C� ��C�C�C�C�C� �N�N�N� ��N� �C�C�C� ��C�C�C�C�C� �J�J�J� ��J� �?�?�?� ��?�?�?�?�?�7;� )� )� )� )� )� 7;� )� )� )� )� )� H�G�G�G�F�F�F�F�G�G�G�G�<�<�<�<�J�J�J�J�J�J�J�J� )� )� )� )� )� )� )� )� )� )� )� )�7;� )� )� )� )� )� 7;� )� )� )� )� )� 7;� )� )� )� )� )� 7;� )� )� )� )� )� A�@�@�@�C�C�C�C�B�B�B�B� %)�$�  &� &� &� &� &�%)�$�  &� &� &� &� &�%)�$�  &� &� &� &� &�%)�$�  &� &� &� &� &� N�M�M�M�N�N�N�N�N�N�N�N�8<� &� &� &� &� &� JN� %� %� %� %� %� 6�5�5�5�4�4�4�4�<�<�<�<�;�;�;�;�;�;�;�;�:�:�:�:�A�A�A�A�>C� )� )� )� )� )� G�F�F�F�7�7�7�7�7�7�7�7� � &� &� &� �� &� � %� %� %� �� %� �@�@�@� ��@�@�@�@�@� �N�N�N� ��N� �L�L�L� ��L�A�A�A�A� � &� &� &� �� &� �@�@�@� ��@�@�@�@�@� � &� &� &� �� &� �A�A�A� ��A�A�A�A�A� � &� &� &� �� &� �@�@�@� ��@�@�@�@�@� � &� &� &� �� &� �A�A�A� ��A�A�A�A�A� �M�M�M� ��M� �@�@�@� ��@�@�@�@�@� �N�N�N� ��N� �A�A�A� ��A�A�A�A�A� � *� *� *� �� *� �O�O�O� ��O� �D�D�D� ��D�D�D�D�D� � *� *� *� �� *� �E�E�E� ��E�E�E�E�E� � &� &� &� �� &� �E�E�E� ��E�E�E�E�E� � &� &� &� �� &� �F�F�F� ��F�F�F�F�F�F�F�e rG�rGr}r�c��eZdZdZdZdS)�SQLColumnExpressiona�A type that may be used to indicate any SQL column element or object that acts in place of one. :class:`.SQLColumnExpression` is a base of :class:`.ColumnElement`, as well as within the bases of ORM elements such as :class:`.InstrumentedAttribute`, and may be used in :pep:`484` typing to indicate arguments or return values that should behave as column expressions. .. versionadded:: 2.0.0b4 rxN�r�r�r�r�r�rxr}rzr}r}�s������ � ��I�I�Ir}r}c��eZdZUdZdZdZded<ded<dZdZded <dZ dZ e ��Z d ed <e jdmd���Ze jdnd���ZdZded< ejdnd���Zednd���Zednd���Zednd���ZdZ dZ dZdZded<edodpd���Ze dodqd ���Z dodqd!�Zedrd$���Z edsd%���Z dtd&�Z d'ed(<e!se jdud)���Z"ejdvd+���Z#d,�Z$dwd/�Z%dxd4�Z&dxd5�Z' dydzd<�Z(edtd=���Z)ed{d?���Z*e jd|dA���Z+e jd|dB���Z,e jd|dC���Z-dmdD�Z.d}dF�Z/d~dG�Z0ejdndH���Z1ejdndI���Z2dddddJ�ddU�Z3d�dX�Z4d�dZ�Z5 dod�d_�Z6e jd�d`���Z7e jd�da���Z8ee j9dbdc��d�dd�����Z:ee j9dbde��d�df�����Z;d�di�Z<e jd�dj���Z=e jd�dk���Z>d�dl�Z?dS)�rSaRepresent a column-oriented SQL expression suitable for usage in the "columns" clause, WHERE clause etc. of a statement. While the most familiar kind of :class:`_expression.ColumnElement` is the :class:`_schema.Column` object, :class:`_expression.ColumnElement` serves as the basis for any unit that may be present in a SQL expression, including the expressions themselves, SQL functions, bound parameters, literal expressions, keywords such as ``NULL``, etc. :class:`_expression.ColumnElement` is the ultimate base class for all such elements. A wide variety of SQLAlchemy Core functions work at the SQL expression level, and are intended to accept instances of :class:`_expression.ColumnElement` as arguments. These functions will typically document that they accept a "SQL expression" as an argument. What this means in terms of SQLAlchemy usually refers to an input which is either already in the form of a :class:`_expression.ColumnElement` object, or a value which can be **coerced** into one. The coercion rules followed by most, but not all, SQLAlchemy Core functions with regards to SQL expressions are as follows: * a literal Python value, such as a string, integer or floating point value, boolean, datetime, ``Decimal`` object, or virtually any other Python object, will be coerced into a "literal bound value". This generally means that a :func:`.bindparam` will be produced featuring the given value embedded into the construct; the resulting :class:`.BindParameter` object is an instance of :class:`_expression.ColumnElement`. The Python value will ultimately be sent to the DBAPI at execution time as a parameterized argument to the ``execute()`` or ``executemany()`` methods, after SQLAlchemy type-specific converters (e.g. those provided by any associated :class:`.TypeEngine` objects) are applied to the value. * any special object value, typically ORM-level constructs, which feature an accessor called ``__clause_element__()``. The Core expression system looks for this method when an object of otherwise unknown type is passed to a function that is looking to coerce the argument into a :class:`_expression.ColumnElement` and sometimes a :class:`_expression.SelectBase` expression. It is used within the ORM to convert from ORM-specific objects like mapped classes and mapped attributes into Core expression objects. * The Python ``None`` value is typically interpreted as ``NULL``, which in SQLAlchemy Core produces an instance of :func:`.null`. A :class:`_expression.ColumnElement` provides the ability to generate new :class:`_expression.ColumnElement` objects using Python expressions. This means that Python operators such as ``==``, ``!=`` and ``<`` are overloaded to mimic SQL operations, and allow the instantiation of further :class:`_expression.ColumnElement` instances which are composed from other, more fundamental :class:`_expression.ColumnElement` objects. For example, two :class:`.ColumnClause` objects can be added together with the addition operator ``+`` to produce a :class:`.BinaryExpression`. Both :class:`.ColumnClause` and :class:`.BinaryExpression` are subclasses of :class:`_expression.ColumnElement`: .. sourcecode:: pycon+sql >>> from sqlalchemy.sql import column >>> column("a") + column("b") <sqlalchemy.sql.expression.BinaryExpression object at 0x101029dd0> >>> print(column("a") + column("b")) {printsql}a + b .. seealso:: :class:`_schema.Column` :func:`_expression.column` �column_elementFrs� primary_key�Optional[ColumnElement[_T]]r�T�_insert_sentinelzAbstractSet[ForeignKey]� foreign_keysrt�List[ColumnElement[Any]]c��gSrwrxr�s rz�_proxieszColumnElement._proxies"r�r}r�c��dS)a}The named label that can be used to target this column in a result set in a "table qualified" context. This label is almost always the label used when rendering <expr> AS <label> in a SELECT statement when using the LABEL_STYLE_TABLENAME_PLUS_COL label style, which is what the legacy ORM ``Query`` object uses as well. For a regular Column bound to a Table, this is typically the label <tablename>_<columnname>. For other constructs, different rules may apply, such as anonymized labels and others. .. versionchanged:: 1.4.21 renamed from ``._label`` Nrxr�s rz� _tq_labelzColumnElement._tq_label&s ��"�tr}Nrc��|jS)alA label-based version of 'key' that in some circumstances refers to this object in a Python namespace. _tq_key_label comes into play when a select() statement is constructed with apply_labels(); in this case, all Column objects in the ``.c`` collection are rendered as <tablename>_<columnname> in SQL; this is essentially the value of ._label. But to locate those columns in the ``.c`` collection, the name is along the lines of <tablename>_<key>; that's the typical value of .key_label. .. versionchanged:: 1.4.21 renamed from ``._key_label`` )� _proxy_keyr�s rz� _tq_key_labelzColumnElement._tq_key_labelCs �� ��r}c��|jS)z legacy; renamed to _tq_key_label)r�r�s rz� _key_labelzColumnElement._key_labelUs ���!�!r}c��|jS)zlegacy; renamed to _tq_label�r�r�s rz�_labelzColumnElement._labelZs ���~�r}c�$�t|dd��S)aVthe 'name' that naturally applies this element when rendered in SQL. Concretely, this is the "name" of a column or a label in a SELECT statement; ``<columnname>`` and ``<labelname>`` below: .. sourcecode:: sql SELECT <columnmame> FROM table SELECT column AS <labelname> FROM table Above, the two names noted will be what's present in the DBAPI ``cursor.description`` as the names. If this attribute returns ``None``, it means that the SQL element as written does not have a 100% fully predictable "name" that would appear in the ``cursor.description``. Examples include SQL functions, CAST functions, etc. While such things do return names in ``cursor.description``, they are only predictable on a database-specific basis; e.g. an expression like ``MAX(table.col)`` may appear as the string ``max`` on one database (like PostgreSQL) or may appear as the whole expression ``max(table.col)`` on SQLite. The default implementation looks for a ``.name`` attribute on the object, as has been the precedent established in SQLAlchemy for many years. An exception is made on the ``FunctionElement`` subclass so that the return value is always ``None``. .. versionadded:: 1.4.21 �nameN)�getattrr�s rz�_non_anon_labelzColumnElement._non_anon_label_s��H�t�V�T�*�*�*r}rxz Sequence[str]� _alt_namesr,r~�ColumnElement[_T]c��dSrwrxr/s rzr0zColumnElement.self_group�s��EH�Sr}r-r�c��dSrwrxr/s rzr0zColumnElement.self_group�s ��!�Sr}c�&�|tjtjtjfvrB|jjt jjur%t|tj tj ��S|tj tj fvrt|��S|Srw)r�and_�or_�_asbool�type�_type_affinityr� BOOLEANTYPE� AsBoolean�is_true�is_false�any_op�all_op�Groupingr/s rzr0zColumnElement.self_group�sr�� � �� � �y�7H�I� I� I�� �(�H�,@�,O�O�O��T�9�#4�i�6H�I�I� I� ��)�9�+;�<� <� <��D�>�>� !��Kr}r�r�c��dSrwrxr�s rzrLzColumnElement._negate�rwr}c��dSrwrxr�s rzrLzColumnElement._negate�s��?B�sr}c�,�|jjtjjur%t |t jt j��S|�t j ���}t|t��sJ�t|t j d���S�NrOT)rP�wraps_column_expression) r�r�rr�r�rr�r�r0rRr�rSrTrUs rzrLzColumnElement._negate�s{�� �9� #�x�';�'J� J� J��T�9�#5�y�7H�I�I� I��o�o�i�m�o�<�<�G��g�}�5�5� 5� 5�5�"��)�-����� r}�TypeEngine[_T]r�c��tjSrw�r�NULLTYPEr�s rzr�zColumnElement.type�s ���$� $r}�TypeEngine.Comparator[_T]c�� |jj}||��S#t$r}td|jz��|�d}~wwxYw)NzOObject %r associated with '.type' attribute is not a TypeEngine class or object)r��comparator_factoryr�rY)r�r��errs rz� comparatorzColumnElement.comparator�sm�� ,�!%��!=� �&�%�d�+�+� +�� � � � ��6�8<� �B���� ����� ���s� � A�;�Ac�:�|j�|��dSrw)r�r'�r��states rz� __setstate__zColumnElement.__setstate__�s�� � ���U�#�#�#�#�#r}r�rc ��� t|j|��S#t$rG}tdt|��j�dt|j��j�d|����|�d}~wwxYw)NzNeither z object nor z object has an attribute )r�r�r�r�r�)r�rr�s rz� __getattr__zColumnElement.__getattr__�s��� ��4�?�C�0�0� 0��� � � � �.���J�J�'�'�'����)�)�2�2�2��C� ���� ����� ���s�� A(�AA#�#A(r��operators.OperatorTyper(rc�$�||jg|�Ri|��Srw�r�r�s rzr�zColumnElement.operate�s&�� �r�$�/�4�E�4�4�4�V�4�4�4r}c � �|||jfi|��Srwr�r�s rzr�zColumnElement.reverse_operate�s ���r�%���3�3�F�3�3�3r}rP�objrp�Optional[TypeEngine[_T]]� expandingruc �8�td||||jd|���S�NT)�_compared_to_operatorrp�_compared_to_typerr��� BindParameterr��r�rPr�rpr�s rz� _bind_paramzColumnElement._bind_param�s2��� � �"*��"�i��� � � � r}c��|S)z^Return a column expression. Part of the inspection interface; returns self. rxr�s rz� expressionzColumnElement.expressionr�r}rUc��|fSrwrxr�s rz�_select_iterablezColumnElement._select_iterable � ���w�r}�FrozenSet[ColumnElement[Any]]c�>�td�|jD����S)Nc3�(K�|] }|j� |V��dSrw)r��r�r�s rz� <genexpr>z-ColumnElement.base_columns.<locals>.<genexpr>s)����E�E�q�!�*�E��E�E�E�E�E�Er})� frozenset� proxy_setr�s rz� base_columnszColumnElement.base_columnss!���E�E�D�N�E�E�E�E�E�Er}c��t|���g���tjd�|jD�����S)aFset of all columns we are proxying as of 2.0 this is explicitly deannotated columns. previously it was effectively deannotated columns but wasn't enforced. annotated columns should basically not go into sets if at all possible because their hashing behavior is very non-performant. c��g|] }|j�� Srx)r�r�s rz� <listcomp>z+ColumnElement.proxy_set.<locals>.<listcomp> s��A�A�A�a�a�k�A�A�Ar})r�� _deannotate�union� itertools�chainr�r�s rzr�zColumnElement.proxy_setsN���$�*�*�,�,�-�.�.�4�4� �O�A�A�4�=�A�A�A� B� � � r}c�D�tt|j����Srw)r�r'r�r�s rz�_expanded_proxy_setz!ColumnElement._expanded_proxy_set#s������7�7�8�8�8r}c�^�|gttjd�|jD�����zS)z�An 'uncached' version of proxy set. This list includes annotated columns which perform very poorly in set operations. c�6�g|]}|�����Srx)�_uncached_proxy_listr�s rzr�z6ColumnElement._uncached_proxy_list.<locals>.<listcomp>0s$��N�N�N�1�a�4�4�6�6�N�N�Nr})�listr�r�r�r�s rzr�z"ColumnElement._uncached_proxy_list's:���v�� �O�N�N�� �N�N�N� O� � � � r}� othercolumnc�Z�t|j�|j����S)z�Return True if the given :class:`_expression.ColumnElement` has a common ancestor to this :class:`_expression.ColumnElement`.)rsr�� intersection)r�r�s rz�shares_lineagezColumnElement.shares_lineage3s%���D�N�/�/� �0E�F�F�G�G�Gr}c�b�t|d��ot|d��o|j|jkS)zhReturn True if the given column element compares to this one when targeting within a result row.r�)rKr�r�s rz�_compare_name_for_resultz&ColumnElement._compare_name_for_result9s9�� �E�6� "� "� (���f�%�%� (�� �d�i�'� r}c��|jr)d|jvr tt|jd��S|j}|s|j}t |t ��rdS|S)N� proxy_key)� _annotationsr r�rr�r��_anonymous_label�r�r�s rzr�zColumnElement._proxy_keyCsh�� � � =���0A�!A�!A���T�.�{�;�<�<� <��x��� (� �'�D� �d�,� -� -� ��4��Kr}c��t|dd���dS|jr)d|jvr tt|jd��SdS)a\a suggested label to use in the case that the column has no name, which should be used if possible as the explicit 'AS <label>' where this expression would normally have an anon label. this is essentially mostly what _proxy_key does except it returns None if the column has a normal name that can be used. r�Nr�)r�r�r r�r�s rz�_expression_labelzColumnElement._expression_labelUsP�� �4��� &� &� 2��4� � � �;�$�2C�#C�#C���T�.�{�;�<�<� <��4r})r�r�name_is_truncatable�compound_select_cols� selectablerVrJ�Set[KeyedColumnElement[Any]]r�r�r��&Optional[Sequence[ColumnElement[Any]]]r��#typing_Tuple[str, ColumnClause[_T]]c �l�|�|j}|�|j}n|}|�J�t|rtjt j|��n|t|dd��|���} |j| _|rt|��| _ n|g| _ |j �$|j j � |��| _ || fS)z�Create a new :class:`_expression.ColumnElement` representing this :class:`_expression.ColumnElement` as it appears in the select list of a descending selectable. Nr�)rp� _selectable)�_anon_name_labelr�r�rr�r�TruncatedLabelRoler�r�r�r�r��columnsr?) r�r�r�r�r�rr�r�r��cos rz� _make_proxyzColumnElement._make_proxygs���" �<��(�D��{��o����C�����+�'�� � ��!9�4�@�@�@���$���-�-�"� � � ��)�9��� � !��3�4�4�B�K�K��&�B�K� � "� .�(�5�=�A�A�#�F�F�B�O��B�w�r}r�� Cast[_OPT]c�"�t||��S)aProduce a type cast, i.e. ``CAST(<expression> AS <type>)``. This is a shortcut to the :func:`_expression.cast` function. .. seealso:: :ref:`tutorial_casts` :func:`_expression.cast` :func:`_expression.type_coerce` )�Castr�s rzr zColumnElement.cast�s���D�%� � � r}� Label[_T]c�.�t|||j��S)z�Produce a column label, i.e. ``<columnname> AS <name>``. This is a shortcut to the :func:`_expression.label` function. If 'name' is ``None``, an anonymous label name will be generated. )�Labelr�r�s rz�labelzColumnElement.label�s���T�4���+�+�+r}�seed�add_hash� Optional[int]r�c��|j�|j}|j�t|��}|r|dksJ�|sJ�|dz|z}|dz}t|t��rt�|d|���St�||pd��S)Ni��_�)�enclosing_label�anon)r��hashr�r��safe_construct)r�rr� hash_values rz� _anon_labelzColumnElement._anon_label�s�����+��$�D���+� �$�Z�Z� � � ��w�'�'�'�'��K�K�4�$��*�h�6�J��#�:�D� �d�,� -� -� �#�2�2��B��3��� � �.�.�z�4�>�6�J�J�Jr}c�N�t|dd��}|�|��S)a�Provides a constant 'anonymous label' for this ColumnElement. This is a label() expression which will be named at compile time. The same label() is returned each time ``anon_label`` is called so that expressions can reference ``anon_label`` multiple times, producing the same label name at compile time. The compiler uses this function automatically at compile time for expressions that are known to be 'unnamed' like binary expressions and function calls. .. versionchanged:: 1.4.9 - this attribute was not intended to be public and is renamed to _anon_name_label. anon_name exists for backwards compat r�N�r�rr�s rzr�zColumnElement._anon_name_label�s)��$�t�V�T�*�*������%�%�%r}c�6�|�|j��S)a�Provides a constant 'anonymous key label' for this ColumnElement. Compare to ``anon_label``, except that the "key" of the column, if available, is used to generate the label. This is used when a deduplicating key is placed into the columns collection of a selectable. .. versionchanged:: 1.4.9 - this attribute was not intended to be public and is renamed to _anon_key_label. anon_key_label exists for backwards compat )rr�r�s rz�_anon_key_labelzColumnElement._anon_key_label�s�������0�0�0r}�1.4zqThe :attr:`_expression.ColumnElement.anon_label` attribute is now private, and the public accessor is deprecated.c��|jSrw)r�r�s rz� anon_labelzColumnElement.anon_label�s ���$�$r}zuThe :attr:`_expression.ColumnElement.anon_key_label` attribute is now private, and the public accessor is deprecated.c��|jSrw)rr�s rz�anon_key_labelzColumnElement.anon_key_labels ���#�#r}�idxr�c��t|dd��}|�|�|��S|�||���S)a)label to apply to a column that is anon labeled, but repeated in the SELECT, so that we have to make an "extra anon" label that disambiguates it from the previous appearance. these labels come out like "foo_bar_id__1" and have double underscores in them. r�N�r)r��_dedupe_anon_tq_label_idxr�r�rrs rz�_dedupe_anon_label_idxz$ColumnElement._dedupe_anon_label_idx sI����f�d�+�+�� �=��1�1�#�6�6� 6��#�#�E�C�#�8�8� 8r}c�J�|�t|dd����S�Nr��rr�r�s rz�_anon_tq_labelzColumnElement._anon_tq_label!s"�������k�4� @� @�A�A�Ar}c�J�|�t|dd����S)Nr�r#r�s rz�_anon_tq_key_labelz ColumnElement._anon_tq_key_label%s"�������o�t� D� D�E�E�Er}c�V�t|dd��pd}|�||���S)Nr�r rrrs rzrz'ColumnElement._dedupe_anon_tq_label_idx)s1����k�4�0�0�:�F��������4�4�4r}�rtr�rarw)r,r~rtr�)r,r-rtr�)r�r�rtr�)r�r�rtr�)rtr��rtr�)rtr�)rr�rtr)r�r�r(rrrrtr�r!) rPr�r�rrpr�r�rsrtru�rtrU)rtr�)r�r�rtrs)r(r�rtrs)r�rVr�rJr�r�r�r�rr�r�rsr�r�r�rrtr�)rpr�rtr�)r�r�rtr)rr�rrrtr�r�)rtr��rr�rtr�)rr�rtr�)@r�r�r�r�r�r�rgrkr��_omit_from_statementsr�r�r�r=rdr�r{r�rr,r�r�r}r�r�r��_render_label_in_columns_clause�_allow_label_resolve�_is_implicitly_booleanr�rr0rLrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r rrr�r� deprecatedrrr r$r&rrxr}rzrSrS�s��������M�M�^&�N��K�����-�-�-�-���"��"�"�"�"�!��$��,5�I�K�K�L�7�7�7�7� �������� ����� ���$�C�������#����$�#��"�"�"�"��X�"������X���#+�#+�#+��X�#+�J'+�#�� ���#�� "�J�"�"�"�"� �H�H�H�H��X�H� �04�!�!�!�!��X�!� 15� � � � � ��F�F�F��X�F� �B�B�B��X�B��������� �%� � � %� %� %� � � %� �#� ,� ,� ,�$�#� ,�$�$�$� � � � �5�5�5�5�4�4�4�4�+/��  � � � � �"�����X�������X�� ��F�F�F���F� ��  �  �  ���  � ��9�9�9���9�  �  �  �  �H�H�H�H�  � � � ��#����$�#��"�#����$�#��.#�!�$)�GK�+�+�+�+�+�+�Z!�!�!�!� ,�,�,�,�>B�"K�"K�"K�"K�"K�H ��&�&�&���&�( ��1�1�1���1� ��T�_� � :��� %�%�%� ���X� %���T�_� � >��� $�$�$� ���X� $�9�9�9�9�. ��B�B�B���B� ��F�F�F���F�5�5�5�5�5�5r}rSc�"�eZdZUdZdZded<dS)�KeyedColumnElementz)ColumnElement where ``.key`` is non-None.Tr�rN)r�r�r�r�rlrgrxr}rzr2r2/s%�������3�3�#�� �H�H�H�H�Hr}r2c����eZdZdZedd���Zejdd���Zedd���Z edd���Z ejd�fd � ��Z dd �Z e�fd���Z �xZS)�WrapsColumnExpressionz�Mixin that defines a :class:`_expression.ColumnElement` as a wrapper with special labeling behavior for an expression that already has a name. .. versionadded:: 1.4 .. seealso:: :ref:`change_4449` rtr�c��t���rw��NotImplementedErrorr�s rz�wrapped_column_expressionz/WrapsColumnExpression.wrapped_column_expressionEs��!�#�#�#r}r�c�B�|j}t|d��r|jSdSr")r8rKr�)r��wces rzr�zWrapsColumnExpression._tq_labelIs)���,�� �3� � $� $� ��=� ��4r}c��|jSrwr�r�s rzr�zWrapsColumnExpression._labelQs ���~�r}c��dSrwrxr�s rzr�z%WrapsColumnExpression._non_anon_labelUr�r}r�c���|j}|js"|j}|r|St|d��r|jSt ��jS)Nr�)r8rrr�rKr��super)r�r:�nalr�s �rzr�z&WrapsColumnExpression._anon_name_labelYsV����,�� �"� ,��%�C�� ,�� ���0�1�1� ,��+�+��w�w�'�'r}rr�c�|�|j}|j}|r|�|dz��S|�|��S)Nr )r8r�rr)r�rr:r?s rzr z,WrapsColumnExpression._dedupe_anon_label_idxhsF���,���!�� � 7��#�#�C�#�I�.�.� .��1�1�#�6�6� 6r}c�T��|j}|js|jSt��jSrw)r8rrr�r>)r�r:r�s �rzr�z WrapsColumnExpression._proxy_keyps+����,���"� "��>� !��w�w�!�!r}�rtr�rar�r+)r�r�r�r�r}r8r=r{r�r�r�r�r r�� __classcell__r�s@rzr4r47s������� � ��$�$�$��X�$� ����� ��������X�������X�� �� (� (� (� (� (� �� (�7�7�7�7��"�"�"�"��X�"�"�"�"�"r}r4c �:�eZdZUdZdZdejfdejfdejfdej fdej fgZ de d <d e d<d e d<d e d<d Z dZd ZdZejdd ejddd d d ddd f d4d#�Zd efd$�Zed5d&���Zd6d(�Zd)�Zd*�Zd7d8d.�Zd/�Zd0�Zd1�Zd2�Zd3�ZdS)9r�a�Represent a "bound expression". :class:`.BindParameter` is invoked explicitly using the :func:`.bindparam` function, as in:: from sqlalchemy import bindparam stmt = select(users_table).where( users_table.c.name == bindparam("username") ) Detailed discussion of how :class:`.BindParameter` is used is at :func:`.bindparam`. .. seealso:: :func:`.bindparam` r rr��callablerorrr\�_traverse_internalsr�r�� Optional[_T]FTNr�rrpr�rrsr"�#Union[bool, Literal[_NoArg.NO_ARG]]�quote�Optional[bool]� callable_�Optional[Callable[[], Any]]r�� isoutparamr�r-r��Optional[TypeEngine[Any]]�_is_crudc�4�|tjur|tjuo|du}|tjurd}|�t�||��}|rPt�t |��|�t|t��s|ndd���|_d|_ n>|r||_n4t�t |��d��|_d|_ |j|_ |pd|_ ||_ ||_ ||_| |_||_||_d|_| |_| rd|_|�V|r|r |d}nt*j}n|}| �| �| |��|_dSt+j|��|_dSt|t0��r|��|_dSt5|��rP|r7|r |d}n|}|�|��t9d|��_dS|t9d|��_dS||_dS)N�paramT�� sanitize_keyrz%BindParameter[typing_Tuple[Any, ...]])r)r.� quoted_name� constructr�rr^r�r� _key_is_anon�_identifying_key� _orig_keyrrorErMr"r�� expand_oprrrOr�_NO_VALUE_IN_LIST�coerce_compared_valuer��_resolve_value_to_typer#�_resolve_values_to_typesr )r�rrorprr"rIrKr�rMrrr�r�rO� check_values rz�__init__zBindParameter.__init__�sg�� �v�}� $� $��� �-�C�)�t�2C�H� �F�M� !� !��E� � ��'�'��U�3�3�C� � %�'�6�6��4�����&�s�,<�=�=�'��C�!�!�7� � �D�H�!%�D� � � � %��D�H�H�'�6�6�r�$�x�x��I�I�D�H� $�D� � !%����������� ��� �!�� �$��� �� � #��� ���.��� � !� �D�M� �=�� $��=�"'��(�K�K�"*�"<�K�K�#� � �,�-�C�C�)�;���� � � �%�;�K�H�H�� � � � ��t� $� $� �����D�I�I�I� �5� !� !� �� ��(�"'��(�K�K�"'�K��2�2�;�?�?��<�d�C�C�H�H�H� ��<�d�C�C�H�H�H��D�I�I�Ir}c���|�|���}||_d|_|tur|n|j|_|jt jurt j|��|_|S)zXReturn a copy of this :class:`.BindParameter` with the given value set. )r%N) r&rorEr.r"r�rr�r\)r�ror%r"�cloneds rz� _with_valuezBindParameter._with_value sc�����,��7�7���� ����&.�f�&<�&<�(�(�$�-��� �;�(�+� +� +�"�9�%�@�@�F�K�� r}rtc�F�|jr|���S|jS)z�Return the value of this bound parameter, taking into account if the ``callable`` parameter was set. The ``callable`` value will be evaluated and returned if present, else ``value``. )rEror�s rz�effective_valuezBindParameter.effective_values$�� �=� ��=�=�?�?� "��:� r}ruc�H�t�|��}d|_|S)ahProduce a copy of this bound parameter that will enable the :paramref:`_sql.BindParameter.literal_execute` flag. The :paramref:`_sql.BindParameter.literal_execute` flag will have the effect of the parameter rendered in the compiled SQL string using ``[POSTCOMPILE]`` form, which is a special form that is converted to be a rendering of the literal value of the parameter at SQL execution time. The rationale is to support caching of SQL statement strings that can embed per-statement literal values, such as LIMIT and OFFSET parameters, in the final SQL string that is passed to the DBAPI. Dialects in particular may want to use this method within custom compilation schemes. .. versionadded:: 1.4.5 .. seealso:: :ref:`engine_thirdparty_caching` T)r�r&rr)r�r�s rz�render_literal_executez$BindParameter.render_literal_execute's$��* � � �� &� &�� ����r}c�R�|j|ur|���}||_|S|Srw)rYr&)r�r�r�r�s rzr�zBindParameter._negate_in_binary@s-�� �>�[� (� (��;�;�=�=�D�'�D�N��K��Kr}c�H�t�|��}||_|Srw)r�r&r�)r�rpr�s rzr�z'BindParameter._with_binary_element_typeHs!�� � � �� &� &������r}r%r�rBc ���tj|fi|��}|j�|j��|s=|jr6t �t|��|jpdd���|_ |S)NrQTrR) r�r&r�r'rr�rr^rXr)r�r%r�r�s rzr&zBindParameter._cloneMs}�� � �� ,� ,�� ,� ,�� � ���T�-�.�.�.�� �� � �$�3�3��1���q�{�-�g�D�4���A�E��r}c�.�|jj�dd��}|s|� d|t<dS|j|��\}}|r ||jfS|�|�|��||j|jj|jr |j |zn|j |j fS)N� inherit_cacheFT) r�r�r?r1�get_anonr r��_static_cache_keyrVrrr)r�r]r� _gen_cache_ok�id_�founds rz�_gen_cache_keyzBindParameter._gen_cache_key^s�����/�3�3�O�U�K�K� �� ��#�%)���"��4�&�X�&�t�,�,� ��U� � )����(� (� � !� � � �d� #� #� #� � �N� �I� '�#'�#4� B�D�H�x� � �$�(� � �  � r}c��|js?d|_t�t|��|jpdd���|_dSdS)NTrQrR)rr�rr^rXrr�s rzr#z BindParameter._convert_to_uniqueusQ���{� ��D�K�'�6�6��4���$�.�3�G�$�7���D�H�H�H� � r}c��|j���}|j}|jr|���}d|d<||d<|S)z4execute a deferred value for serialization purposes.NrEro)r�r�rorE)r�r�r�s rzr�zBindParameter.__getstate__|sL�� �M� � � � �� �J�� �=� !�� � ���A� �A�j�M���'� ��r}c���|�dd��rAt�t|��|�dd��d���|d<|j�|��dS)NrFrXrQTrRr)r?r�rr^r�r'r�s rzr�zBindParameter.__setstate__�so�� �9�9�X�u� %� %� �+�:�:��4���%�)�)�K��9�9��;���E�%�L� � ���U�#�#�#�#�#r}c�P�|jj�d|j�d|j�d|j�d�S)N�(z, z, type_=�))r�r�rror�r�s rzr]zBindParameter.__repr__�s5�� �N� #� #� #� �H�H�H� �J�J�J� �I�I�I�  � r})rr�rorrpr�rrsr"rHrIrJrKrLr�rsrMrsrrrsr�r-r�rNrOrs)rtrG)rtrurz)r%rsr�rrtrB) r�r�r�r�r�r7� dp_anon_name�dp_type� dp_plain_dict� dp_plain_obj� dp_booleanrFrgrOrwrVrkr)r.r_rbr}rdrfr�r�r&rqr#r�r�r]rxr}rzr�r�ys����������(!�N� �!�.�/� �"�*�+� �&�4�5� �#�0�1� �-�8�9� 3������ �H�H�H����������H����L��M� �]�37��8>� � $�15�� � %�8<�7;��e�e�e�e�e�N/4�f� � � � �� � � ��X� �����2������ �����" � � �.��� � � �$�$�$� � � � � r}r�c�<�eZdZUdZdZdejfgZded<d�Z dS)� TypeClausezTHandle a type keyword in a SQL statement. Used by the ``Case`` statement. � typeclauser�r\rFc��||_dSrw�r�r�s rzr_zTypeClause.__init__�s ���� � � r}N) r�r�r�r�r�r7ryrFrgr_rxr}rzr~r~�s`��������� "�N� �"�*�+�3����������r}r~c��eZdZUdZdZdejfdejfgZde d<dZ dZ e j de j��Zd Zd Zd Zd Zed+d ���Zd �Zed,d���ZdZde d<dZde d<d Zed���Zd-d�Zed.d���Zej d��d/d#���Z!ed0d%���Z"ed&���Z# d1d2d*�Z$dS)3� TextClauseaRepresent a literal SQL text fragment. E.g.:: from sqlalchemy import text t = text("SELECT * FROM users") result = connection.execute(t) The :class:`_expression.TextClause` construct is produced using the :func:`_expression.text` function; see that function for full documentation. .. seealso:: :func:`_expression.text` � textclause� _bindparamsr�r\rFTz(?<![:\w\x5c]):(\w+)(?!:)Frt�Iterable[FromClause]c��dS�Nrxrxr�s rz� _hide_fromszTextClause._hide_froms�s���rr}c�"�t||��Srw)r�r�s rzr�zTextClause.__and__�s���D�%� � � r}rUc��|fSrwrxr�s rzr�zTextClause._select_iterable�r�r}Nr�rr�c��|jdkS�N�*)r�r�s rzr|zTextClause._is_star�s���y�C��r}r�c�`��i�_�fd�}�j�||���_dS)Nc���t|�d�����j|�d��<d|�d��zS)Nrz:%s)r��groupr�)�mr�s �rz�replz!TextClause.__init__.<locals>.repl�sA���+8�������+D�+D�D� �Q�W�W�Q�Z�Z� (��1�7�7�1�:�:�%� %r})r��_bind_params_regex�subr�)r�r�r�s` rzr_zTextClause.__init__�sD���:<��� &� &� &� &� &� �+�/�/��d�;�;�� � � r}�bindsr��names_to_valuesrrBc��|j���x|_}|D]I} ||j}|||j<�#t$r"}t jd|jz��|�d}~wwxYw|���D]R\}} ||}|�|d���||<�)#t$r}t jd|z��|�d}~wwxYw|S)a�Establish the values and/or types of bound parameters within this :class:`_expression.TextClause` construct. Given a text construct such as:: from sqlalchemy import text stmt = text( "SELECT id, name FROM user WHERE name=:name AND timestamp=:timestamp" ) the :meth:`_expression.TextClause.bindparams` method can be used to establish the initial value of ``:name`` and ``:timestamp``, using simple keyword arguments:: stmt = stmt.bindparams( name="jack", timestamp=datetime.datetime(2012, 10, 8, 15, 12, 5) ) Where above, new :class:`.BindParameter` objects will be generated with the names ``name`` and ``timestamp``, and values of ``jack`` and ``datetime.datetime(2012, 10, 8, 15, 12, 5)``, respectively. The types will be inferred from the values given, in this case :class:`.String` and :class:`.DateTime`. When specific typing behavior is needed, the positional ``*binds`` argument can be used in which to specify :func:`.bindparam` constructs directly. These constructs must include at least the ``key`` argument, then an optional value and type:: from sqlalchemy import bindparam stmt = stmt.bindparams( bindparam("name", value="jack", type_=String), bindparam("timestamp", type_=DateTime), ) Above, we specified the type of :class:`.DateTime` for the ``timestamp`` bind, and the type of :class:`.String` for the ``name`` bind. In the case of ``name`` we also set the default value of ``"jack"``. Additional bound parameters can be supplied at statement execution time, e.g.:: result = connection.execute( stmt, timestamp=datetime.datetime(2012, 10, 8, 15, 12, 5) ) The :meth:`_expression.TextClause.bindparams` method can be called repeatedly, where it will re-use existing :class:`.BindParameter` objects to add new information. For example, we can call :meth:`_expression.TextClause.bindparams` first with typing information, and a second time with value information, and it will be combined:: stmt = text( "SELECT id, name FROM user WHERE name=:name " "AND timestamp=:timestamp" ) stmt = stmt.bindparams( bindparam("name", type_=String), bindparam("timestamp", type_=DateTime) ) stmt = stmt.bindparams( name="jack", timestamp=datetime.datetime(2012, 10, 8, 15, 12, 5) ) The :meth:`_expression.TextClause.bindparams` method also supports the concept of **unique** bound parameters. These are parameters that are "uniquified" on name at statement compilation time, so that multiple :func:`_expression.text` constructs may be combined together without the names conflicting. To use this feature, specify the :paramref:`.BindParameter.unique` flag on each :func:`.bindparam` object:: stmt1 = text("select id from table where name=:name").bindparams( bindparam("name", value="name1", unique=True) ) stmt2 = text("select id from table where name=:name").bindparams( bindparam("name", value="name2", unique=True) ) union = union_all(stmt1.columns(column("id")), stmt2.columns(column("id"))) The above statement will render as: .. sourcecode:: sql select id from table where name=:name_1 UNION ALL select id from table where name=:name_2 .. versionadded:: 1.3.11 Added support for the :paramref:`.BindParameter.unique` flag to work with :func:`_expression.text` constructs. z?This text() construct doesn't define a bound parameter named %rNF)r")r�r�rX�KeyErrorr;� ArgumentErrorr�rb) r�r�r�� new_paramsr��existingr�rros rzrzTextClause.bindparams sA��X)-�(8�(=�(=�(?�(?�?���:�� 6� 6�D� 6�&�d�n�5��26� �8�-�.�.�� � � � ��'�/�15��@��������� ����*�/�/�1�1� N� N�J�C�� N�%�c�?��#+�"6�"6�u�u�"6�"M�"M� �3���� � � � ��'�/�14�5��������� ����� s-� >� A*�A%�%A*�B*�* C�4C � Czsqlalchemy.sql.selectable�cols�_ColumnExpressionArgument[Any]�types�_TypeEngineArgument[Any]rXc�.��tjj}d�|D��}�fd�|D��}d�����D��}|j�|j��}|�|||zt|��o| ���|S)a�Turn this :class:`_expression.TextClause` object into a :class:`_expression.TextualSelect` object that serves the same role as a SELECT statement. The :class:`_expression.TextualSelect` is part of the :class:`_expression.SelectBase` hierarchy and can be embedded into another statement by using the :meth:`_expression.TextualSelect.subquery` method to produce a :class:`.Subquery` object, which can then be SELECTed from. This function essentially bridges the gap between an entirely textual SELECT statement and the SQL expression language concept of a "selectable":: from sqlalchemy.sql import column, text stmt = text("SELECT id, name FROM some_table") stmt = stmt.columns(column("id"), column("name")).subquery("st") stmt = ( select(mytable) .select_from(mytable.join(stmt, mytable.c.name == stmt.c.name)) .where(stmt.c.id > 5) ) Above, we pass a series of :func:`_expression.column` elements to the :meth:`_expression.TextClause.columns` method positionally. These :func:`_expression.column` elements now become first class elements upon the :attr:`_expression.TextualSelect.selected_columns` column collection, which then become part of the :attr:`.Subquery.c` collection after :meth:`_expression.TextualSelect.subquery` is invoked. The column expressions we pass to :meth:`_expression.TextClause.columns` may also be typed; when we do so, these :class:`.TypeEngine` objects become the effective return type of the column, so that SQLAlchemy's result-set-processing systems may be used on the return values. This is often needed for types such as date or boolean types, as well as for unicode processing on some dialect configurations:: stmt = text("SELECT id, name, timestamp FROM some_table") stmt = stmt.columns( column("id", Integer), column("name", Unicode), column("timestamp", DateTime), ) for id, name, timestamp in connection.execute(stmt): print(id, name, timestamp) As a shortcut to the above syntax, keyword arguments referring to types alone may be used, if only type conversion is needed:: stmt = text("SELECT id, name, timestamp FROM some_table") stmt = stmt.columns(id=Integer, name=Unicode, timestamp=DateTime) for id, name, timestamp in connection.execute(stmt): print(id, name, timestamp) The positional form of :meth:`_expression.TextClause.columns` also provides the unique feature of **positional column targeting**, which is particularly useful when using the ORM with complex textual queries. If we specify the columns from our model to :meth:`_expression.TextClause.columns`, the result set will match to those columns positionally, meaning the name or origin of the column in the textual SQL doesn't matter:: stmt = text( "SELECT users.id, addresses.id, users.id, " "users.name, addresses.email_address AS email " "FROM users JOIN addresses ON users.id=addresses.user_id " "WHERE users.id = 1" ).columns( User.id, Address.id, Address.user_id, User.name, Address.email_address, ) query = ( session.query(User) .from_statement(stmt) .options(contains_eager(User.addresses)) ) The :meth:`_expression.TextClause.columns` method provides a direct route to calling :meth:`_expression.FromClause.subquery` as well as :meth:`_expression.SelectBase.cte` against a textual SELECT statement:: stmt = stmt.columns(id=Integer, name=String).cte("st") stmt = select(sometable).where(sometable.c.id == stmt.c.id) :param \*cols: A series of :class:`_expression.ColumnElement` objects, typically :class:`_schema.Column` objects from a :class:`_schema.Table` or ORM level column-mapped attributes, representing a set of columns that this textual string will SELECT from. :param \**types: A mapping of string names to :class:`.TypeEngine` type objects indicating the datatypes to use for names that are SELECTed from the textual string. Prefer to use the ``*cols`` argument as it also indicates positional ordering. c�L�g|]!}tjtj|����"Srx)rr�r�LabeledColumnExprRole)r��cols rzr�z&TextClause.columns.<locals>.<listcomp> s5��. �. �. �CF�I� �U�8�#� >� >�. �. �. r}c���g|]:}|j�vr-t|j��|j����n|��;Srx)rr�r�)r�r�r�s �rzr�z&TextClause.columns.<locals>.<listcomp> sZ���! �! �! � ��7�e�#�#��S�W�e�i�i���&8�&8�9�9�9�� ! �! �! r}c�4�g|]\}}t||����Srxr�)r�rrps rzr�z&TextClause.columns.<locals>.<listcomp> s3��4 �4 �4 �)3��e�L��e� $� $�4 �4 �4 r})� positional)r=r��sql_selectabler�rXr��_initrs)r�r�r�r�� input_cols�positional_input_cols�keyed_input_cols�elems ` rzr�zTextClause.columns� s����n�^�2� �. �. �JN�. �. �. � �! �! �! �! � "� ! �! �! ��4 �4 �7<�{�{�}�}�4 �4 �4 ���'�/�/� �0H�I�I�� � � � � !�$4� 4��1�2�2�K�;K�7K� � � � � � r}�TypeEngine[Any]c��tjSrwr�r�s rzr�zTextClause.type s ��� � r}c�6�|j�|��Srw)r�r�r�s rzr�zTextClause.comparator s���y�+�+�D�1�1�1r}r,r-�Union[Self, Grouping[Any]]c�@�|tjurt|��S|Srw)r�in_opr�r/s rzr0zTextClause.self_group# s"�� �i�o� %� %��D�>�>� !��Kr})rtr�r*)r�r�)r�r�r�rrtrB)r�r�r�r�rtrX)rtr�rw�r,r-rtr�)%r�r�r�r�r�r7�dp_string_clauseelement_dict� dp_stringrFrgrrro�rer��UNICODEr�r/r-r,r�r}r�r�r�rr�r.r|r_r(rr=r�r�r�r�r0rxr}rzr�r��s����������&"�N� �)�F�G� �"�,�-�3������ �O��K�#���$@�"�*�M�M��"��&+�#�!��$�� �����X��!�!�!������X�� �C����� �F� � � � � �� � � ��X� � <� <� <� <��E�E�E��[�E�N�T��4�5�5�N�N�N�6�5�N�`�!�!�!��X�!��2�2��X�2� 15�������r}r�c�n�eZdZUdZdZgZded<ded<esej d d���Z e d d ���Z d S) �Nullz�Represent the NULL keyword in a SQL statement. :class:`.Null` is accessed as a constant via the :func:`.null` function. �nullr\rF� _singletonrtr�c��tjSrwr�r�s rzr�z Null.type; s ���$� $r}c��tjS)z+Return a constant :class:`.Null` construct.)r�r���clss rz� _instancezNull._instance? s ����r}Nr))rtr�) r�r�r�r�r�rFrgrr=rdr�� classmethodr�rxr}rzr�r�, s�����������N�24��4�4�4�4����� �%� � � %� %� %� � � %������[���r}r�c�v�eZdZUdZdZgZded<ded<esej d d���Z dd �Z e dd ���Z d S)�False_z�Represent the ``false`` keyword, or equivalent, in a SQL statement. :class:`.False_` is accessed as a constant via the :func:`.false` function. �falser\rFr�rtr�c��tjSrw�rr�r�s rzr�z False_.typeY � ���'� 'r}�True_c��tjSrw�r�r�r�s rzrLzFalse_._negate] s ����r}c��tjSrw�r�r�r�s rzr�zFalse_._instance` s ��� � r}Nr)�rtr��rtr�)r�r�r�r�r�rFrgrr=rdr�rLr�r�rxr}rzr�r�I s�����������N�24��4�4�4�4����� �(� � � (� (� (� � � (� � � � ��!�!�!��[�!�!�!r}r�c��eZdZUdZdZgZded<ded<esej dd���Z dd �Z e dd���Z e dd���ZdS)r�z�Represent the ``true`` keyword, or equivalent, in a SQL statement. :class:`.True_` is accessed as a constant via the :func:`.true` function. �truer\rFr�rtr�c��tjSrwr�r�s rzr�z True_.typew r�r}r�c��tjSrwr�r�s rzrLz True_._negate{ s ��� � r}r(�Optional[ColumnElement[Any]]r�c�2�|�|���S|Srw)r�)r�r(s rz�_ifnonez True_._ifnone~ s�� �=��=�=�?�?� "��Lr}c��tjSrwr�r�s rzr�zTrue_._instance� s ����r}Nr)r�)r(r�rtr�r�)r�r�r�r�r�rFrgrr=rdr�rLr�r�r�rxr}rzr�r�h s�����������N�24��4�4�4�4����� �(� � � (� (� (� � � (�!�!�!�!������[��� � � ��[� � � r}r�c���eZdZUdZdZdZdejfdejfgZ de d<de d<e j dde jd �d#d�Ze d$d%d���Zd&d�Zd'd�Zed(d���Zd�Zejd)d���Z d$d*d"�ZdS)+� ClauseListzzDescribe a list of clauses, separated by an operator. By default, is comma-separated, such as a column listing. � clauselistT�clausesrPr\rFr�)rPr��group_contents�_literal_as_text_roler�rPr�rsr�r��Type[roles.SQLRole]c�����|�_|�_|�_|}|���_�jr��fd�|D���_n��fd�|D���_t j�j���_dS)Nc�p��g|]2}tj�|������j�����3S)��apply_propagate_attrsrO)rr�r0rP�r�r�r��text_converter_roles ��rzr�z'ClauseList.__init__.<locals>.<listcomp>� sU�������� �'��t�����*�T�]�*�3�3���r}c�>��g|]}tj�|������S�r�)rr�r�s ��rzr�z'ClauseList.__init__.<locals>.<listcomp>� sD�������� �'��t������r})rPr�r��_text_converter_roler�r� is_booleanr/)r�rPr�r�r�r��clauses_iteratorr�s` @rzr_zClauseList.__init__� s�����!�� ��� �,���EL��3H��$7��!� � � ������/� ���D�L�L������/� ���D�L� '0�&:�4�=�&I�&I��#�#�#r}Nr�rtc��|�|��}|rt|��ng|_d|_||_d|_d|_|S)NTF)r�r�r�r�rPr�r/�r�rPr�r�s rz�_construct_rawzClauseList._construct_raw� sN�� �{�{�3����(/�7�t�G�}�}�}�R�� ��� � �� �"���&+��#�� r}�Iterator[ColumnElement[Any]]c�*�t|j��Srw��iterr�r�s rz�__iter__zClauseList.__iter__� ����D�L�!�!�!r}r�c�*�t|j��Srw��lenr�r�s rz�__len__zClauseList.__len__� ����4�<� � � r}rUc�^�tj�d�|jD����S)Nc��g|] }|j�� Srx)r�)r�r�s rzr�z/ClauseList._select_iterable.<locals>.<listcomp>� s�� <� <� <�t�T� "� <� <� <r})r�r�� from_iterabler�r�s rzr�zClauseList._select_iterable� s/����,�,� <� <�t�|� <� <� <� � � r}c��|jrM|j�tj|j|���|j�����dS|j�tj|j|����dS�NrO)r�r�r rr�r�r0rP�r�r�s rzr zClauseList.append� s��� � � � �L� � �� ��!:�F�C�C�N�N� �M�O��� � � � � � �L� � �� ��!:�F�C�C� � � � � r}r�c�V�ttjd�|jD�����S)Nc��g|] }|j�� Srx�r�r�s rzr�z,ClauseList._from_objects.<locals>.<listcomp>� ���%L�%L�%L�!�a�o�%L�%L�%Lr}�r�r�r�r�r�s rzr�zClauseList._from_objects� �(���I�O�%L�%L�t�|�%L�%L�%L�M�N�N�Nr}r,r-r�c�f�|jr)tj|j|��rt |��S|Srw)r�r� is_precedentrPr�r/s rzr0zClauseList.self_group� s5�� �:� �)�0����H�H� ��D�>�>� !��Kr}) r�r�rPrPr�rsr�rsr�r�rw)rPrPr�r�rtr��rtr�ryr*rcr�)r�r�r�r�r�rxr7�dp_clauseelement_list� dp_operatorrFrgr�comma_opr�WhereHavingRoler_r�r�r�r�r}r�r r=rr�r0rxr}rzr�r�� sq��������� "�N��O� �%�;�<� �&�2�3�3������ &�%�%�%� "+�!3��#�5:�5J� J�J�J�J�J�J�>�;?� � � � ��[� �"�"�"�"�!�!�!�!�� � � ��X� � � � � �"�O�O�O�#�"�O�15�������r}r�c��eZdZUdZded<ded<dZded<ed ���Z ddd�Zedd���Z e d d d�d d���Z d S)!�OperatorExpressionz[base for expressions that contain an operator and operands .. versionadded:: 2.0 rPrPr�r�Trsr�c�4�tj|j��Srw)rr�rPr�s rzr�z OperatorExpression.is_comparison s���&�t�}�5�5�5r}Nr,r-rt�Union[Self, Grouping[_T]]c��|jrtj|j|��s'|tjur(tj|j��st |��S|Srw)r�rrrPrRr�r�r/s rzr0zOperatorExpression.self_group s\�� �J� ��&�t�}�g�>�>� ��9�=�(�(�!�,�T�]�;�;�)��D�>�>� !��Kr}�%typing_Tuple[ColumnElement[Any], ...]c��t���rwr6r�s rz�_flattened_operator_clausesz.OperatorExpression._flattened_operator_clauses s��"�#�#�#r})�negate� modifiers�leftr��rightr�rprrr�OperatorExpression[_T]c��tj|��r�|� Jd|�����d}t|dd��|ur$|�|j��r d}|j}n|f}t|dd��|ur$|�|j��r d}|j} n|f} |rt j||g|| z�R�S|jrd}t||||||���S)Nz.negate not supported for associative operator FrPT)rprr) r�is_associativer��_compare_type_affinityr�r�ExpressionClauseList�_construct_for_listr��BinaryExpression) r�rrr�rprr�multi�left_flattened�right_flatteneds rz�_construct_for_opz$OperatorExpression._construct_for_op# sH�� � #�B� '� '� ����D��D�D�����E���j�$�������4�4�T�Y�?�?����!%�!A���"&�����z�4�������4�4�U�Z�@�@����"'�"C���#(�(��� �+�?����%��6����� � )� ��F�� �%��5��9� � � � r}rw�r,r-rtr�rtr)rr�rr�r�rPrpr�rr-rrrtr) r�r�r�r�rgr�r}r�r0rr�r!rxr}rzr r � s���������� ���������E����� �6�6��X�6�15������$�$�$�$��X�$� �*.�15�, �, �, �, �, ��[�, �, �, r}r c���eZdZUdZdZdejfdejfgZde d<de d<de d <d d �d&d�Z e d'd���Z d(d�Z d)d�Ze d*d���Zejd+d���Zd,d�Zedd �d-d#���Zd.d%�Zd S)/ra9Describe a list of clauses, separated by an operator, in a column expression context. :class:`.ExpressionClauseList` differs from :class:`.ClauseList` in that it represents a column-oriented DQL expression only, not an open ended list of anything comma separated. .. versionadded:: 2.0 �expression_clauselistr�rPr\rFrrsr�N�rprPr�rpr�c����|�_t�fd�|D�����_tj�j���_t j|���_dS)Nc3�Z�K�|]%}tjtj|����V��&dS)r�N�rr�r�ExpressionElementRole)r�r�r�s �rzr�z0ExpressionClauseList.__init__.<locals>.<genexpr>r sU����� � �� � ��+�V�4� � � � � � � � � r}) rPr>r�rr�r/r� to_instancer�)r�rPrpr�s` rzr_zExpressionClauseList.__init__j sr��� !�� �� � � � �"�  � � � � �� � '0�&:�4�=�&I�&I��#��(��/�/�� � � r}rtc��|jSrw�r�r�s rzrz0ExpressionClauseList._flattened_operator_clauses{ s ���|�r}r�c�*�t|j��Srwr�r�s rzr�zExpressionClauseList.__iter__� r�r}r�c�*�t|j��Srwr�r�s rzr�zExpressionClauseList.__len__� r�r}rUc��|fSrwrxr�s rzr�z%ExpressionClauseList._select_iterable� r�r}r�c�V�ttjd�|jD�����S)Nc��g|] }|j�� Srxrr�s rzr�z6ExpressionClauseList._from_objects.<locals>.<listcomp>� rr}rr�s rzr�z"ExpressionClauseList._from_objects� rr}r�r�r~c�(�|xj|fz c_dSrwr-r�s rz�_append_inplacez$ExpressionClauseList._append_inplace� s�� � � �� �!� � � � r}T)r�r��ExpressionClauseList[_T]c���|�|��}||_|r!t�fd�|D����|_n||_�|_||_|S)Nc3�D�K�|]}|�����V��dS)rON�r0)r�r�rPs �rzr�z;ExpressionClauseList._construct_for_list.<locals>.<genexpr>� sB�����!�!�34�� � �X� �.�.�!�!�!�!�!�!r})r�r�r>r�rPr�)r�rPrpr�r�r�s ` rzrz(ExpressionClauseList._construct_for_list� sz����{�{�3������ � � #� �!�!�!�!�8?�!�!�!���D�L�L�#�D�L� �� ��� �� r}rc��|�tj���}t|t��sJ�t |tjd���Sr�rQrUs rzrLzExpressionClauseList._negate� sM���/�/�)�-�/�8�8���'�=�1�1�1�1�1�� �i�m�T� � � � r})rPrPr�r�rpr�r#rryr*rc)r�r�rtr~) rPrPrpr�r�r�r�rsrtr5�rtr)r�r�r�r�r�r7�dp_clauseelement_tuplerrFrgr_r}rr�r�r�r=rr�r4r�rrLrxr}rzrrS s~������� � �-�N� �%�<�=� �&�2�3�3������ 3�2�2�2��K�K�K� 48� 0�0�0�0�0�0�"�����X�� "�"�"�"�!�!�!�!������X�� �"�O�O�O�#�"�O�"�"�"�"�� � ������[��& � � � � � r}rc���eZdZdZdZd�Zed#d ���Zeej fd$d���Z ed%d���Z e d&d'd���Z eej fd(d���Z eej fd)d���Zed*d���Z d&d+�fd"� Z�xZS),r�r%Tc� �td���)Nz+BooleanClauseList has a private constructorr6)r��argr�s rzr_zBooleanClauseList.__init__� s��!� 9� � � r}rPrP� continue_onr�skip_onr��Iterable[ColumnElement[Any]]rt�+typing_Tuple[int, List[ColumnElement[Any]]]c��� �d}g}tj� d}|D]2}||ur|}� ||ur|g}d}n|sd}n|� d}|�|���3|s|�|g}d}|� fd�|D��fS)Nrrr:c�<��g|]}|�������S)rOr8)r�r�r,s �rzr�zBBooleanClauseList._process_clauses_for_boolean.<locals>.<listcomp>� s'���L�L�L�q�Q�\�\�'�\�2�2�L�L�Lr})rr�r ) r�rPr?r@r��has_continue_on�convert_clauses�lccr�r,s @rz�_process_clauses_for_booleanz.BooleanClauseList._process_clauses_for_boolean� s���������#����� /� /�F���$�$�#)����7�"�"�$*�(���������C�C�&�G��C��&�&�v�.�.�.�.�� �?�#>�.�/�O��C��L�L�L�L�O�L�L�L�L�Lr}�initial_clauser�r�c���|tjure�j}tjd|�d|�d|�d|t jurdnd�d|�d|t jurdnd �d � d � ��|����S|��||d �tj |f|z��D����\}} |dkrAtj � �fd�| D����} |��| ��S|sJ�| dS)Nz Invoking z_() without arguments is deprecated, and will be disallowed in a future release. For an empty z() construct, use 'rvztrue()zfalse()z, *args)' or '�True�Falsez , *args)'.r)�versionc�L�g|]!}tjtj|����"Srx)rr�rr )r�r�s rzr�z0BooleanClauseList._construct.<locals>.<listcomp> s8�� � � ��� ��!6��?�?� � � r}rc3�f�K�|]+}t|dd���urd�|jD��n|fV��,dS)rPNc3�K�|]}|V��dSrwrxr�s rzr�z9BooleanClauseList._construct.<locals>.<genexpr>.<genexpr> s"����D�D�1�Q�D�D�D�D�D�Dr})r�r)r��to_flatrPs �rzr�z/BooleanClauseList._construct.<locals>.<genexpr> sl�����>�>� ��w� �D�9�9�X�E�E�E�D�� C�D�D�D�D�!�� >�>�>�>�>�>r}r) r)r.r�r=�warn_deprecatedr�r�r�rH�coerce_generator_argr�r�r�) r�rPr?r@rIr�r�r�rGrF�flattened_clausess ` rz� _constructzBooleanClauseList._construct� s���� �V�]� *� *��$�D� � ��D������.2���!,�u�/?� ?� ?�H�H�Y��� � �� *�U�-=�=�=�F�F�7� ���� � � � ��%�%�h�/�/� /�"�?�?� � � � � �"�7�#�%��/��� � � � � ���_� ��7�7�!*�� =� =�>�>�>�>� /� >�>�>�!�!� ��%�%�h�0A�B�B� B��J�J�3�#�1�%� %r}�Optional[ColumnElement[bool]]c���tjtjtj}}}|�||||��\}}|dkr|�||��S|dkr|dSdS)Nrr)rr�r�r�r�rHr�)r�r�rPr?r@rGrFs rz�_construct_for_whereclausez,BooleanClauseList._construct_for_whereclause s��� �N� � � � � '�+�� #�?�?� � � � �  � ���_� ��7�7��%�%�h��@�@� @� �A�X�X�#�1�%� %��4r}Nr�c��|�|��}|rt|��nd|_d|_||_t j|_d|_|S)NrxT) r�r>r�r�rPrr�r�r/r�s rzr�z BooleanClauseList._construct_raw; sP�� �{�{�3����)0�8�u�W�~�~�~�b�� ��� � �� ��(�� �&*��#�� r}�=Union[Literal[True], _ColumnExpressionArgument[bool], _NoArg]�_ColumnExpressionArgument[bool]r�c�`�|jtjtjt j|g|�R�S)zwProduce a conjunction of expressions joined by ``AND``. See :func:`_sql.and_` for full documentation. )rUrr�r�r�r��r�rIr�s rzr�zBooleanClauseList.and_I s=���s�~� �N� � � � � �  � �  � � � r}�>Union[Literal[False], _ColumnExpressionArgument[bool], _NoArg]c�`�|jtjtjt j|g|�R�S)zuProduce a conjunction of expressions joined by ``OR``. See :func:`_sql.or_` for full documentation. )rUrr�r�r�r�r]s rzr�zBooleanClauseList.or_] s=���s�~� �M� � � � � �  � �  � � � r}rUc��|fSrwrxr�s rzr�z"BooleanClauseList._select_iterableq r�r}r,r-�Union[Self, Grouping[bool]]c�Z��|js|St���|���Sr�)r�r>r0)r�r,r�s �rzr0zBooleanClauseList.self_groupu s/����|� 7��K��7�7�%�%�g�%�6�6� 6r}) rPrPr?rr@rr�rArtrB)rPrPr?rr@rrIrr�rr�rrtr�)r�rArtrVrw)rPrPr�r�rtr�)rIrZr�r[rtr�)rIr^r�r[rtr�r*)r,r-rtra)r�r�r�r�rkr_r�rHr)r.rUrXr�r�r�r}r�r0rCr�s@rzr�r�� st�������,�N��M� � � � �(M�(M�(M��[�(M�T� %�m� :&�:&�:&�:&��[�:&�x�����[��6�;?� � � � ��[� �� �M�  � � � ��[� �&� �M�  � � � ��[� �&�����X��15�7�7�7�7�7�7�7�7�7�7�7r}r�c���eZdZUdZdZejgzZded<ded<ej d��dd �d�fd���Z e dd���Z dd�Z ddd�Z�xZS)rzRepresent a SQL tuple.r>r\rFrYr��sqlalchemy.sql.sqltypesN)r�r�r�r��,Optional[Sequence[_TypeEngineArgument[Any]]]c�f��tjj}|� d�|D��}n`t|��t|��kr&t jdt|��|fz���d�t ||��D��}|jd�|D���|_t��j |�dS)Nc�L�g|]!}tjtj|����"Srxr)r�s rzr�z"Tuple.__init__.<locals>.<listcomp>� s8��6�6�6��� ��!<�a�@�@�6�6�6r}z*Wrong number of elements for %d-tuple: %r c�h�g|]/\}}tjtj||js|nd�����0S�Nr&)rr�rr*�_isnull)r��typr�s rzr�z"Tuple.__init__.<locals>.<listcomp>� sW����� �C�� � ��/��%(�[�:�#�#�d������r}c��g|] }|j�� Srxr�)r�r>s rzr�z"Tuple.__init__.<locals>.<listcomp>� s��(J�(J�(J�c���(J�(J�(Jr}) r=r�� sql_sqltypesr�r;r��ziprYr�r>r_)r�r�r��sqltypes� init_clausesr�s �rzr_zTuple.__init__� s���� �>�.�� �=�6�6� �6�6�6�L�L� �5�z�z�S��\�\�)�)��'�@��5�z�z�7�+�,������ "�%��1�1� ���L�'�H�&�(J�(J�\�(J�(J�(J�K�� ������,�'�'�'�'r}rtrUc��|fSrwrxr�s rzr�zTuple._select_iterable� r�r}Fc ����|rtd|�dd�|j���St��fd�t||jj��D���S)NT)ror�rr�rpr�c �@��g|]\}}td|�|d������S)NT)r�r�rrp)r�)r��o�compared_to_typerPrps ��rzr�z%Tuple._bind_param.<locals>.<listcomp>� sQ��� � � �,��+�"���.6�*:�#�#� ��� � � r})r�r�rrnr�r�s ` ` rzr�zTuple._bind_param� s����� � � ���&.����"&�)���� �� � � � � �03�3�� ��/H�/H� � � � � r}r,r-rBc��|Srwrxr/s rzr0zTuple.self_group� ���� r})r�r�r�rer*r!rw�r,r-rtrB)r�r�r�r�r�r�rFrgr=r�r_r}r�r�r0rCr�s@rzrr� s��������� � ��N� �&��+�������O�O�O��T��2�3�3�?C�(�(�(�(�(�(�(�4�3�(�<�����X������4��������r}r.c��eZdZUdZdZdejfdejfdejfgZde d<de d<d e d<d e d<d d d �dd�Z e j dd���Z d S)�Casea�Represent a ``CASE`` expression. :class:`.Case` is produced using the :func:`.case` factory function, as in:: from sqlalchemy import case stmt = select(users_table).where( case( (users_table.c.name == "wendy", "W"), (users_table.c.name == "jack", "J"), else_="E", ) ) Details on :class:`.Case` usage is at :func:`.case`. .. seealso:: :func:`.case` �casero�whens�else_r\rFz:List[typing_Tuple[ColumnElement[bool], ColumnElement[_T]]]r�r�N)ror}�LUnion[typing_Tuple[_ColumnExpressionArgument[bool], Any], Mapping[Any, Any]]� Optional[Any]c�$��tjdd|��} tj|��}n#t$rYnwxYw�fd�|D���_|�d�_n$tjtj |���_|�%tjtj |���_ nd�_ td�t�j��D���j � �j j n tj��}t!t"|���_ dS)Nr|r{c���g|]W\}}tjtj|�������tjtj|��f��XSr�)rr�rr*r0)r�r��rr�s �rzr�z!Case.__init__.<locals>.<listcomp> sp���  �  �  ���A�� ��/��*.�����*�,�,�� ��!<�a�@�@�  �  �  �  r}c3�BK�|]�^}}|jj�|jV��dSrw)r�rj)r�r �thens rzr�z Case.__init__.<locals>.<genexpr> sI���� � ��Q���y�(�  �� � � � � � � r})r�!_expression_collection_was_a_listr=�dictlike_iteritemsrYr|ror�rr*r}�next�reversedr�rr�r rf)r�ror}r|� new_whensrps` rzr_z Case.__init__� s1���$-�#N� �V�U�$ �$ � � ��/� �:�:�I�I��� � � � �D� ����  �  �  �  �$�  �  �  �� � �=��D�J�J�"�)�%�*E�u�M�M�D�J� � �"�)�%�*E�u�M�M�D�J�J��D�J�� � �!)��� 4� 4�  � � � $�z�5�D�J�O�O�8�;L�  �  ����U�O�O�� � � s �.� ;�;rtr�c�p�ttjd�|���D�����S)Nc��g|] }|j�� Srxr)r��xs rzr�z&Case._from_objects.<locals>.<listcomp>, s��K�K�K�!�a�o�K�K�Kr})r�r�r�r�r�s rzr�zCase._from_objects) s9��� �O�K�K�t�7H�7H�7J�7J�K�K�K� L� � � r})r|r~rorr}rrc)r�r�r�r�r�r7�dp_clauseelement�dp_clauseelement_tuplesrFrgr_r=rr�rxr}rzrzrz� s����������.�N� �#�4�5� �#�;�<� �#�4�5�3������F�E�E�E�&�&�&�&�'�'�'�'� $�#�1$�1$�1$�1$�1$�1$�f �"� � � �#�"� � � r}rzc��eZdZUdZdZdejfdejfgZde d<de d<de d<d e d <dd�Z e j dd���Z ed���ZdS)raORepresent a ``CAST`` expression. :class:`.Cast` is produced using the :func:`.cast` factory function, as in:: from sqlalchemy import cast, Numeric stmt = select(cast(product_table.c.unit_price, Numeric(10, 4))) Details on :class:`.Cast` usage is at :func:`.cast`. .. seealso:: :ref:`tutorial_casts` :func:`.cast` :func:`.try_cast` :func:`.type_coerce` - an alternative to CAST that coerces the type on the Python side only, which is often sufficient to generate the correct SQL and data coercion. r r�r�r\rFr�r�r~rr�r�rprqc���tj|��|_tjt j||j|���|_t|j��|_ dS�N)rpr�) rr+r�rr�rr*r�r~r�r�r�rps rzr_z Cast.__init__U sW�� �(��/�/�� ��&� � '� ��)�"&�  � � �� � %�T�Y�/�/����r}rtr�c��|jjSrw�r�r�r�s rzr�zCast._from_objectsc � ���{�(�(r}c��|jSrw�r�r�s rzr8zCast.wrapped_column_expressiong � ���{�r}N�r�r�rprqrc)r�r�r�r�r�r7r�ryrFrgr_r=rr�r}r8rxr}rzrr0 s����������2�N� �$�5�6� �"�*�+�3������ ������������ 0� 0� 0� 0� �"�)�)�)�#�"�)�����X���r}rc��eZdZdZdZdZdS)�TryCastz�Represent a TRY_CAST expression. Details on :class:`.TryCast` usage is at :func:`.try_cast`. .. seealso:: :func:`.try_cast` :ref:`tutorial_casts` �try_castTN)r�r�r�r�r�rkrxr}rzr�r�l s$������ � � �N��M�M�Mr}r�c���eZdZUdZdZdejfdejfgZde d<de d<de d<dd �Z e j dd���Z ejd���Zed���Z ddd�ZdS)� TypeCoerceaRepresent a Python-side type-coercion wrapper. :class:`.TypeCoerce` supplies the :func:`_expression.type_coerce` function; see that function for usage details. .. seealso:: :func:`_expression.type_coerce` :func:`.cast` � type_coercer�r�r\rFr�r�r�r�rprqc��tj|��|_tjt j||j|���|_dSr�)rr+r�rr�rr*r�r�s rzr_zTypeCoerce.__init__� sD�� �(��/�/�� ��&� � '� ��)�"&�  � � �� � � r}rtr�c��|jjSrwr�r�s rzr�zTypeCoerce._from_objects� r�r}c��t|jt��r'|j���}|j|_|S|jSrw)r�r�r�r&r�)r��bps rz�typed_expressionzTypeCoerce.typed_expression� s?�� �d�k�=� 1� 1� ���#�#�%�%�B��i�B�G��I��;� r}c��|jSrwr�r�s rzr8z$TypeCoerce.wrapped_column_expression� r�r}Nr,r-�TypeCoerce[_T]c�x�|j�|���}||jurt||j��S|Sr�)r�r0r�r�)r�r,rVs rzr0zTypeCoerce.self_group� s@���+�(�(��(�9�9�� �$�+� %� %��g�t�y�1�1� 1��Kr}r�rcrw)r,r-rtr�)r�r�r�r�r�r7r�ryrFrgr_r=rr�r,r�r�r}r8r0rxr}rzr�r�| s������� � �#�N� �$�5�6� �"�*�+�3������ ��������  �  �  �  � �"�)�)�)�#�"�)��#���$�#������X��15�������r}r�c��eZdZUdZdZdejfdejfgZde d<de d<de d<dd �Z e j dd ���Z dS)�Extractz=Represent a SQL EXTRACT clause, ``extract(field FROM expr)``.�extract�expr�fieldr\rFr�r�r�c�~�tj|_||_t jt j|��|_dSrw) r� INTEGERTYPEr�r�rr�rr*r�)r�r�r�s rzr_zExtract.__init__� s.���(�� ��� ��$�U�%@�$�G�G�� � � r}rtr�c��|jjSrw)r�r�r�s rzr�zExtract._from_objects� s ���y�&�&r}N)r�r�r�r�rc)r�r�r�r�r�r7r�r�rFrgr_r=rr�rxr}rzr�r�� s��������G�G��N� �"�3�4� �#�-�.�3������ �����J�J�J�H�H�H�H�  �"�'�'�'�#�"�'�'�'r}r�c�j�eZdZUdZdZdejfgZded<ded<d d�Z e j d d ���Z d S)�_label_referencea�Wrap a column expression as it appears in a 'reference' context. This expression is any that includes an _order_by_label_element, which is a Label, or a DESC / ASC construct wrapping a Label. The production of _label_reference() should occur when an expression is added to this context; this includes the ORDER BY or GROUP BY of a SELECT statement, as well as a few other places, such as the ORDER BY within an OVER clause. �label_reference�elementr\rFr�c��||_dSrw�r��r�r�s rzr_z_label_reference.__init__� � ���� � � r}rtr�c��gSrwrxr�s rzr�z_label_reference._from_objects� r�r}N)r�r�rc) r�r�r�r�r�r7r�rFrgr_r=rr�rxr}rzr�r�� s�������� � �'�N� �%�6�7�3�������������� �"����#�"���r}r�c�\�eZdZUdZdejfgZded<d d�Ze j d d ���Z d S) �_textual_label_reference�textual_label_referencer�r\rFr�c��||_dSrwr�r�s rzr_z!_textual_label_reference.__init__� r�r}rtr�c�*�t|j��Srw)r�r�r�s rz� _text_clausez%_textual_label_reference._text_clause� s���$�,�'�'�'r}N)r�r�)rtr�) r�r�r�r�r7r�rFrgr_r=rdr�rxr}rzr�r�� s}�������.�N� �%�/�0�3���������� ��(�(�(���(�(�(r}r�c�N�eZdZUdZdZdejfdejfdejfgZde d<de d< d&d'd�Z e d(d���Z e d(d���Z e d)d���Ze d)d���Ze d*d���Ze d*d���Zed+d���Zejd,d!���Zd"�Z d-d.d%�Zd S)/rTa�Define a 'unary' expression. A unary expression has a single column expression and an operator. The operator can be placed on the left (where it is called the 'operator') or right (where it is called the 'modifier') of the column expression. :class:`.UnaryExpression` is the basis for several unary operators including those used by :func:`.desc`, :func:`.asc`, :func:`.distinct`, :func:`.nulls_first` and :func:`.nulls_last`. �unaryr�rP�modifierr\rFr�NFr�r-rpr�r�rsc���||_||_|j|_|�|jp|j���|_t j|��|_||_dSr�) rPr�r�r0r�rr+r�r�)r�r�rPr�rpr�s rzr_zUnaryExpression.__init__sg��!�� � �� � '� 8����)�)��M�2�T�]�*� � �� � �(��/�/�� �'>��$�$�$r}�column�_ColumnExpressionArgument[_T]rt�UnaryExpression[_T]c�t�ttjtj|��t jd���S�NF)r�r�)rTrr�r�ByOfRoler�nulls_first_op�r�r�s rz�_create_nulls_firstz#UnaryExpression._create_nulls_first,s6�� � � �U�^�V� 4� 4��-�$)� � � � r}c�t�ttjtj|��t jd���Sr�)rTrr�rr�r� nulls_last_opr�s rz�_create_nulls_lastz"UnaryExpression._create_nulls_last7s6�� � � �U�^�V� 4� 4��,�$)� � � � r}�'_ColumnExpressionOrStrLabelArgument[_T]c�t�ttjtj|��t jd���Sr�)rTrr�rr�r�desc_opr�s rz� _create_desczUnaryExpression._create_descBs6��� � �U�^�V� 4� 4��&�$)� � � � r}c�t�ttjtj|��t jd���Sr�)rTrr�rr�r�asc_opr�s rz� _create_asczUnaryExpression._create_ascLs6�� � � �U�^�V� 4� 4��%�$)� � � � r}r�c��tjtj|��}t |t j|jd���S�NF�rPrpr�)rr�rr*rTr� distinct_opr��r�r��col_exprs rz�_create_distinctz UnaryExpression._create_distinctWsH�� '0�&6� � '��' �' ��� ��*��-�$)�  � � � r}c��tjtj|��}t |t j|jd���Sr�)rr�rr*rTr�bitwise_not_opr�r�s rz�_create_bitwise_notz#UnaryExpression._create_bitwise_notfsH�� '0�&6� � '��' �' ��� ��-��-�$)�  � � � r}r�c�P�tj|j��r |jjSdSrw)r�is_order_by_modifierr�r�r�r�s rzr�z'UnaryExpression._order_by_label_elementus'�� � )�$�-� 8� 8� ��<�7� 7��4r}r�c��|jjSrw�r�r�r�s rzr�zUnaryExpression._from_objects|� ���|�)�)r}c��|jjtjjurJt |�t j���t jtj|j���St� |��S)NrOr�) r�r�rr�rTr0rrRr�r�rLr�s rzrLzUnaryExpression._negate�si�� �9� #�x�';�'J� J� J�"���� � ��6�6�"���*�(,�(D� ��� �!�(�(��.�.� .r}r,rc�f�|jr)tj|j|��rt|��S|Srw)rPrrr�r/s rzr0zUnaryExpression.self_group�s5�� �=� �Y�3�D�M�7�K�K� ��D�>�>� !��Kr})NNNF) r�r�rPr-r�r-rpr�r�rs)r�r�rtr�)r�r�rtr�)r�r�rtr�rbrcrwr")r�r�r�r�r�r7r�rrFrgr_r�r�r�r�r�r�r�r}r�r=rr�rLr0rxr}rzrTrT� s�������� � ��N� �%�6�7� �&�2�3� �&�2�3�3������ ���� ,0�+/�37�(-� ?�?�?�?�?�*� � � ��[� �� � � ��[� �� � � ��[� �� � � ��[� ��  �  �  ��[�  ��  �  �  ��[�  ������X��  �"�*�*�*�#�"�*� /� /� /�15�������r}rTc�V�eZdZdZdZdZed d���Zed d���Zd �Z d �Z d S) �CollectionAggregatea Forms the basis for right-hand collection operator modifiers ANY and ALL. The ANY and ALL keywords are available in different ways on different backends. On PostgreSQL, they only work for an ARRAY type. On MySQL, they only work for subqueries. Tr�r�rt�CollectionAggregate[bool]c��tjtj|��}|���}t |t jtj d���Sr�) rr�rr*r0r�rr�rr�r�s rz� _create_anyzCollectionAggregate._create_any��[��'0�&6� � '� �' �' ���&�&�(�(��"� ��%��&�$)�  � � � r}c��tjtj|��}|���}t |t jtj d���Sr�) rr�rr*r0r�rr�rr�r�s rz� _create_allzCollectionAggregate._create_all�r�r}c��tj|��stjd���d|d<|jjtj|��g|�Ri|��S)N�2Only comparison operators may be used with ANY/ALLT�reverse)rr�r;r�r�r��mirrorr�s rzr�zCollectionAggregate.operate�si���&�r�*�*� ��#�D��� �!��y��&�t��&�y�'7��';�';�N�e�N�N�N�v�N�N�Nr}c �V�tj|��rJ�tjd���)Nr�)rr�r;r�r�s rzr�z#CollectionAggregate.reverse_operate�s1���*�2�.�.�.�.�.��� @� � � r}N)r�r�rtr�) r�r�r�r�rkr�r�r�r�r�r�rxr}rzr�r��s����������M�#���  �  �  ��[�  ��  �  �  ��[�  �$O�O�O� � � � � r}r�c�>�eZdZdZd�Zed���Zd d d �Zd �ZdS) r�Tc��||_tj|_||_||_d|_d|_|j|_dS�NT) r�rr�r�rPrr�r�r/)r�r�rPrs rzr_zAsBoolean.__init__�sA���� ��(�� � �� ��� ��� �'+��$�&-�&D��#�#�#r}c��|jSrwr�r�s rzr8z#AsBoolean.wrapped_column_expression�s ���|�r}Nr,r-rtrBc��|Srwrxr/s rzr0zAsBoolean.self_group����� r}c��t|jttf��r|j���St |j|j|j��Srw)r�r�r�r�rLr�rrPr�s rzrLzAsBoolean._negate�sG�� �d�l�U�F�O� 4� 4� G��<�'�'�)�)� )��T�\�4�;�� �F�F� Fr}rwrx) r�r�r�rkr_r}r8r0rLrxr}rzr�r��ss�������M�E�E�E�����X�������G�G�G�G�Gr}r�c�j�eZdZUdZdZdejfdejfdejfdejfdejfdej fgZ d e d <dejfdejfdejfdejfdej fgZ d Z d e d<d e d<d e d< ddd�Zed d���Zd�Zejrd!d�Zejd"d���Zd�ZdS)#ra�Represent an expression that is ``LEFT <operator> RIGHT``. A :class:`.BinaryExpression` is generated automatically whenever two column expressions are used in a Python binary expression: .. sourcecode:: pycon+sql >>> from sqlalchemy.sql import column >>> column("a") + column("b") <sqlalchemy.sql.expression.BinaryExpression object at 0x101029dd0> >>> print(column("a") + column("b")) {printsql}a + b �binaryrrrPrrr�r\rFTrr�NrPrpr�r-c���t|t��rtj|��}|���|���f|_|jp|j|_|�|���|_|�|���|_ ||_ tj |��|_ ||_tj|��|_|� i|_dS||_dSr�)r�r�r� custom_opr��_origr�r0rrrPrr+r�rr�r/r)r�rrrPrprrs rzr_zBinaryExpression.__init__$s��� �h�� $� $� 5� �*�8�4�4�H��m�m�o�o�u�~�~�'7�'7�8�� � $� 5� O��9O����O�O�H�O�5�5�� ��%�%�h�%�7�7�� � �� ��(��/�/�� ��� �&/�&:�8�&D�&D��#� � ��D�N�N�N�&�D�N�N�Nr}rtrc��|j|jfSrw)rrr�s rzrz,BinaryExpression._flattened_operator_clausesCs��� �4�:�&�&r}c�|�|jtjtjfvr|j|j�St d���)aImplement Python-side "bool" for BinaryExpression as a simple "identity" check for the left and right attributes, if the operator is "eq" or "ne". Otherwise the expression continues to not support "bool" like all other column expressions. The rationale here is so that ColumnElement objects can be hashable. What? Well, suppose you do this:: c1, c2 = column("x"), column("y") s1 = set([c1, c2]) We do that **a lot**, columns inside of sets is an extremely basic thing all over the ORM for example. So what happens if we do this? :: c1 in s1 Hashing means it will normally use ``__hash__()`` of the object, but in case of hash collision, it's going to also do ``c1 == c1`` and/or ``c1 == c2`` inside. Those operations need to return a True/False value. But because we override ``==`` and ``!=``, they're going to get a BinaryExpression. Hence we implement ``__bool__`` here so that these comparisons behave in this particular context mostly like regular object comparisons. Thankfully Python is OK with that! Otherwise we'd have to use special set classes for columns (which we used to do, decades ago). rX)rPr�eq�ner�rYr�s rzrZzBinaryExpression.__bool__Is<��< �=�Y�\�9�<�8� 8� 8�!�4�=�$�*�-� -��I�J�J� Jr}r��BinaryExpression[_T]c��dSrwrxr�s rzrMzBinaryExpression.__invert__qs��#&�3r}r�c�4�|jj|jjzSrw)rr�rr�s rzr�zBinaryExpression._from_objectsus���y�&���)A�A�Ar}c���|j�Qt|j|j�|j|j��|j|j|j|j���S|���� ��S)N)rrpr) rrrrr�rPr�rr0rLr�s rzrLzBinaryExpression._negateysq�� �;� "�#�� �� �,�,�T�[�$�-�H�H�� ��}��i��.� ��� ��?�?�$�$�,�,�.�.� .r})NNN) rr�rr�rPrPrpr�rr-rrr#)r�rrtrrc)r�r�r�r�r�r7r�rrzryrFrgr�r/r_r}rrZr~rrMr=rr�rLrxr}rzrr�s�������� � ��N� �"�3�4� �#�4�5� �&�2�3� �$�0�1� �'�5�6� � � %� � 3�� � � � � �"�3�4� �#�4�5� �&�2�3� �'�5�6� � � %� � ��"��� +�*�*�*���������48�)-�15�'�'�'�'�'�>�'�'�'��X�'� $K�$K�$K�L��'� '� '� '� '� �"�B�B�B�#�"�B� /� /� /� /� /r}rc�h�eZdZUdZdZdejfdejfdejfgZded<dd �Z ddd�Z dS)�Slicez�Represent SQL for a Python array-slice object. This is not a specific SQL construct at this level, but may be interpreted by specific dialects, e.g. PostgreSQL. �slice�start�stop�stepr\rFNc�N�tjtj||tj���|_tjtj||tj���|_tjtj||tj���|_tj |_ dS)N)r�rp) rr�rr*rr�r r r r�r�)r�r r r �_names rzr_zSlice.__init__�s����%� � '� ���&�  � � �� � �$� � '� ���&�  � � �� � �$� � '� ���&�  � � �� � �%�� � � r}r,r-rtrBc�&�|tjusJ�|Srw)rP�getitemr/s rzr0zSlice.self_group�s���(�*�*�*�*�*�� r}rwrx) r�r�r�r�r�r7r�rFrgr_r0rxr}rzr r �s�����������N� �#�4�5� �"�3�4� �"�3�4�3������ &�&�&�&�*������r}r c��eZdZdZdZdS)�IndexExpressionzJRepresent the class of expressions that are like an "index" operation.TN)r�r�r�r�rkrxr}rzrr�s���������M�M�Mr}rc�2�eZdZUdZdZded<d d d �Zd �ZdS)�GroupedElementz&Represent any parenthesized expression�groupingr�r�Nr,r-rtrBc��|Srwrxr/s rzr0zGroupedElement.self_group�r�r}c�4�|j���Srw)r�r2r�s rzr2zGroupedElement._ungroup�s���|�$�$�&�&�&r}rwrx)r�r�r�r�r�rgr0r2rxr}rzrr�sU�������0�0��N����������'�'�'�'�'r}rc��eZdZUdZdejfdejfgZded<dejfgZ ded<dd�Z d�Z e j d ���Ze jdd ���Ze jdd���Ze jdd���Zd�Zd�Zd�Zer ddd�ZdSdS)r�z/Represent a grouping within a column expressionr�r�r\rF�0Union[TextClause, ClauseList, ColumnElement[_T]]c�l�||_t|dtj��|_|j|_dS)Nr�)r�r�rr�r�r�r�s rzr_zGrouping.__init__�s4���� ��G�V�X�->�?�?�� � '� 8����r}c�\�|�|j�|����Srw)r�r�r�r�s rzr�z"Grouping._with_binary_element_type�s$���~�~�d�l�D�D�U�K�K�L�L�Lr}c��|jjSrw�r�r/r�s rzr/zGrouping._is_implicitly_boolean�� ���|�2�2r}rtr�c�<�t|jdd��p|jSr")r�r�r�r�s rzr�zGrouping._tq_label�s"�� �D�L�+�t� 4� 4� M��8M� r}r�c�J�t|jt��r|jgSgSrw)r�r�rSr�s rzr�zGrouping._proxies�s%�� �d�l�M� 2� 2� ��L�>� !��Ir}r�c��|jjSrwr�r�s rzr�zGrouping._from_objects�r�r}c�,�t|j|��Srw)r�r�)r��attrs rzr�zGrouping.__getattr__�s���t�|�T�*�*�*r}c� �|j|jd�S)N�r�r�r&r�s rzr�zGrouping.__getstate__�s���<���;�;�;r}c�:�|d|_|d|_dS)Nr�r�r&r�s rzr�zGrouping.__setstate__�s���Y�'�� ��&�M�� � � r}Nr,r-rBc��dSrwrxr/s rzr0zGrouping.self_groups���3r})r�rrar(rcrwrx)r�r�r�r�r7r�ryrFrgr�r_r�r=rdr/r{r�r�rr�r�r�r�rr0rxr}rzr�r��s��������9�9� �%�6�7� �"�*�+�3������ �%�6�7���>�=�=�=�9�9�9�9�M�M�M� ��3�3���3� �� � � � �� �  ����� ���  �"�*�*�*�#�"�*�+�+�+�<�<�<�"�"�"���59� � � � � � � ��r}r�c�&�eZdZdZdZdd�Zdd �ZdS)�_OverrideBindsaused by cache_key->_apply_params_to_element to allow compilation / execution of a SQL element that's been cached, using an alternate set of bound parameter values. This is used by the ORM to swap new parameter values into expressions that are embedded into loader options like with_expression(), selectinload(). Previously, this task was accomplished using the .params() method which would perform a deep-copy instead. This deep copy proved to be too expensive for more complex expressions. See #11085 �override_bindsr�r�rr �replaces_paramsc�R�||_d�t||��D��|_dS)Nc�.�i|]\}}|j|j��Srx)rro)r�r�r�s rzr�z+_OverrideBinds.__init__.<locals>.<dictcomp>s/�� � � �#�q�!�A�E�1�7� � � r})r�rn� translate)r�r�rr,s rzr_z_OverrideBinds.__init__s9�� �� � � �'*�?�J�'G�'G� � � ����r}r]�List[BindParameter[Any]]rt� Optional[typing_Tuple[Any, ...]]c���g}�j�||��}|��fd�|D����|S)ztgenerate a cache key for the given element, substituting its bind values for the translation values present.c3��K�|]<}|j�jvr(|��j|jdd���n|V��=dS)TF)r%r"N)rr/rb)r�r�r�s �rzr�z0_OverrideBinds._gen_cache_key.<locals>.<genexpr>+sw�����  �  ���6�T�^�+�+�����N�2�6�*��������  �  �  �  �  �  r})r�rq�extend)r�r]r� existing_bps�cks` rzrqz_OverrideBinds._gen_cache_key"sh��� 24� � �\� (� (��<� @� @�����  �  �  �  �#�  �  �  � � � �� r}N)r�r�rr r,r )r]r]rr0rtr1)r�r�r�r�r�r_rqrxr}rzr*r*sM������ � �&�N�  �  �  �  ������r}r*c��eZdZdZdZdS)� _OverRangerrN)r�r�r��RANGE_UNBOUNDED� RANGE_CURRENTrxr}rzr8r89s�������O��M�M�Mr}r8c��eZdZUdZdZdejfdejfdejfdejfdejfgZde d <d Z d e d<d Z d e d<d e d< d e d<d e d< ddd�Z d�Z dd�Zesejdd���Zejdd���Zd S)�OveraRepresent an OVER clause. This is a special operator against a so-called "window" function, as well as any aggregate function, which produces results relative to the result set itself. Most modern SQL backends now support window functions. �overr��order_by� partition_by�range_�rowsr\rFN�Optional[ClauseList]r�z0Optional[typing_Tuple[_IntOrRange, _IntOrRange]]�Optional[_ByArgument]�4Optional[typing_Tuple[Optional[int], Optional[int]]]c��||_|�-ttj|��dtji�|_|�-ttj|��dtji�|_|r9|�|��|_ |rtj d���d|_ dS|r#|�|��|_ d|_ dSdx|_ |_ dS)Nr�z*'range_' and 'rows' are mutually exclusive) r�r�r=�to_listrr�r>r?�_interpret_ranger@r;r�rA)r�r�r?r>r@rAs rzr_z Over.__init__bs����� � � �&���h�'�'��?D�~���D�M� � #� *���l�+�+�!�&+�n�!�!�D� � � +��/�/��7�7�D�K�� !��'�@����!�� � � � � +��-�-�d�3�3�D�I��D�K�K�K�&*� *�D�I�� � � r}c�P�|j|j|j|j|j|jffSrw)r�r�r?r>r@rAr�s rz� __reduce__zOver.__reduce__�s0���~� �L� � � �M� �K� �I�  � � r}�:typing_Tuple[Optional[_IntOrRange], Optional[_IntOrRange]]rt�&typing_Tuple[_IntOrRange, _IntOrRange]c�(�t|t��rt|��dkrtjd���|\}}|�t }n]t|t ��r|}nE t|��}|dkrt}n'#t$r}tjd��|�d}~wwxYw|�t }n]t|t ��r|}nE t|��}|dkrt}n'#t$r}tjd��|�d}~wwxYw||fS)Nr:z2-tuple expected for range/rowsrz(Integer or None expected for range value) r�r>r�r;r�r9r8r�r:� ValueError)r�r@�r0�r1�lowerr��uppers rzrGzOver._interpret_range�sV���&�%�(�(� G�C��K�K�1�,<�,<��#�$E�F�F� F����B� �:�#�E�E� ��J� '� '� *��E�E� *��B���� �A�:�:�)�E��� � � � ��'�>��������� ���� �:�#�E�E� ��J� '� '� *��E�E� *��B���� �A�:�:�)�E��� � � � ��'�>��������� �����e�|�s0�%B� B&� B!�!B&� C)�) D �3D�D r�c��|jjSrwr&r�s rzr�z Over.type�s ���<�$� $r}r�c�p�ttjd�|j|j|jfD�����S)Nc� �g|] }|�|j�� Srwrr�s rzr�z&Over._from_objects.<locals>.<listcomp>��'�������}��O�$�}�}r})r�r�r�r�r?r>r�s rzr�zOver._from_objects�sH��� �O���"�l�D�,=�t�}�M���� � � � r}�NNNN) r�r�r?rCr>rCr@rDrArD)r@rJrtrKr)rc)r�r�r�r�r�r7r�r{rFrgr>r?r_rIrGrr=rdr�rr�rxr}rzr<r<Dsl����������N� �%�6�7� �&�7�8� �*�;�<� �$�1�2� �"�/�0� 3������&*�H�)�)�)�)�)-�L�-�-�-�-������=�<�<�<�:�:�:�:� /3�*.�GK�EI� +�+�+�+�+�B � � �*�*�*�*�X �%� � � %� %� %� � � %� �"�  �  �  �#�"�  �  �  r}r<c���eZdZUdZdZdejfdejfgZded<dZ ded<d#d �Z d �Z ddddd �d$d�Z e d%d���Ze d&d���Zd'd�Zesejd(d ���Zejd)d"���ZdS)*� WithinGroupa%Represent a WITHIN GROUP (ORDER BY) clause. This is a special operator against so-called "ordered set aggregate" and "hypothetical set aggregate" functions, including ``percentile_cont()``, ``rank()``, ``dense_rank()``, etc. It's supported only by certain database backends, such as PostgreSQL, Oracle Database and MS SQL Server. The :class:`.WithinGroup` construct extracts its type from the method :meth:`.FunctionElement.within_group_type`. If this returns ``None``, the function's ``.type`` is used. � withingroupr�r>r\rFNrB�.Union[FunctionElement[_T], FunctionFilter[_T]]r�c�v�||_|�/ttj|��dtji�|_dSdS)Nr�)r�r�r=rFrr�r>)r�r�r>s rzr_zWithinGroup.__init__�sE�� �� � � �&���h�'�'��?D�~���D�M�M�M� � r}c�\�|j|jf|j�t|j��ndzfSr�)r�r�r>r>r�s rzrIzWithinGroup.__reduce__�s5���~�� ��$(�M�$=�E�$�-� � � �2� � � r})r?r>rAr@r?rCrArDr@rt�Over[_T]c�*�t|||||���S)z�Produce an OVER clause against this :class:`.WithinGroup` construct. This function has the same signature as that of :meth:`.FunctionElement.over`. �r?r>r@rA�r<)r�r?r>rAr@s rzr=zWithinGroup.over�s*��� �%����  � � � r}rBc��dSrwrxr�s rz�filterzWithinGroup.filter s��!�cr}�_WithinGroup__criterion0r[� criterion�FunctionFilter[_T]c��dSrwrx)r�rcrds rzrbzWithinGroup.filters �� !�Sr}�Union[Self, FunctionFilter[_T]]c�$�|s|St|g|�R�S)z.Produce a FILTER clause against this function.)�FunctionFilter)r�rds rzrbzWithinGroup.filters'��� ��K��d�/�Y�/�/�/�/r}r�c�V�|j�|��}|�|S|jjSrw)r��within_group_typer�)r��wgts rzr�zWithinGroup.type s,���,�0�0��6�6�C���� ��|�(�(r}r�c�d�ttjd�|j|jfD�����S)Nc� �g|] }|�|j�� Srwrr�s rzr�z-WithinGroup._from_objects.<locals>.<listcomp>,rUr})r�r�r�r�r>r�s rzr�zWithinGroup._from_objects(sC��� �O���"�l�D�M�:���� � � � r})r�rZr>r�) r?rCr>rCrArDr@rDrtr])rtrB)rcr[rdr[rtre)rdr[rtrgr)rc)r�r�r�r�r�r7r�rFrgr>r_rIr=rrbrr=rdr�rr�rxr}rzrXrX�sY��������� #�N� �%�6�7� �&�7�8�3������ &*�H�)�)�)�)� � � � � � � �/3�*.�EI�GK�  � � � � � �.�!�!�!��X�!� �!�!�!��X�!� 0�0�0�0� �)� � � )� )� )� � � )� �"�  �  �  �#�"�  �  �  r}rXc���eZdZUdZdZdejfdejfgZded<dZ ded<d%d �Z e d&d���Z d'd(d�Z d)d�Zd*d�Z d+d,d �Zesejd-d"���Zejd.d$���ZdS)/ria�Represent a function FILTER clause. This is a special operator against aggregate and window functions, which controls which rows are passed to it. It's supported only by certain database backends. Invocation of :class:`.FunctionFilter` is via :meth:`.FunctionElement.filter`:: func.count(1).filter(True) .. seealso:: :meth:`.FunctionElement.filter` � funcfilter�funcrdr\rFNrV�+Union[FunctionElement[_T], WithinGroup[_T]]r[c�:�||_|jj|g|�R�dSrw)rqrb�non_generative)r�rqrds rzr_zFunctionFilter.__init__Ps.�� �� �"�� �"�4�4�)�4�4�4�4�4�4r}rtrBc��t|��D]?}tjtj|��}|j�|j|z|_�8||_�@|S)a Produce an additional FILTER against the function. This method adds additional criteria to the initial criteria set up by :meth:`.FunctionElement.filter`. Multiple criteria are joined together at SQL render time via ``AND``. )r�rr�rr rd)r�rd�crits rzrbzFunctionFilter.filterXsT����O�O� &� &�D��#�E�$9�4�@�@�D��~�)�!%��$�!6����!%����� r}r?�YOptional[Union[Iterable[_ColumnExpressionArgument[Any]], _ColumnExpressionArgument[Any]]]r>r@rDrAr]c�*�t|||||���S)a�Produce an OVER clause against this filtered function. Used against aggregate or so-called "window" functions, for database backends that support window functions. The expression:: func.rank().filter(MyClass.y > 5).over(order_by="x") is shorthand for:: from sqlalchemy import over, funcfilter over(funcfilter(func.rank(), MyClass.y > 5), order_by="x") See :func:`_expression.over` for a full description. r_r`)r�r?r>r@rAs rzr=zFunctionFilter.overos+��F� �%����  � � � r}r��WithinGroup[_T]c��t|g|�R�S)zUProduce a WITHIN GROUP (ORDER BY expr) clause against this function. )rX)r�r>s rz� within_groupzFunctionFilter.within_group�s�� �4�+�(�+�+�+�+r}r{r�c��dSrwrx)r�r{s rzrkz FunctionFilter.within_group_type�s ���tr}r,r-rc�b�tjtj|��rt|��S|Srw)rr� filter_opr�r/s rzr0zFunctionFilter.self_group�s-�� � !�)�"5�w� ?� ?� ��D�>�>� !��Kr}r�c��|jjSrw)rqr�r�s rzr�zFunctionFilter.type�s ���9�>� !r}r�c�d�ttjd�|j|jfD�����S)Nc� �g|] }|�|j�� Srwrr�s rzr�z0FunctionFilter._from_objects.<locals>.<listcomp>�rUr})r�r�r�rqrdr�s rzr�zFunctionFilter._from_objects�sC��� �O���"�i���8���� � � � r})rqrrrdr[)rdr[rtrBrV) r?rwr>rwr@rDrArDrtr])r>r�rtry)r{ryrtr�rwr"r)rc)r�r�r�r�r�r7r�rFrgrdr_r(rbr=r{rkr0rr=rdr�rr�rxr}rzriri5sd���������""�N� �"�3�4� �'�8�9�3������ 04�I�3�3�3�3�5�5�5�5������[��: � �GK�EI�) �) �) �) �) �V,�,�,�,����� 15������ �"� � � "� "� "� � � "� �"�  �  �  �#�"�  �  �  r}ric��eZdZUdZdZded<ded<ded<d�Zejd+d ���Z e j d,d ���Z e j d,d ���Z e j d���Ze j d���Z d-d.d�Z d/d0d�Zdddddd�d1d*�ZdS)2� NamedColumnFN�Optional[FromClause]�tabler�r�rc��t|d��r|j|jkpt|d��o|j|jkS)Nr�r�)rKr�r�r�s rzr�z$NamedColumn._compare_name_for_result�sB����v�&�&�B�4�9�� �+B� � �E�8� $� $� D���� �)D� r}rtc��|jSrw�r�r�s rzr�zNamedColumn.description�� ���y�r}r�c�b�|j}|r ||jkr|�|��S|jS)z�table qualified label based on column key. for table-bound columns this is <tablename>_<column key/proxy key>; all other expressions it resolves to key/proxy key. )r�r�� _gen_tq_labelr�)r�r�s rzr�zNamedColumn._tq_key_label�s;���O� � � "��d�i�/�/��%�%�i�0�0� 0��>� !r}c�6�|�|j��S)z�table qualified label based on column name. for table-bound columns this is <tablename>_<columnname>; all other expressions it resolves to .name. �r�r�r�s rzr�zNamedColumn._tq_label�s���!�!�$�)�,�,�,r}c��dSr�rxr�s rzr-z+NamedColumn._render_label_in_columns_clause�r�r}c��|jSrwr�r�s rzr�zNamedColumn._non_anon_label�r�r}T� dedupe_on_keyrsc��|Srwrx)r�r�r�s rzr�zNamedColumn._gen_tq_label�s ��� r}rPrPr�rrpr�r�ruc �B�t|j|||j|d|���S)NT)r�r�rprr�)r�rr�r�s rzr�zNamedColumn._bind_param�s4��� �H� �"*�"�i���� � � � r}�r�rr�r��disallow_is_literalr�rVr�rJr�r�r�r�r�r�r�r�c �t�t|r&tjtj|p|j��n|p|j|j|d���} |j| _|� |j| _|rt|��| _ n|g| _ |j �)|j j � | j��| _ | j| fS)NF�rpr�r�)r�rr�rr�r�r�r�rr�r�r�r�r?) r�r�r�r�r�rr�r�r�r�r�s rzr�zNamedColumn._make_proxys��� �'�)� � ��!9�4�;L�4�9�M�M�M��'�d�i��)�"�� � � ��(�8��� �<��H�A�E� � ��2�3�3�A�J�J���A�J� � "� .�'�4�<�@�@���G�G�A�N��u�a�x�r}r�ra�T�r�r�r�rsrtr�r!) rPrPr�rrpr�r�rsrtru�r�rVr�rJr�r�r�r�rr�r�rsr�r�r�rsr�rrtr�)r�r�r�r�r�rgr�r=rfr�r,r�r�r�r-r�r�r�r�rxr}rzr�r��se��������J�"&�E�&�&�&�&� �I�I�I� �H�H�H� � � �  ���������#� "� "� "�$�#� "��#�-�-�-�$�#�-��#���$�#���#���$�#��04������+/��  � � � � �.#�!�$)�GK�$)�"�"�"�"�"�"�"�"r}r��_PSc���eZdZUdZdZdejfdejfdejfgZ de d<dejfdejfgZ de d<d e d< d=d>d�Z d�Z ejd���Zd?d�Zejd���Zejd���Zed���Zejd@d���Zd=dAd�Zd�ZdBd%�Zed&���Zed'���Zedd(�dCd/�Zej dDd1���Z!d d d2�dEd<�Z"d S)Frz�Represents a column label (AS). Represent a label, as typically applied to any column-level element using the ``AS`` sql keyword. rr�r��_elementr\rFr�r�Nr�r�r�rpr�c��|}tjtj||���}t |t ��r|j}t |t ���|r||_n]t� t|��t|dd����|_t |t ��r |j |_ |jx|_x|_|_||_|�t%j|��n |jj|_|g|_dS)Nr�r�r )rr�rr*r�rr�r�r�rr^r�r��_resolve_labelrr�r�r�rr+r�r�)r�r�r�rp� orig_elements rzr_zLabel.__init__Hs�� � ��"� � '� �"&� � � �� ��%�(�(� &��o�G���%�(�(� &� � :��D�I�I�(�7�7��4���'�'�6�6�:�:���D�I��,��.�.� :�'3�&9��#�9=��B���B�4�>�D�$6��� �� � � �� '� '� '���#� � � !� �� � � r}c�8�|j|j|j|jffSrw)r�r�r�r�r�s rzrIzLabel.__reduce__os���~�� �4�=�$�)�D�D�Dr}c��dSr�rxr�s rzr-z%Label._render_label_in_columns_clauserr�r}Fc �8�td||||jd|���Sr�r�r�s rzr�zLabel._bind_paramvs0��� � �"*��"�i��� � � � r}c��|jjSrwrr�s rzr/zLabel._is_implicitly_boolean�rr}c��|jjSrw)r�r.r�s rzr.zLabel._allow_label_resolve�s ���|�0�0r}c��|Srwrxr�s rzr�zLabel._order_by_label_element�rwr}rtc�L�|j�tj���Sr�)r�r0r�as_r�s rzr�z Label.element�s���}�'�'� � �'�>�>�>r}r,r-rc�D�|�|jj|���Sr�)�_apply_to_innerr�r0r/s rzr0zLabel.self_group�s ���#�#�D�M�$<�g�#�N�N�Nr}c�@�|�|jj��Srw)r�r�rLr�s rzrLz Label._negate�s���#�#�D�M�$9�:�:�:r}�fn� Callable[_PS, ColumnElement[_T]]r>�_PS.argsr�� _PS.kwargsc�`�||i|��}||jurt|j||j���S|Sri)r�rr�r�)r�r�r>r�� sub_elements rzr�zLabel._apply_to_inner�s@�� �b�#�n��n�n� � �d�m� +� +����K�t�y�A�A�A� A��Kr}c��|jjSrw)r�r�r�s rzr�zLabel.primary_key�s ���|�'�'r}c��|jjSrw)r�r�r�s rzr�zLabel.foreign_keys�s ���|�(�(r})�clone�anonymize_labelsr�r[r�rsrr~c ��|���||jfi|��|_|r]t�t |��t |jdd����|_|jx|_x|_ |_ dSdS)Nr�r ) �_reset_memoizationsr�r�rr^r�r�r�rr�r�)r�r�r�r�s rz�_copy_internalszLabel._copy_internals�s��� � � �"�"�"���d�m�2�2�r�2�2�� � � G�(�7�7��4���'�$�,���?�?���D�I�>B�Y� F�D�H� F�t�~��(:�(:�(:�  G� Gr}r�c��|jjSrwr�r�s rzr�zLabel._from_objects�r�r})r�r�r�rVr�rJr�r�r�r�r�c ��|s|jn|}|j�||dt|t��|||���\}}||jkr6t|jt ��st jd|jz���|j|_|j � |��|j � |j |_ |j |fS)NT)r�r�r�r�r�r�z�Label name %s is being renamed to an anonymous label due to disambiguation which is not supported right now. Please use unique names for explicit labels.) r�r�r�r��_truncated_labelr�r;�InvalidRequestErrorr�r�r r�r) r�r�r�r�r�r�r�r�es rzr�zLabel._make_proxy�s���!%�.�t�y�y�$����)�)� �� $� *�4�1A� B� B�!5�#�%�*� � ���Q�" �$�)� � �J�t�y�:J�$K�$K� ��)�'�+/�)�5��� �(�8��� � ���$���� �9� ��Y�A�F��x��{�r}rw)r�r�r�r�rpr�r!rB)r,r-rtr)r�r�r>r�r�r�rtr)r�r[r�rsr�rrtr~rc)r�rVr�rJr�r�r�r�r�r�r�rrtr�)#r�r�r�r�r�r7rxryr�rFrgr�r_rIr,r�r-r�r=rdr/r.r}r�r�r0rLr�r�r�r&r�rr�r�rxr}rzrr0sp����������N� �"�/�0� �"�*�+� �&�7�8�3������ �"�/�0� �&�7�8���  ���� �I�I�I� 48� %"�%"�%"�%"�%"�NE�E�E��#���$�#��  �  �  �  � ��3�3���3��#�1�1�$�#�1�����X���#�?�?�?�$�#�?�O�O�O�O�O�;�;�;� � � � ��(�(��X�(��)�)��X�)� %+�!&� G� G� G� G� G� G� �"�*�*�*�#�"�*�#�GK�*�*�*�*�*�*�*�*r}rc���eZdZUdZded<ded<dZdejfdejfdej fdej fgZ d ed <d Z d ed <d Z d ed<d Zded<d Zded<dZed���Z d8d9d�Zdd�d�Ze�fd���Zd:�fd� Zed;d ���Zejd!���Zed"���Zd#�Z d<d=d'�Zd d dd dd(�d>d7�Z�xZ S)?r�a�Represents a column expression from any textual string. The :class:`.ColumnClause`, a lightweight analogue to the :class:`_schema.Column` class, is typically invoked using the :func:`_expression.column` function, as in:: from sqlalchemy import column id, name = column("id"), column("name") stmt = select(id, name).select_from("user") The above statement would produce SQL like: .. sourcecode:: sql SELECT id, name FROM user :class:`.ColumnClause` is the immediate superclass of the schema-specific :class:`_schema.Column` object. While the :class:`_schema.Column` class has all the same capabilities as :class:`.ColumnClause`, the :class:`.ColumnClause` class is usable by itself in those cases where behavioral requirements are limited to simple SQL expression generation. The object has none of the associations with schema-level metadata or with execution-time behavior that :class:`_schema.Column` does, so in that sense is a "lightweight" version of :class:`_schema.Column`. Full details on :class:`.ColumnClause` usage is at :func:`_expression.column`. .. seealso:: :func:`_expression.column` :class:`_schema.Column` r�r�rsr�r�r�r�r\rFNzOptional[DefaultGenerator]�onupdater�zOptional[FetchedValue]�server_default�server_onupdateFc�&�|jo |jdkSr�)r�r�r�s rzr|zColumnClause._is_star,s����3�4�9��#3�3r}r�r�rpr�r�c�p�|x|_|_||_tj|��|_||_dSrw)rr�r�rr+r�r�)r�r�rpr�r�s rzr_zColumnClause.__init__0s8�� $�#���4�9� �� ��(��/�/�� �$����r})� column_tablesc ��gSrwrx)r�r�r�s rzr�zColumnClause.get_children@s ��� r}c�P��|j� |jjSt��jSrw)r�r�r>)r�r�s �rzr�zColumnClause.entity_namespaceFs#��� �:� !��:�.� .��7�7�+� +r}c ����|rR|j�K|jjr?|�d��}||jfi|��}|j�|��}|St ��jdi|��S)Nr�rx)r�� _is_subqueryr�r��corresponding_columnr>r&)r�r&r�r�r��newr�s �rzr&zColumnClause._cloneMs���� � �� �&�� �'�'��F�F�7�O�O�E��E�$�*�+�+��+�+�E��'�.�.�t�4�4�C��J��u�w�w�~�#�#��#�#�#r}rtr�c��|j}|�|gSgSrw�r�)r��ts rzr�zColumnClause._from_objectsZs�� �J�� �=��3�J��Ir}c��|jduSrwr�r�s rzr-z,ColumnClause._render_label_in_columns_clausebs���z��%�%r}c�:�|�|jd���S)NF)r�r�r�s rz� _ddl_labelzColumnClause._ddl_labelfs���!�!�$�)�5�!�A�A�Ar}c�r�|jsR|j�K|jjs?t|d��r/t |t ��rZ|js|j� |jjr@t|d��r|j|jkpt|d��o|j|jkS|j� |j��S)Nr�r�r�) r�r�rorKr�r�r�r�r�r�r�s rzr�z%ColumnClause._compare_name_for_resultjs��� �O� @��z�!��z�%�"��5�+�.�.�"��5�,�/�/� "� �$� "��{�*��{�.�+� �E�6�*�*�F�t�y�E�J�/F����{�+�+�6��N�e�o�5� � �?�/�/���?�?� ?r}Tr�r�c��|j}|jrdS|��st|���rct|��r4|jr-|j�dd��dz|jzdz|z}n+trt|t��sJ�|jdz|z}t|��r9|j �2t|��r |j |_ ngt||j ��}nQt|j��r=|jj �1t|t��rJ�t||jj ��}|r;||j vr2|}d}||j vr#|dzt|��z}|dz }||j v�#|}tjt"j|��S|S)z�generate table-qualified label for a table-bound column this is <tablename>_<columnname>. used primarily for LABEL_STYLE_TABLENAME_PLUS_COL as well as the .columns collection on a Join object. N�.r r)r�r�r!r �schema�replacer�rr�rWr"rIrTr�r�rr�rr�)r�r�r�r�rr��counters rzr�zColumnClause._gen_tq_label�s��� �J�� �?�) ��4� �]�3�A�6�6�]��q�!�!� ,�a�h� ,���(�(��c�2�2�S�8�1�6�A�C�G�$�N���(�J�J�q�/�,J�,J�J�J�J���� �t�+���d�#�#� 9�� �(>�!�%�(�(�;�"&�*�E�K�K�'��t�z�:�:�E�E����'�'� 9�A�F�L�,D�&�e�[�9�9�9�9�9�#�E�1�6�<�8�8��� #��A�C�<�<�"�F��G� �A�C�-�-�!&���s�7�|�|�!;���1� ��!�A�C�-�-�#�E��#�E�$<�e�D�D� D��Kr}r�r�rVr�rJr�r�rr�r�r�r�r�rr�c ��| o|jo|dup ||jk} |�|r&tjt j|p|j��n|p|j|j|| ���} |j| _|� |j | _ |rt|��| _ n|g| _ |j �)|j j �| j ��| _ | j | fS)Nr�)r�r�r�rr�rr�r�r�rr�r�r�r�r?) r�r�r�r�r�rr�r�r�r�r�r�s rzr�zColumnClause._make_proxy�s���($� #� ��� � �� �%��4�9�$� � � � �'�)� � ��!9�4�;L�4�9�M�M�M��'�d�i��)�"�!� � � ��(�8��� �<��H�A�E� � ��2�3�3�A�J�J���A�J� � "� .�'�4�<�@�@���G�G�A�N��u�a�x�r})NFN)r�r�rpr�r�rsr�r�rzrcr�r�r�)!r�r�r�r�rgr�r7rxryr�r|rFr�r�r�r��_is_multiparam_columnr}r|r_r�r�r&r>r�r,r�r-r�r�r�r�rCr�s@rzr�r��sA��������%�%�N ���������N� �"�/�0� �"�*�+� �#�4�5� �(�3�4� 3������,0�H�/�/�/�/�*.�G�.�.�.�.�-1�N�1�1�1�1�.2�O�2�2�2�2�!�� �4�4��X�4� 48� �,0� %�%�%�%�%� -2������ �,�,�,�,��X�,� $� $� $� $� $� $�'����'�&���#�&�&�$�#�&��B�B��X�B�@�@�@�.04�6�6�6�6�6�|#�!�$)�GK�$)�1�1�1�1�1�1�1�1�1�1r}r�c��eZdZUdZdejfdejfdejfgZde d<dd �Z e fdd�Z e jdd���ZdS)�TableValuedColumn�table_valued_columnr�r�� scalar_aliasr\rFrWrpr�c�H�||_|jx|_|_||_dSrw)r�r�rr�)r�r�rps rzr_zTableValuedColumn.__init__�s&��(���+�0�0���4�9��� � � r}r�r[r�rrtr~c �\�||jfi|��|_|jjx|_|_dSrw)r�r�r)r�r�r�s rzr�z!TableValuedColumn._copy_internals�s9��"�E�$�"3�:�:�r�:�:���#�0�5�5���4�9�9�9r}r�c��|jgSrw)r�r�s rzr�zTableValuedColumn._from_objectss���!�"�"r}N)r�rWrpr�)r�r[r�rrtr~rc)r�r�r�r�r7rxryr�rFrgr_r&r�r=rr�rxr}rzr�r��s��������*�N� �"�/�0� �"�*�+� �*�;�<�3������ ���� +1�6�6�6�6�6�  �"�#�#�#�#�"�#�#�#r}r�c�|�eZdZUdZdejfgZded<ee j d��d d �����Z d �Z d S)r*r)r\rFrdr��_ColumnExpressionArgument[str]r�rt�BinaryExpression[str]c�6�tjj}tjt jt|��}|jj |j ur|j� |��}n|j}t|t|��tj|���Sri)r=r�rmrr�rr*r�r�r��String�_with_collationrr*rr-)r�r�r)ror�� collate_types rz�_create_collation_expressionz,CollationClause._create_collation_expression s��� �>�.����� ;�C� @�*�M�M�� �9� #�x�� 6� 6��9�4�4�Y�?�?�L�L��9�L�� � �I� &� &� � ��  � � � r}c��||_dSrw)r)r,s rzr_zCollationClause.__init__"s ��"����r}N)r�r�r)r�rtr�) r�r�r�r�r7r�rFrgr�r=r�r�r_rxr}rzr*r*s�������� �N� �'�1�2�3��������T��2�3�3� � � �4�3��[� �(#�#�#�#�#r}r*c��eZdZdZd�ZdS)�_IdentifiedClause� identifiedc��||_dSrw)�ident)r�r�s rzr_z_IdentifiedClause.__init__)s ���� � � r}N)r�r�r�r�r_rxr}rzr�r�&s(������!�N�����r}r�c��eZdZdZdZdS)�SavepointClause� savepointFN�r�r�r�r�rkrxr}rzr�r�-s������ �N��M�M�Mr}r�c��eZdZdZdZdS)�RollbackToSavepointClause�rollback_to_savepointFNr�rxr}rzr�r�2s������,�N��M�M�Mr}r�c��eZdZdZdZdS)�ReleaseSavepointClause�release_savepointFNr�rxr}rzr�r�7s������(�N��M�M�Mr}r�c���eZdZUdZdZded<eedd�����Zeedd �����Zedd ���Zd�fd� Z d�Z d�Z d�Z �xZ S)rTa�Represent a SQL identifier combined with quoting preferences. :class:`.quoted_name` is a Python unicode/str subclass which represents a particular identifier name along with a ``quote`` flag. This ``quote`` flag, when set to ``True`` or ``False``, overrides automatic quoting behavior for this identifier in order to either unconditionally quote or to not quote the name. If left at its default of ``None``, quoting behavior is applied to the identifier on a per-backend basis based on an examination of the token itself. A :class:`.quoted_name` object with ``quote=True`` is also prevented from being modified in the case of a so-called "name normalize" option. Certain database backends, such as Oracle Database, Firebird, and DB2 "normalize" case-insensitive names as uppercase. The SQLAlchemy dialects for these backends convert from SQLAlchemy's lower-case-means-insensitive convention to the upper-case-means-insensitive conventions of those backends. The ``quote=True`` flag here will prevent this conversion from occurring to support an identifier that's quoted as all lower case against such a backend. The :class:`.quoted_name` object is normally created automatically when specifying the name for key schema constructs such as :class:`_schema.Table`, :class:`_schema.Column`, and others. The class can also be passed explicitly as the name to any function that receives a name which can be quoted. Such as to use the :meth:`_engine.Engine.has_table` method with an unconditionally quoted name:: from sqlalchemy import create_engine from sqlalchemy import inspect from sqlalchemy.sql import quoted_name engine = create_engine("oracle+oracledb://some_dsn") print(inspect(engine).has_table(quoted_name("some_table", True))) The above logic will run the "has table" logic against the Oracle Database backend, passing the name exactly as ``"some_table"`` without converting to upper case. .. versionchanged:: 1.2 The :class:`.quoted_name` construct is now importable from ``sqlalchemy.sql``, in addition to the previous location of ``sqlalchemy.sql.elements``. )rIrPrQrJrIror�rtc��dSrwrx�r�rorIs rzrUzquoted_name.constructqs��JM�#r}r~c��dSrwrxr�s rzrUzquoted_name.constructus��DG�Cr}r��Optional[quoted_name]c�*�|�dSt||��Srw)rTr�s rzrUzquoted_name.constructys�� �=��4��u�e�,�,� ,r}c���|� Jd���t||��r|� |j|kr|St���||��}||_|S)Nz0use quoted_name.construct() for None passthrough)r�rIr>r�)r�rorIr�r�s �rzr�zquoted_name.__new__�sd��� � � � =� � � � �e�S� !� !� �u�}�� �u�8L�8L��L��w�w���s�E�*�*���� �� r}c�<�tt|��|jffSrw)rTr�rIr�s rzrIzquoted_name.__reduce__�s���S��Y�Y�� �3�3�3r}c�V�|jr|St|�����Srw)rIr�rPr�s rz�_memoized_method_lowerz"quoted_name._memoized_method_lower��'�� �:� %��K��t�9�9�?�?�$�$� $r}c�V�|jr|St|�����Srw)rIr�rQr�s rz�_memoized_method_upperz"quoted_name._memoized_method_upper�rr})ror�rIrJrtrT)ror~rIrJrtr~)ror�rIrJrtr�)r�r�r�r�r�rgrr�rUr�rIrrrCr�s@rzrTrT<s���������.�.�`*�I����� ��M�M�M��[��X�M� ��G�G�G��[��X�G��-�-�-��[�-� � � � � � �4�4�4�%�%�%� %�%�%�%�%�%�%r}rTr��Set[ColumnClause[Any]]c�R�t��}t|id|ji��|S)z2locate Column objects within the given expression.r�)�setr8r�)r�r�s rz� _find_columnsr�s+��$'�5�5�D� �V�R�(�D�H�-�.�.�.� �Kr}�args�Sequence[ColumnElement[_T]]r�c�N�|D]}|jjs |jcS�tjSrw)r�rjrr�)r�as rz�_type_from_argsr �s8�� �!�!���v�~� ��6�M�M�M� �� � r}c ��|�||���}|�2tjd|�dt|dd���d|j�d����|S)N)�require_embeddedzGiven column 'z', attached to table 'r�z7', failed to locate a corresponding column from table '�')r�r;r�r�r�)� fromclauser�rr�s rz�_corresponding_column_or_errorr�sv���'�'��!1� (� � �A� �y��%�%��v�v�w�v�w��5�5�5�5�z�7M�7M�7M� O� � � � �Hr}c��eZdZdZd�ZdS)�#_memoized_property_but_not_nulltypez,memoized property, but dont memoize NullTypec�d�|�|S|�|��}|js||j|j<|Srw)�fgetrjr�r�)r�r�r��results rz�__get__z+_memoized_property_but_not_nulltype.__get__�s8�� �;��K����3�����~� 1�*0�C�L��� '�� r}N)r�r�r�r�rrxr}rzrr�s+������7�6�����r}rc����eZdZUded<d�Z�fd�Zejd���Ze d���Z ejd���Z ejd���Z ejdd ���Z ejdd ���Z�xZS)�AnnotatedColumnElementr��_Annotated__elementc���tj|||��dD]}|j�|d���dD]7}|j�|d���|j�|���8dS)N)r�r�r�r�r�r�)r�rr�F)r$r_r�r�r?)r�r�r�r$s rzr_zAnnotatedColumnElement.__init__�s�����4��&�1�1�1� � *� *�D� �M� � �d�D� )� )� )� )�,� (� (�D��}� � ��u�-�-�5�� �!�!�$�'�'�'�� (� (r}c���t���|��}dD]}|j�|d���|S)N)r�r�r�r�r�)r>�_with_annotationsr�r�)r�r�r�r$r�s �rzrz(AnnotatedColumnElement._with_annotations�sM������)�)�&�1�1�� � +� +�D� �N� � �t�T� *� *� *� *�� r}c��|jjS)z'pull 'name' from parent, if not present)rr�r�s rzr�zAnnotatedColumnElement.name�s���'�,�,r}c��|jjS)a�pull 'type' from parent and don't cache if null. type is routinely changed on existing columns within the mapped_column() initialization process, and "type" is also consulted during the creation of SQL expressions. Therefore it can change after it was already retrieved. At the same time we don't want annotated objects having overhead when expressions are produced, so continue to memoize, but only when we have a non-null type. )rr�r�s rzr�zAnnotatedColumnElement.type�s���'�,�,r}c��|jjS)z(pull 'table' from parent, if not present)rr�r�s rzr�zAnnotatedColumnElement.table�s���'�-�-r}c��|jjS)z&pull 'key' from parent, if not present)rrr�s rzrzAnnotatedColumnElement.key�s���'�+�+r}rtrGc�`�trt|jt��sJ�|jjSrw)rr�rrQ�infor�s rzr#zAnnotatedColumnElement.infos0�� � @��d�6��?�?� ?� ?�?��'�,�,r}r�c��|jjSrw)rr�r�s rzr�z'AnnotatedColumnElement._anon_name_label s���'�8�8r})rtrGr�)r�r�r�rgr_rr=rdr�rr�r�rr#r�rCr�s@rzrr�s��������+�+�+�+� (� (� (� � � � � � ��-�-���-�)� -� -�)�(� -� ��.�.���.� ��,�,���,� ��-�-�-���-�  ��9�9�9���9�9�9�9�9r}rc�:��eZdZdZdZdd�fd � Zdd �Zdd�Z�xZS)r�zVA unicode subclass used to identify symbolic " "names that may require truncation.rxNror�rIrJrtrc�l��t|d|��}t���|||��S)NrI)r�r>r�)r�rorIr�s �rzr�z_truncated_label.__new__s.�����w��.�.���w�w���s�E�5�1�1�1r}c�<�|jt|��|jffSrw)r�r�rIr�s rzrIz_truncated_label.__reduce__s���~��D� � �4�:�6�6�6r}�map_r�c��|Srwrx�r�r(s rz� apply_mapz_truncated_label.apply_mapr�r}rw)ror�rIrJrtrr:)r(r�rtr�) r�r�r�r�r�r�rIr+rCr�s@rzr�r�s{�������+�+��I�2�2�2�2�2�2�2� 7�7�7�7��������r}r�c��eZdZdZdZdS)�convaMark a string indicating that a name has already been converted by a naming convention. This is a string subclass that indicates a name that should not be subject to any further naming conventions. E.g. when we create a :class:`.Constraint` using a naming convention as follows:: m = MetaData( naming_convention={"ck": "ck_%(table_name)s_%(constraint_name)s"} ) t = Table( "t", m, Column("x", Integer), CheckConstraint("x > 5", name="x5") ) The name of the above constraint will be rendered as ``"ck_t_x5"``. That is, the existing name ``x5`` is used in the naming convention as the ``constraint_name`` token. In some situations, such as in migration scripts, we may be rendering the above :class:`.CheckConstraint` with a name that's already been converted. In order to make sure the name isn't double-modified, the new name is applied using the :func:`_schema.conv` marker. We can use this explicitly as follows:: m = MetaData( naming_convention={"ck": "ck_%(table_name)s_%(constraint_name)s"} ) t = Table( "t", m, Column("x", Integer), CheckConstraint("x > 5", name=conv("ck_t_x5")), ) Where above, the :func:`_schema.conv` marker indicates that the constraint name here is final, and the name will render as ``"ck_t_x5"`` and not ``"ck_t_ck_t_x5"`` .. seealso:: :ref:`constraint_naming_conventions` rxNr~rxr}rzr-r- s ������-�-�^�I�I�Ir}r-c�F�eZdZdZdZe ddd���Zd�Zd�Zd�Z dS)r�zDA unicode subclass used to identify anonymously generated names.rxNFrr��bodyr�r r�rSrsrtc���tjdd|��}|r|�d��}d||�dd��fz}|r|�|��}t |��S)Nz [%\(\) \$]+r z %%(%d %s)s�%�%%)r�r��stripr�r�)r�rr/r rSrs rzrz_anonymous_label.safe_construct`so���v�n�c�4�0�0�� � #��:�:�c�?�?�D���d�l�l�3��&=�&=�>�>�� � 6�-�o�u�u�5�E���&�&�&r}c��d|vr9t|t��s$t|���dd��}nt|��}tt t�||��|j����S�Nr1r2�r�r�r�r�rTr>rIr�s rzr>z_anonymous_label.__add__vsw�� �%�<�<� �5�2B� C� C�<���J�J�&�&�s�D�1�1�E�E���J�J�E�� �� � �D�%�(�(�� � � � � � r}c��d|vr9t|t��s$t|���dd��}nt|��}tt t�||��|j����Sr5r6r�s rzrEz_anonymous_label.__radd__�sw�� �%�<�<� �5�2B� C� C�<���J�J�&�&�s�D�1�1�E�E���J�J�E�� �� � �E�4�(�(�� � � � � � r}c�J�|j�t||z|j��S||zSrw)rIrTr*s rzr+z_anonymous_label.apply_map�s,�� �:� !��t�d�{�D�J�7�7� 7��$�;� r}r!) rr�r/r�r r�rSrsrtr�) r�r�r�r�r�r�rr>rEr+rxr}rzr�r�Zs}���������I�� *.�"� '�'�'�'��[�'�*  �  �  �  �  �  �����r}r�rz)rorrprqrrrsrtrur!)rorfrpr~rrrsrtru)rorrpr�rrrsrtr�rw)r�r�rpr�rtr�)r�r�rtr)rr rtr�)�r�� __future__r�decimalr�enumrr�rPr�r~rrrr r r r r rrrrrrrr� typing_Tuplerrrrr rrrrr�_typingr r!r"r#� annotationr$r%�baser&r'r(r)r*r+r,r-r.r/r<r0r1r2r3r4�visitorsr5r6r7r8r9r;r<r=r>r?� util.typingr@rArBrCrDrErFrGrHrIrJrKrL�compilerrMrN� functionsrOrPr�rQrRrSrTr�rUrVrWrXrorYrZr[r\r]�enginer^r_�engine.interfacesr`rarbrcrd� engine.resultre�floatrlr�rnrfrhrjrkrmr{r�r��_self_inspectsr�r�� DMLColumnRole�DDLConstraintColumnRole�ColumnsClauseRoler�r�r*r}�_SQO�ColumnArgumentOrKeyRole�StatementOptionRoler �BinaryElementRole� OrderByRole�LimitOffsetRole�DDLExpressionRolerSr2r4� InElementRoler�r~�FromClauseRole�SelectStatementRole� Inspectabler�� ConstExprRoler��_create_singletonrsr�r�r�r rr�r�r�rzrr�r�r�r�r�rTr�r�rr rrr�r*r8r9r:� _IntOrRanger<rXrir�r�r�r�DDLReferredColumnRole�StrAsPlainColumnRoler�r�r�r*r�r�r�r�� MemoizedSlotsrTrr rrdrrr�r-�_generated_labelr�rxr}rz�<module>r^s;���� #�"�"�"�"�"��������������������� � � � � � � � �������������������������������������������������������������������������������������������(�(�(�(�(�(������� � � � � � �������������������������������������������$�$�$�$�$�$�)�)�)�)�)�)�#�#�#�#�#�#�"�"�"�"�"�"�!�!�!�!�!�!�3�3�3�3�3�3������� � � � � � �������������������������������������������#�#�#�#�#�#�*�*�*�*�*�*�������.�.�.�.�.�.�&�&�&�&�&�&�(�(�(�(�(�(�%�%�%�%�%�%�+�+�+�+�+�+�'�'�'�'�'�'�������������������������������4�4�4�4�4�4�������!�!�!�!�!�!�#�#�#�#�#�#������� ��#'�$�$�$�$�$�$�2�2�2�2�2�2�<�<�<�<�<�<�$�$�$�$�$�$�"�"�"�"�"�"�,�,�,�,�,�,�,�,�,�,�,�,�������1�1�1�1�1�1�#�#�#�#�#�#�"�"�"�"�"�"�%�%�%�%�%�%�*�*�*�*�*�*�'�'�'�'�'�'�������(�(�(�(�(�(�$�$�$�$�$�$�"�"�"�"�"�"�+�+�+�+�+�+�&�&�&�&�&�&�+�+�+�+�+�+�)�)�)�)�)�)�#�#�#�#�#�#�$�$�$�$�$�$�,�,�,�,�,�,�0�0�0�0�0�0�"�"�"�"�"�"�#�#�#�#�#�#� � � � � � �;�;�;�;�;�;�.�.�.�.�.�.�5�5�5�5�5�5�?�?�?�?�?�?�:�:�:�:�:�:�&�&�&�&�&�&� ���� �� ��s�G�#� $�� �W�T���������s�d�3�3�3���w�v�U�#�#�#�� �g�e�:�&�&�&���w�v�Y�'�'�'�� �"����� ��� ��!����� ��� �15�!����� ���15�!�"�"�"�"�"�L;?�#<�#<�#<�#<�#<�LZ#�Z#�Z#�Z#�Z#�i�Z#�Z#�Z#�z ��u�u�u�u�u������ u�u���u�p �����-����.%�%�%�%�%� �� �!� ��� %�%�%�*xG�xG�xG�xG�xG������xG�xG�xG�v ������e��e�9�%�@�*����(��r 5�r 5�r 5�r 5�r 5� �!� �� �� ��B�� �� �� �� �� �!� ������r 5�r 5�r 5�j � � � � ��r�*� � � �?"�?"�?"�?"�?"�M�"�-�?"�?"�?"�D[ �[ �[ �[ �[ �E�'�);�B�)?�[ �[ �[ �|�����$����"A�A�A�A�A� �!� �� �� �� �� �� �� ����� ��C� ���<�(�A�A�A�H ����� �e�1�$�7��t�9L����4������!�!�!�!�!��u�*�4�0�-��2E�!�!�!�8������! �! �! �! �! � �u�2�4�8�-��:M�! �! �! �H������i�i�i�i�i� �� �� �� ��� i�i�i�XU �U �U �U �U ��r�*�U �U �U �pX �X �X �X �X �-�b�1�X �X �X �vM7�M7�M7�M7�M7�,�T�2�M7�M7�M7�`������J�J�J�J�J�J� �l�3��8�&<�=�J�J�J�Z^ �^ �^ �^ �^ �=�� �^ �^ �^ �B9�9�9�9�9� �� $�9�9�9�x � � � � �d�2�h� � � � =�=�=�=�=�&�r�*�=�=�=�@'�'�'�'�'�m�C� �'�'�'�.�����}�R�(����: (� (� (� (� (�}�S�1� (� (� (�R�R�R�R�R�m�B�'�R�R�R�j= �= �= �= �= �/�"�-�= �= �= �@G�G�G�G�G�%�d�+�_�T�-B�G�G�G�4V/�V/�V/�V/�V/�)�"�-�V/�V/�V/�r'�'�'�'�'�M�#� �'�'�'�T�����&�s�+���� '� '� '� '� '�(� '� '� '�=�=�=�=�=�~�}�R�0�=�=�=�@0�0�0�0�0�X�b�\�0�0�0�f��������� �,���(� ��C��O�$� �D �D �D �D �D �=�� �D �D �D �Ng �g �g �g �g �-��#�g �g �g �TJ �J �J �J �J �Z��r�!2�J �J �J �Zh�h�h�h�h�$�R�(�h�h�h�V�i�����x�x�x�x�x�E� '�� +�[��_�x�x�x�v~�~�~�~�~� �� ���#� �� ���O� ~�~�~�B#�#�#�#�#� �B��#�#�#�2#�#�#�#�#�m�C�(�#�#�#�B����� �M���������'���� ����� 1���� �����.���� ^%�^%�^%�^%�^%�$�$�c�^%�^%�^%�B����!�!�!�!�  �  �  �  � � � � � ���+�,� � � �C9�C9�C9�C9�C9�Y�C9�C9�C9�L�����{����$0�0�0�0�0� �0�0�0�n$��<�<�<�<�<�'�<�<�<�<�<r}
Memory