PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/hc_python/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/
Upload File :
Current File : //opt/hc_python/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/result.cpython-312.pyc

�

���gD/���dZddlmZddlmZddlZddlZddlZddlZddlm	Z	ddlm
Z
ddlmZddlmZdd	lm
Z
dd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm 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+ej0se(sdd%l,m-Z-ndd%l.m-Z-ej0rdd&l/m0Z0dd'l1m2Z2ee3d(fZ4ee4e5fZ6e	Z7ee4e7fZ8eee	ee	fZ9	ee	d)fZ:	ed*e9�+�Z;ed,e	�+�Z<ed-ee	d)f�+�Z=ee;e:fZ>	eee	e	fZ?eed.Z@e
ee	gee	fZAe
e	ge	fZBeee	eeBfZCGd/�d0�ZDGd1�d2ej�e	�ZFGd3�d4eD�ZG	dO					dPd5�ZHGd6�d7e�ZIeIj�ZJGd8�d9e$e
e;�ZKGd:�d;�ZLGd<�d=eLeKee=�ZMGd>�d?eKe;�ZNGd@�dAeNe;�ZOGdB�dCeNe;e j��ZQGdD�dEeLeNe�ZRGdF�dGe
e=�ZSGdH�dIeMe=�ZTdQdJ�ZUGdK�dLeTe=�ZVGdM�dNeTe=�ZWy)Rz%Define generic result set constructs.�)�annotations)�EnumN)�Any)�Callable)�cast)�Dict)�Generic)�Iterable)�Iterator)�List)�Mapping)�NoReturn)�Optional)�overload)�Sequence)�Set)�Tuple)�
TYPE_CHECKING)�TypeVar)�Union�)�Row)�
RowMapping�)�exc)�util)�_generative)�HasMemoized)�InPlaceGenerative)�!HasMemoized_ro_memoized_attribute)�NONE_SET)�HAS_CYEXTENSION)�Literal)�Self)�tuplegetter)�SQLCoreOperations)�_ResultProcessorTypezSQLCoreOperations[Any].�_R)�bound�_T�_TPz_ResultProcessorType[Any]c��eZdZUdZdZdZded<dZded<dZded	<d
ed<ded
<ded<ded<e	d#d��Z
d$d�Zd%d�Ze
	d&							d'd��Ze
	d&							d(d��Ze
	d&							d)d��Z	d*							d)d�Z				d+d�Z						d,d�Z				d-d�Z				d.d�Zd/d�Z	d*					d0d�Z				d1d�Z						d2d �Zd3d!�Ze	d4d"��Zy)5�ResultMetaDataz$Base for metadata about result rows.�N�Optional[_TupleGetterType]�_tuplefilter�Optional[Sequence[int]]�_translated_indexes�(Optional[Sequence[Callable[[Any], Any]]]�_unique_filters�_KeyMapType�_keymap�
Sequence[str]�_keys�Optional[_ProcessorsType]�_processors�Mapping[_KeyType, int]�
_key_to_indexc��t|�S�N)�	RMKeyView��selfs �I/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/engine/result.py�keyszResultMetaData.keysjs������c��t��r>��NotImplementedError�rA�keys  rB�_has_keyzResultMetaData._has_keyn���!�#�#rDc��t��r>rFr@s rB�_for_freezezResultMetaData._for_freezeqrKrDc��yr>r.�rArI�err�raiseerrs    rB�
_key_fallbackzResultMetaData._key_fallbackts��rDc��yr>r.rOs    rBrRzResultMetaData._key_fallbackys��rDc��yr>r.rOs    rBrRzResultMetaData._key_fallback�s��!rDc�"�|sJ�t|�|�r>)�KeyErrorrOs    rBrRzResultMetaData._key_fallback�s����x��s�m��$rDc��td��)NzCambiguous column name logic is implemented for CursorResultMetaDatarF)rA�recs  rB� _raise_for_ambiguous_column_namez/ResultMetaData._raise_for_ambiguous_column_name�s��"�
#�
�	
rDc��t��r>rF�rArIrQs   rB�_index_for_keyzResultMetaData._index_for_key��
��"�#�#rDc��t��r>rF�rArCs  rB�_indexes_for_keysz ResultMetaData._indexes_for_keys�r]rDc��t��r>rFr_s  rB�_metadata_for_keysz!ResultMetaData._metadata_for_keys�r]rDc��t��r>rFr_s  rB�_reducezResultMetaData._reduce�rKrDc�V�|j||�}|�tj|�Syr>)r\�operator�
itemgetter)rArIrQ�indexs    rB�_getterzResultMetaData._getter�s0���#�#�C��2�����&�&�u�-�-�rDc�4�|j|�}t|�Sr>)r`r%)rArC�indexess   rB�_row_as_tuple_getterz#ResultMetaData._row_as_tuple_getter�s���(�(��.���G�$�$rDc�f�|j�D��cic]\}}||�|||��c}}Scc}}wr>)�items)rA�keymaprhrIrXs     rB�_make_key_to_indexz!ResultMetaData._make_key_to_index�sE��
#�L�L�N�
�*���S��5�z�%�
��U��O�*�
�	
��
s�-c��||jvr|j|j|�y|r	|j|d�y|j|d�y#t$r}t	|j
d�|�d}~wwxYw�Nr)r6rYrRrV�AttributeError�args)rArI�
attr_error�kes    rB�_key_not_foundzResultMetaData._key_not_found�sx���$�,�,���1�1�$�,�,�s�2C�D��=��&�&�s�D�1��"�"�3��-�� �=�(������4�"�<��=�s�A�	A>� A9�9A>c�r�|jrtj|j�ry|jSr>)r:r!�
issupersetr@s rB�_effective_processorsz$ResultMetaData._effective_processors�s-�����8�#6�#6�t�7G�7G�#H���#�#�#rD��returnr?�rI�objectr|�bool�r|r-).)rIrrP�Optional[Exception]rQ�
Literal[True]r|r)rIrrPr�rQzLiteral[False]r|�None)rIrrPr�rQrr|zOptional[NoReturn]�T)rX�_KeyMapRecTyper|r)rI�
_KeyIndexTyperQrr|�
Optional[int])rC�Sequence[_KeyIndexType]r|�
Sequence[int])rCr�r|�Iterator[_KeyMapRecType])rCr�r|r-)rIrrQrr|�#Optional[Callable[[Row[Any]], Any]]�rCr�r|�_TupleGetterType)roz Mapping[_KeyType, Sequence[Any]]rh�intr|r;)rIrrurr|r)r|r9)�__name__�
__module__�__qualname__�__doc__�	__slots__r0�__annotations__r2r4�propertyrCrJrMrrRrYr\r`rbrdrirlrprwrzr.rDrBr-r-]s��.��I�/3�L�,�3�37��0�7�@D�O�=�D�
����*�*�)�)�
����$�$��LO����0��<I��	�����
$'�	�
��!��!�	�

�����CF�!��!�0�!�<@�!�	�!��!�
DH�%��%�0�%�<@�%�	�%�
�!�
�	�
�$� �$�,0�$�	�$�
$�+�$�	�$�
$�+�$�	!�$�
$�*.����"&��	,��%�+�%�	�%�
�6�
�?B�
�	�
�.��$��$rDr-c�^�eZdZUdZded<ded<dd�Zdd�Zdd�Zdd	�Zdd
�Z	dd�Z
dd�Zy
)r?��_parentr8r-r�r7r8c�`�||_|jD�cgc]}|��|��	c}|_ycc}wr>r�)rA�parent�ks   rB�__init__zRMKeyView.__init__�s*�����!'���?��A���a��?��
��?s�+�+c�,�t|j�Sr>)�lenr8r@s rB�__len__zRMKeyView.__len__�s���4�:�:��rDc�$�dj|�S)Nz#{0.__class__.__name__}({0._keys!r}))�formatr@s rB�__repr__zRMKeyView.__repr__�s��4�;�;�D�A�ArDc�,�t|j�Sr>)�iterr8r@s rB�__iter__zRMKeyView.__iter__�s���D�J�J��rDc�Z�t|t�ry|jj|�S�NF)�
isinstancer�r�rJ)rA�items  rB�__contains__zRMKeyView.__contains__�s&���d�C� ���|�|�$�$�T�*�*rDc�0�t|�t|�k(Sr>��list�rA�others  rB�__eq__zRMKeyView.__eq__�����E�{�d�4�j�(�(rDc�0�t|�t|�k7Sr>r�r�s  rB�__ne__zRMKeyView.__ne__�r�rDN)r�r-)r|r�)r|�str)r|z
Iterator[str])r�rr|r)r�rr|r)r�r�r�r�r�r�r�r�r�r�r�r�r.rDrBr?r?�s8��$�I�
����@��B� �+�)�)rDr?c��eZdZUdZdZded<					d											dd�Zdd�Zdd�Zdd	�Z	dd
�Z
ddd�Zdd�Z				dd
�Z
dd�Zy)�SimpleResultMetaDataz*result metadata for in-memory collections.)r8r6r:r0r2r4r<r7r8Nc	���t|�|_||_||_||_|rDtt
|j|��D���	cgc]\}\}}	|f|	r|	ndz|||	ff��}
}}}	n-t|j�D��cgc]
\}}|f||dff��}
}}|
D���cic]\}}|D]}||���c}}}|_||_|j|jd�|_
ycc}	}}wcc}}wcc}}}w)Nr.r)r�r8r0r2r4�	enumerate�zipr6r:rpr<)
rArC�extrar:r0r2r4rh�name�extras�
recs_namesrXrIs
             rBr�zSimpleResultMetaData.__init__s���$�Z��
�(���#6�� �.����.7�s�4�:�:�u�7M�-N��
.O�)�E�>�D�&��G��v�R�8��D�&�)��.O�
��$-�T�Z�Z�#8��#8�K�E�4���5�$��+�,�#8�
��
3=�M�*�Y�T�3����S����*�M���&���!�4�4�T�\�\�1�E����#����
Ns�C&�C-�C3c��||jvSr>�r6rHs  rBrJzSimpleResultMetaData._has_key's���d�l�l�"�"rDc���|j}|r|jr|j|�}t|j|jD�cgc]}|j|d��c}|��Scc}w)Nr)r�r4)r4r0r�r8r6)rA�unique_filtersrIs   rBrMz SimpleResultMetaData._for_freeze*sh���-�-���d�/�/�!�.�.�~�>�N�$��J�J�37�:�:�>�:�C�4�<�<��$�Q�'�:�>�*�
�	
��>s�
A,
c�4�|j|jd�S)N�r8r2r�r@s rB�__getstate__z!SimpleResultMetaData.__getstate__7s���Z�Z�#'�#;�#;�
�	
rDc�`�|dr|d}t|�}ndx}}|j|d||��y)Nr2r8)r2r0)r%r�)rA�stater2r0s    rB�__setstate__z!SimpleResultMetaData.__setstate__=sK���&�'�"'�(=�">��&�(;�<�L�15�5��,��
�
��'�N� 3�%�	�	
rDc���t|jjvr|j|}	|j|}|dS#t
$r!}|j
|||�}Yd}~|dSd}~wwxYwrr�r��	__class__�__mro__r8r6rVrR)rArIrQrXrvs     rBr\z#SimpleResultMetaData._index_for_keyIsn���#�-�-�'�'�'��*�*�S�/�C�	8��,�,�s�#�C��1�v�
���	8��$�$�S�"�h�7�C��1�v�
��	8�s�A�	A+�
A&�&A+c�L�|D�cgc]}|j|d��c}Scc}wrrr�)rArCrIs   rBr`z&SimpleResultMetaData._indexes_for_keysSs(��04�5������S�!�!�$��5�5��5s�!c#��K�|D]A}t|jjvr|j|}	|j|}|���Cy#t
$r}|j
||d�}Yd}~�(d}~wwxYw�w)NTr�)rArCrIrXrvs     rBrbz'SimpleResultMetaData._metadata_for_keysVsp�����C��c�m�m�+�+�+��j�j��o��
8��l�l�3�'���I����
8��(�(��b�$�7���
8�s.�1A3�A
�A3�
	A0�A+�&A3�+A0�0A3c���	|D�cgc]<}|jt|jjvr|j|n|��>}}t�\}}}|jr|D�cgc]}|j|��}}t|�}	t|||	||j|j��}
|
Scc}w#t
$r*}|j
|jd|d�Yd}~��d}~wwxYwcc}w)NrT)r�r0r2r:r4)r6r�r�r�r8rVrRrtr�r2r%r�r:r4)rArCrI�metadata_for_keysrvrk�new_keysr��idx�tup�new_metadatas           rBrdzSimpleResultMetaData._reduceds��	5�
 �	!� �C����'*�c�m�m�.C�.C�'C�D�J�J�s�O��� �	
�!�$'�(9�#:� ���5��#�#�@G�H���t�/�/��4��G�H��7�#��+���� '��(�(� �0�0�

�����9!���	5����r�w�w�q�z�2�t�4�4��	5��Is/�B1�AB,�B1�%C'�,B1�1	C$�: C�C$)NNNNN)rCr7r�zOptional[Sequence[Any]]r:r9r0r/r2r1r4r3r}r�)r|�Dict[str, Any])r�r�r|r�r�)rIrrQrr|r�)rC�
Sequence[Any]r|r�)rCr�r|r�)rCr�r|r-)r�r�r�r�r�r�r�rJrMr�r�r\r`rbrdr.rDrBr�r��s���4��I���
*.�15�37�7;�DH�F��F�'�F�/�	F�
1�F�5�
F�B�F�B#�
�
�

��6��!��	!��rDr�c�z�t||�}tjt||j|j
�Sr>)r��	functools�partialrrzr<)�fieldsr�r�s   rB�result_tupler��s8��"�&�%�
0�F�����V�V�1�1�6�3G�3G��rDc��eZdZdZy)�_NoRowrN)r�r�r��_NO_ROWr.rDrBr�r��s���GrDr�c��eZdZUdZdZded<dZded<ded	<dZd
ed<dZded<d
Z	ded<ded<d#d�Z
	d$			d%d�Z	d&			d'd�Zd(d�Z
d$d)d�Zed*d��Zed+d��Zd,d�Zd,d�Ze		d-d��Zed.d��Ze								d/d��Ze								d0d��Z								d0d�Zd1d�Zd2d �Zed3d!��Zej:d4d"��Zy)5�ResultInternalr.N�Optional[Result[Any]]�_real_resultTr�_generate_rows�Optional[Callable[[Any], Any]]�_row_logging_fnz Optional[_UniqueFilterStateType]�_unique_filter_state�_post_creational_filterFr-�	_metadata�_source_supports_scalarsc��t��r>rFr@s rB�_fetchiter_implzResultInternal._fetchiter_impl�rKrDc��t��r>rF�rA�
hard_closes  rB�_fetchone_implzResultInternal._fetchone_impl�r]rDc��t��r>rF�rA�sizes  rB�_fetchmany_implzResultInternal._fetchmany_impl�r]rDc��t��r>rFr@s rB�_fetchall_implzResultInternal._fetchall_impl�rKrDc��t��r>rF�rA�hards  rB�_soft_closezResultInternal._soft_close�rKrDc�
��	�
���|jr|jntd|�}|jr$|jsyt�										d�fd�}nt}|j
}|j}|j}|j}|r8|js,|r||�}tj||||��
|�d�
�fd�}ntj||||�}|jr|j�|�	d��	fd�}|S)N�Result[Any]c����||||f�Sr>r.)�metadata�
processors�key_to_index�
scalar_obj�_procs    �rB�process_rowz/ResultInternal._row_getter.<locals>.process_row�s���!� �*�l�Z�M��rDc� ����|��Sr>r.)�row�_make_row_orig�fixed_tfs ��rB�make_rowz,ResultInternal._row_getter.<locals>.make_row�s���%�h�s�m�4�4rDc� ����|��Sr>r.)r�_log_row�	_make_rows ��rBrz,ResultInternal._row_getter.<locals>.make_row�s����	�#��/�/rD)
r�r-r�r9r�r;r�rr|zRow[Any])rz_InterimRowType[Row[Any]]r|r()r�rr�r�rr�r<rzr0r�r�r�)
rA�real_resultrr�r�r��tfrrr	rrrs
        @@@@@rB�_row_getterzResultInternal._row_getter�s&���� � �
����m�T�*�	��/�/��&�&�����,�� 9��#9��!$�	�
���K��>�>���-�-���3�3�
�
�
"�
"��
�k�:�:���
�^�
�09�0A�0A��X�z�<�1�N��H�
5�!�(�(��X�z�<��H��&�&�"�2�2�H� �I�
0��rDc������|j�|j�|jr|j\��d����fd�}|Sd��fd�}|S)Nc3��K�|j�D]>}�r�|�n|}�r�|�n|}|�vr� �j|��r�|�}|���@y�wr>)r��add)rA�raw_row�obj�hashedr�post_creational_filter�strategy�uniquess    ����rB�iterrowsz1ResultInternal._iterator_getter.<locals>.iterrows�sc�����#�3�3�5�G�-5���)�7��/7�X�c�]�C�F���(� ��K�K��'�-�4�S�9���I� 6�s�AAc3�l�K�|j�D]}�r�|�n|}�r�|�}|���y�wr>)r�)rArrrrs   ��rBrz1ResultInternal._iterator_getter.<locals>.iterrowss?�����#�3�3�5�G�-5���)�7��.�4�S�9���I�
 6�s�14)rAr�r|�Iterator[_R]�rr�r��_unique_strategy)rArrrrrs  @@@@rB�_iterator_getterzResultInternal._iterator_getter�sP����#�#��!%�!=�!=���$�$� $� 5� 5��G�X�
�
�0��
��rDc�x�|j}|�J�|j�}|D�cgc]
}||���c}Scc}wr>)rr�)rAr�rowsrs    rB�
_raw_all_rowszResultInternal._raw_all_rowssC���#�#���#�#�#��"�"�$��)-�.��#���
��.�.��.s�7c��|j}|j}|j�}|r|D�cgc]
}||���}}n|}|jrS|j\}}|D�cgc]}||r||�n|f��c}D��	cgc]\}}	|	|vr|j|	�s|��}
}}	n|}
|r|
D�cgc]
}||���}
}|
Scc}wcc}wcc}	}wcc}wr>)r�rr�r�rr)rArrrr�	made_rowsrr�made_row�sig_row�interim_rowss           rB�_allrowszResultInternal._allrowss��!%�!=�!=���#�#���"�"�$���26�7�$�3��#��$�I�7��I��$�$� $� 5� 5��G�X�%.�*�
%.��!�.6���*�H��%.�*�
�*�%�H�g��'�)�'�+�+�g�2F��*�
�
�%�L�!�7C��7C��&�s�+�|�
�����78��*��
��s�B=�"C�=!C�*C
c������|j�|j�|jr|j\��d����fd�}|Sd��fd�}|S)Nc���|j}	|�}|�tS�r�|�n|}�r�|�n|}|�vr�-�j|��r�|�}|Sr>)r�r�r)	rA�_onerowrrrrrrrs	     ����rB�onerowz-ResultInternal._onerow_getter.<locals>.onerowOsl����-�-���!�)�C��{�&��.6�H�S�M�3��3;��#����!�W�,�$�#�K�K��/�1�"8��"=�C�"�
rDc�d��|j�}|�tS�r�|�n|}�r�|�}|Sr>)r�r�)rAr�interim_rowrrs   ��rBr(z-ResultInternal._onerow_getter.<locals>.onerowdsB����)�)�+���;�"�N�*2���
�s� �.�&<�[�&I��&�&rD)rAr�r|zUnion[_NoRow, _R]r)rAr(rrrrs  @@@@rB�_onerow_getterzResultInternal._onerow_getterDsS����#�#��!%�!=�!=���$�$� $� 5� 5��G�X�
#�
#�B�
�

'��
rDc��������|j�|j�|jr/|j\��										dd��						d�����fd�}|S						d��fd�}|S)Nc����|r|D�cgc]
}||���}}�r�fd�|D�}n	d�|D�}|D��cgc]\}}||vr|j|�s|��c}}Scc}wcc}}w)Nc3�2�K�|]}|�|�f���y�wr>r.)�.0r!rs  �rB�	<genexpr>zEResultInternal._manyrow_getter.<locals>.filterrows.<locals>.<genexpr>�s�����!�GK�8��8�H�#5�6�t�s�c3�$K�|]}||f���
y�wr>r.)r/r!s  rBr0zEResultInternal._manyrow_getter.<locals>.filterrows.<locals>.<genexpr>�s���� K�d�(�(�H�!5�d�s�)r)rrrrrr r!r"s  `     rB�
filterrowsz2ResultInternal._manyrow_getter.<locals>.filterrows{s�����59�:�T�c�H�S�M�T�D�:��!�GK�!�I�!L�d� K�I�.7��-6�)��'��g�-�g�k�k�'�6J��-6����;��s
�A�!Ac����g}|j}|�|jr|jntd|�}|jr|jx}}nB||�}t	|�}�	�J�|j��	|����|t	|�z
}n|}|�J�|r6||�}|sn+|j��	|����|t	|�z
}|r�6�
r|D�cgc]
}�
|���}}|Scc}w�Nr�)r�r�r�
_yield_perr��extend)
rA�num�collect�	_manyrowsr
�num_requiredrrr2rrrrs
        �����rB�manyrowsz0ResultInternal._manyrow_getter.<locals>.manyrows�s���%'�� �0�0�	��;� �,�,��)�)�!�-��6� �
#�-�-�-8�-C�-C�C��s�(��~��!�$�i��'�3�3�3����&�x��x��I��(+�S��\�'9��#&�L���&��"�$�\�2�D����N�N�"�8�T�8�W�E��$'��W��#5�L�#�*�FM�N�g�s�5�c�:�g�G�N����Os�C(c���|�0|jr|jntd|�}|j}|j|�}�r|D�cgc]
}�|���}}�r|D�cgc]
}�|���}}|Scc}wcc}wr4)r�rr5r�)rAr7r
rrrrs     ��rBr;z0ResultInternal._manyrow_getter.<locals>.manyrows�s�����;� �,�,��)�)�!�-��6� �
&�0�0�C�37�3G�3G��3L���59�:�T�c�H�S�M�T�D�:�)�CG�H�4�C�2�3�7�4�D�H����;��Hs�A5�"A:)
r�Optional[Callable[..., _R]]rz	List[Any]rz$Optional[Callable[[List[Any]], Any]]rzSet[Any]r|�List[_R])rAzResultInternal[_R]r7r�r|r>r)rAr;r2rrrrs  @@@@@rB�_manyrow_getterzResultInternal._manyrow_getterrs�����#�#��!%�!=�!=���$�$� $� 5� 5��G�X�
�5�
��
�?�
�"�	
�
�
�*-
�(�-
�/<�-
��-
�-
�F��%
�(�
�/<�
��
�$�rDc��yr>r.�rA�raise_for_second_row�raise_for_none�scalars    rB�
_only_one_rowzResultInternal._only_one_row�s��rDc��yr>r.rAs    rBrEzResultInternal._only_one_row�s��rDc��|j}|d��}|�|rtjd��y|r|jr
d|_d}n|j
}	|r||�n|}|r�|jrZ|j\}}|r||�n|}		|d��}
|
�t}
n=	|r||
�n|
}
|r|
tusJ�|	||
�k(r�8||
k(r�>n|d��}
|
�t}
|
turG|j
d��tj|rd��d��t}
|j
d��|s|j}|r||�}|r|r|dS|S#|j
d���xYw#|j
d���xYw)	NT�r�z&No row was found when one was requiredF�r�z6Multiple rows were found when exactly one was requiredz6Multiple rows were found when one or none was requiredr)r�r�
NoResultFoundr�r�rr�r�rr��MultipleResultsFoundr�)rArBrCrDr(rrrr�existing_row_hash�next_rowrs            rBrEzResultInternal._only_one_row�s����$�$��.4��.E���;���'�'�<�����d�3�3�"'�D���H��'�'�H�	�#+�(�3�-��C�
 ��(�(�%)�$9�$9�!���5=�H�S�M�3�!��$*�d�$;�H��'�#*���
�9A�8�H�#5�x��#�#+�7�#:�:�#:�0�H�X�4F�F� (� �H�_�$��
"�T�2���#�&�H��w�&�� � �d� �+��.�.�%�M���#����H�
���$��'��%)�%A�%A�"�%�,�S�1���h��q�6�M��J��w	����$��'���6��(�(�d�(�3��s�E�#E$�E$�E!�$E9c�$�|j|�Sr>)rr@s rB�
_iter_implzResultInternal._iter_impl;s���$�$�T�*�*rDc�L�|j|�}|tur
t��|Sr>)r+r��
StopIteration�rArs  rB�
_next_implzResultInternal._next_impl>s&���!�!�$�'���'�>��/�!��JrDc���|jr|jntd|�}|jrt|�dk7r |jj|�|_|jsJ�|S)Nr�r)r�rr�r�r�rdr�)rArkr
s   rB�_column_sliceszResultInternal._column_slicesEsg��� � �
����m�T�*�	��3�3�s�7�|�q�7H�!�^�^�3�3�G�<�D�N��"�"�"�"��rDc���|j�J�|j\}}|j�|jntd|�}|s�|jjr�|j
r)|js|jjd}||fS|jj}|jjr|jj|�}tjd|�}||fS)Nr�r�_filter_on_values)
r�r�rr�r4r�r�r0rf�methodcaller)rArrr
�filterss     rBrzResultInternal._unique_strategyTs����(�(�4�4�4� �5�5����� � �,�
����m�T�*�	��D�N�N�:�:��4�4��+�+��>�>�9�9�!�<���� � ��.�.�8�8���>�>�.�.�"�n�n�9�9�'�B�G�#�0�0�1D�g�N���� � rD�r|z#Iterator[_InterimRowType[Row[Any]]]�F�r�rr|z#Optional[_InterimRowType[Row[Any]]]r>�r�r�r|�List[_InterimRowType[Row[Any]]]�r|r^�r�rr|r�)r|r=)r|zCallable[..., Iterator[_R]])r|r>)r|z1Callable[..., Union[Literal[_NoRow._NO_ROW], _R]])r|zCallable[..., List[_R]])rBrrCr�rDrr|r()rBrrCrrDrr|�Optional[_R]�r|r�r|r()rkr�r|r$)r|�_UniqueFilterStateType)r�r�r�r�r�r�r�r�r��
_is_cursorr�r�r�r�r�r rrrr$r+r?rrErOrSrrUr�memoized_attributerr.rDrBr�r��s����I�*.�L�'�.��N�D��3�3�=A��:�A�>B��;�B��J���"�"�$�"'�$��$�	,�$�%)�$�!�$�	(�$�
$�$�'�9�'�9�v'� �'� �D/�#�J'�+�	:�+�'�+�Z'�`�'�`�D��"��&���	�

������"�����	�

����T�"�T��T��	T�

�T�l+�������#�#�!�$�!rDr�c�$�eZdZUdZded<dd�Zy)�	_WithKeysr.r-r�c�.�|jjS)akReturn an iterable view which yields the string keys that would
        be represented by each :class:`_engine.Row`.

        The keys can represent the labels of the columns returned by a core
        statement or the names of the orm classes returned by an orm
        execution.

        The view also can be tested for key containment using the Python
        ``in`` operator, which will test both for the string keys represented
        in the view, as well as for alternate keys such as column objects.

        .. versionchanged:: 1.4 a key view object is returned rather than a
           plain list.


        )r�rCr@s rBrCz_WithKeys.keysts��"�~�~�"�"�"rDNr{)r�r�r�r�r�rCr.rDrBrhrhns���I���#rDrhc�d�eZdZUdZdZdZded<dZded<dZd	ed
<e	j�Zded<d5d
�Zd6d�Z
d7d�Zd8d�Zed9d��Zed9d��Zed:d��Zed;d<d��Zd=d�Zed>d��Ze						d?d��Zed@dAd��Zd@dAd�Z	dB					dCd�ZdDd�ZdEd�ZedFd��ZdFd�ZdGd�ZdHd �ZdId!�Z 	d;			dJd"�Z!dKd#�Z"dLd$�Z#d;dMd%�Z$dKd&�Z%dLd'�Z&dLd(�Z'edNd)��Z(edOd*��Z(dOd+�Z(edPd,��Z)edQd-��Z)dQd.�Z)dId/�Z*edPd0��Z+edOd1��Z+dOd2�Z+dRd3�Z,dSd4�Z-y)T�Resulta\Represent a set of database results.

    .. versionadded:: 1.4  The :class:`_engine.Result` object provides a
       completely updated usage model and calling facade for SQLAlchemy
       Core and SQLAlchemy ORM.   In Core, it forms the basis of the
       :class:`_engine.CursorResult` object which replaces the previous
       :class:`_engine.ResultProxy` interface.   When using the ORM, a
       higher level object called :class:`_engine.ChunkedIteratorResult`
       is normally used.

    .. note:: In SQLAlchemy 1.4 and above, this object is
       used for ORM results returned by :meth:`_orm.Session.execute`, which can
       yield instances of ORM mapped objects either individually or within
       tuple-like rows. Note that the :class:`_engine.Result` object does not
       deduplicate instances or rows automatically as is the case with the
       legacy :class:`_orm.Query` object. For in-Python de-duplication of
       instances or rows, use the :meth:`_engine.Result.unique` modifier
       method.

    .. seealso::

        :ref:`tutorial_fetching_rows` - in the :doc:`/tutorial/index`

    )r��__dict__Nz(Optional[Callable[[Row[Any]], Row[Any]]]r�Frr�r�r5zutil.immutabledict[Any, Any]�_attributesc��||_yr>)r�)rA�cursor_metadatas  rBr�zResult.__init__�s	��(��rDc��|Sr>r.r@s rB�	__enter__zResult.__enter__�����rDc�$�|j�yr>)�close�rA�type_�value�	tracebacks    rB�__exit__zResult.__exit__�s���
�
�rDc�(�|jd��y)a�close this :class:`_engine.Result`.

        The behavior of this method is implementation specific, and is
        not implemented by default.    The method should generally end
        the resources in use by the result object and also cause any
        subsequent iteration or row fetching to raise
        :class:`.ResourceClosedError`.

        .. versionadded:: 1.4.27 - ``.close()`` was previously not generally
           available for all :class:`_engine.Result` classes, instead only
           being available on the :class:`_engine.CursorResult` returned for
           Core statement executions. As most other result objects, namely the
           ones used by the ORM, are proxying a :class:`_engine.CursorResult`
           in any case, this allows the underlying cursor result to be closed
           from the outside facade for the case when the ORM query is using
           the ``yield_per`` execution option where it does not immediately
           exhaust and autoclose the database cursor.

        TrIN)r�r@s rBrtzResult.close�s��(	
���d��#rDc��t��r>rFr@s rB�_soft_closedzResult._soft_closed�s��!�#�#rDc��t��)zkreturn ``True`` if this :class:`_engine.Result` reports .closed

        .. versionadded:: 1.4.43

        rFr@s rB�closedz
Result.closed��
��"�#�#rDc��||_|S)a�Configure the row-fetching strategy to fetch ``num`` rows at a time.

        This impacts the underlying behavior of the result when iterating over
        the result object, or otherwise making use of  methods such as
        :meth:`_engine.Result.fetchone` that return one row at a time.   Data
        from the underlying cursor or other data source will be buffered up to
        this many rows in memory, and the buffered collection will then be
        yielded out one row at a time or as many rows are requested. Each time
        the buffer clears, it will be refreshed to this many rows or as many
        rows remain if fewer remain.

        The :meth:`_engine.Result.yield_per` method is generally used in
        conjunction with the
        :paramref:`_engine.Connection.execution_options.stream_results`
        execution option, which will allow the database dialect in use to make
        use of a server side cursor, if the DBAPI supports a specific "server
        side cursor" mode separate from its default mode of operation.

        .. tip::

            Consider using the
            :paramref:`_engine.Connection.execution_options.yield_per`
            execution option, which will simultaneously set
            :paramref:`_engine.Connection.execution_options.stream_results`
            to ensure the use of server side cursors, as well as automatically
            invoke the :meth:`_engine.Result.yield_per` method to establish
            a fixed row buffer size at once.

            The :paramref:`_engine.Connection.execution_options.yield_per`
            execution option is available for ORM operations, with
            :class:`_orm.Session`-oriented use described at
            :ref:`orm_queryguide_yield_per`. The Core-only version which works
            with :class:`_engine.Connection` is new as of SQLAlchemy 1.4.40.

        .. versionadded:: 1.4

        :param num: number of rows to fetch each time the buffer is refilled.
         If set to a value below 1, fetches all rows for the next buffer.

        .. seealso::

            :ref:`engine_stream_results` - describes Core behavior for
            :meth:`_engine.Result.yield_per`

            :ref:`orm_queryguide_yield_per` - in the :ref:`queryguide_toplevel`

        )r5�rAr7s  rB�	yield_perzResult.yield_per�s��b����rDc�(�t�|f|_|S)aApply unique filtering to the objects returned by this
        :class:`_engine.Result`.

        When this filter is applied with no arguments, the rows or objects
        returned will filtered such that each row is returned uniquely. The
        algorithm used to determine this uniqueness is by default the Python
        hashing identity of the whole tuple.   In some cases a specialized
        per-entity hashing scheme may be used, such as when using the ORM, a
        scheme is applied which  works against the primary key identity of
        returned objects.

        The unique filter is applied **after all other filters**, which means
        if the columns returned have been refined using a method such as the
        :meth:`_engine.Result.columns` or :meth:`_engine.Result.scalars`
        method, the uniquing is applied to **only the column or columns
        returned**.   This occurs regardless of the order in which these
        methods have been called upon the :class:`_engine.Result` object.

        The unique filter also changes the calculus used for methods like
        :meth:`_engine.Result.fetchmany` and :meth:`_engine.Result.partitions`.
        When using :meth:`_engine.Result.unique`, these methods will continue
        to yield the number of rows or objects requested, after uniquing
        has been applied.  However, this necessarily impacts the buffering
        behavior of the underlying cursor or datasource, such that multiple
        underlying calls to ``cursor.fetchmany()`` may be necessary in order
        to accumulate enough objects in order to provide a unique collection
        of the requested size.

        :param strategy: a callable that will be applied to rows or objects
         being iterated, which should return an object that represents the
         unique value of the row.   A Python ``set()`` is used to store
         these identities.   If not passed, a default uniqueness strategy
         is used which may have been assembled by the source of this
         :class:`_engine.Result` object.

        ��setr��rArs  rB�uniquez
Result.uniques��L&)�U�H�$5��!��rDc�$�|j|�S)aEstablish the columns that should be returned in each row.

        This method may be used to limit the columns returned as well
        as to reorder them.   The given list of expressions are normally
        a series of integers or string key names.   They may also be
        appropriate :class:`.ColumnElement` objects which correspond to
        a given statement construct.

        .. versionchanged:: 2.0  Due to a bug in 1.4, the
           :meth:`_engine.Result.columns` method had an incorrect behavior
           where calling upon the method with just one index would cause the
           :class:`_engine.Result` object to yield scalar values rather than
           :class:`_engine.Row` objects.   In version 2.0, this behavior
           has been corrected such that calling upon
           :meth:`_engine.Result.columns` with a single index will
           produce a :class:`_engine.Result` object that continues
           to yield :class:`_engine.Row` objects, which include
           only a single column.

        E.g.::

            statement = select(table.c.x, table.c.y, table.c.z)
            result = connection.execute(statement)

            for z, y in result.columns("z", "y"):
                ...

        Example of using the column objects from the statement itself::

            for z, y in result.columns(
                statement.selected_columns.c.z, statement.selected_columns.c.y
            ):
                ...

        .. versionadded:: 1.4

        :param \*col_expressions: indicates columns to be returned.  Elements
         may be integer row indexes, string column names, or appropriate
         :class:`.ColumnElement` objects corresponding to a select construct.

        :return: this :class:`_engine.Result` object with the modifications
         given.

        �rU�rA�col_expressionss  rB�columnszResult.columns5s��Z�"�"�?�3�3rDc��yr>r.r@s rB�scalarszResult.scalarsds��>ArDc��yr>r.�rArhs  rBr�zResult.scalarsg���rDc��yr>r.r�s  rBr�zResult.scalarsls��FIrDc��t||�S)a@Return a :class:`_engine.ScalarResult` filtering object which
        will return single elements rather than :class:`_row.Row` objects.

        E.g.::

            >>> result = conn.execute(text("select int_id from table"))
            >>> result.scalars().all()
            [1, 2, 3]

        When results are fetched from the :class:`_engine.ScalarResult`
        filtering object, the single column-row that would be returned by the
        :class:`_engine.Result` is instead returned as the column's value.

        .. versionadded:: 1.4

        :param index: integer or row key indicating the column to be fetched
         from each row, defaults to ``0`` indicating the first column.

        :return: a new :class:`_engine.ScalarResult` filtering object referring
         to this :class:`_engine.Result` object.

        )�ScalarResultr�s  rBr�zResult.scalarsos��.�D�%�(�(rDc�h�|jrtd��|jj||�S)zareturn a callable that will retrieve the given key from a
        :class:`_engine.Row`.

        �.can't use this function in 'only scalars' mode)r�rGr�rir[s   rBrizResult._getter�s6���(�(�%�@��
��~�~�%�%�c�8�4�4rDc�f�|jrtd��|jj|�S)zbreturn a callable that will retrieve the given keys from a
        :class:`_engine.Row`.

        r�)r�rGr�rlr_s  rB�
_tuple_getterzResult._tuple_getter�s4��
�(�(�%�@��
��~�~�2�2�4�8�8rDc��t|�S)a�Apply a mappings filter to returned rows, returning an instance of
        :class:`_engine.MappingResult`.

        When this filter is applied, fetching rows will return
        :class:`_engine.RowMapping` objects instead of :class:`_engine.Row`
        objects.

        .. versionadded:: 1.4

        :return: a new :class:`_engine.MappingResult` filtering object
         referring to this :class:`_engine.Result` object.

        )�
MappingResultr@s rB�mappingszResult.mappings�s���T�"�"rDc��|S)z�Apply a "typed tuple" typing filter to returned rows.

        The :attr:`_engine.Result.t` attribute is a synonym for
        calling the :meth:`_engine.Result.tuples` method.

        .. versionadded:: 2.0

        r.r@s rB�tzResult.t�s	���rDc��|S)a,Apply a "typed tuple" typing filter to returned rows.

        This method returns the same :class:`_engine.Result` object
        at runtime,
        however annotates as returning a :class:`_engine.TupleResult` object
        that will indicate to :pep:`484` typing tools that plain typed
        ``Tuple`` instances are returned rather than rows.  This allows
        tuple unpacking and ``__getitem__`` access of :class:`_engine.Row`
        objects to by typed, for those cases where the statement invoked
        itself included typing information.

        .. versionadded:: 2.0

        :return: the :class:`_engine.TupleResult` type at typing time.

        .. seealso::

            :attr:`_engine.Result.t` - shorter synonym

            :attr:`_engine.Row._t` - :class:`_engine.Row` version

        r.r@s rB�tuplesz
Result.tuples�s	��0�rDc��t��)z�Return a safe iterator that yields raw row data.

        This is used by the :meth:`_engine.Result.merge` method
        to merge multiple compatible results together.

        rFr@s rB�_raw_row_iteratorzResult._raw_row_iterator�rrDc�"�|j�Sr>�rOr@s rBr�zResult.__iter__������� � rDc�"�|j�Sr>�rSr@s rB�__next__zResult.__next__�r�rDc#�HK�|j}	|||�}|r|��ny��w)a�Iterate through sub-lists of rows of the size given.

        Each list will be of the size given, excluding the last list to
        be yielded, which may have a small number of rows.  No empty
        lists will be yielded.

        The result object is automatically closed when the iterator
        is fully consumed.

        Note that the backend driver will usually buffer the entire result
        ahead of time unless the
        :paramref:`.Connection.execution_options.stream_results` execution
        option is used indicating that the driver should not pre-buffer
        results, if possible.   Not all drivers support this option and
        the option is silently ignored for those who do not.

        When using the ORM, the :meth:`_engine.Result.partitions` method
        is typically more effective from a memory perspective when it is
        combined with use of the
        :ref:`yield_per execution option <orm_queryguide_yield_per>`,
        which instructs both the DBAPI driver to use server side cursors,
        if available, as well as instructs the ORM loading internals to only
        build a certain amount of ORM objects from a result at a time before
        yielding them out.

        .. versionadded:: 1.4

        :param size: indicate the maximum number of rows to be present
         in each list yielded.  If None, makes use of the value set by
         the :meth:`_engine.Result.yield_per`, method, if it were called,
         or the :paramref:`_engine.Connection.execution_options.yield_per`
         execution option, which is equivalent in this regard.  If
         yield_per weren't set, it makes use of the
         :meth:`_engine.Result.fetchmany` default, which may be backend
         specific and not well defined.

        :return: iterator of lists

        .. seealso::

            :ref:`engine_stream_results`

            :ref:`orm_queryguide_yield_per` - in the :ref:`queryguide_toplevel`

        N�r?�rAr��getter�	partitions    rB�
partitionszResult.partitions�s3����b�%�%����t�T�*�I�������� "c�"�|j�S)z4A synonym for the :meth:`_engine.Result.all` method.�r$r@s rB�fetchallzResult.fetchall ����}�}��rDc�:�|j|�}|tury|S)a�Fetch one row.

        When all rows are exhausted, returns None.

        This method is provided for backwards compatibility with
        SQLAlchemy 1.x.x.

        To fetch the first row of a result only, use the
        :meth:`_engine.Result.first` method.  To iterate through all
        rows, iterate the :class:`_engine.Result` object directly.

        :return: a :class:`_engine.Row` object if no filters are applied,
         or ``None`` if no rows remain.

        N�r+r�rRs  rB�fetchonezResult.fetchone%s#�� �!�!�$�'���'�>���JrDc�&�|j||�S)a�Fetch many rows.

        When all rows are exhausted, returns an empty sequence.

        This method is provided for backwards compatibility with
        SQLAlchemy 1.x.x.

        To fetch rows in groups, use the :meth:`_engine.Result.partitions`
        method.

        :return: a sequence of :class:`_engine.Row` objects.

        .. seealso::

            :meth:`_engine.Result.partitions`

        r�r�s  rB�	fetchmanyzResult.fetchmany;s��&�#�#�D�$�/�/rDc�"�|j�S)a�Return all rows in a sequence.

        Closes the result set after invocation.   Subsequent invocations
        will return an empty sequence.

        .. versionadded:: 1.4

        :return: a sequence of :class:`_engine.Row` objects.

        .. seealso::

            :ref:`engine_stream_results` - How to stream a large result set
            without loading it completely in python.

        r�r@s rB�allz
Result.allPs��"�}�}��rDc�*�|jddd��S)a�Fetch the first row or ``None`` if no row is present.

        Closes the result set and discards remaining rows.

        .. note::  This method returns one **row**, e.g. tuple, by default.
           To return exactly one single scalar value, that is, the first
           column of the first row, use the
           :meth:`_engine.Result.scalar` method,
           or combine :meth:`_engine.Result.scalars` and
           :meth:`_engine.Result.first`.

           Additionally, in contrast to the behavior of the legacy  ORM
           :meth:`_orm.Query.first` method, **no limit is applied** to the
           SQL query which was invoked to produce this
           :class:`_engine.Result`;
           for a DBAPI driver that buffers results in memory before yielding
           rows, all rows will be sent to the Python process and all but
           the first row will be discarded.

           .. seealso::

                :ref:`migration_20_unify_select`

        :return: a :class:`_engine.Row` object, or None
         if no rows remain.

        .. seealso::

            :meth:`_engine.Result.scalar`

            :meth:`_engine.Result.one`

        F�rBrCrD�rEr@s rB�firstzResult.firstcs$��F�!�!�!&�u�U�"�
�	
rDc�*�|jddd��S)a�Return at most one result or raise an exception.

        Returns ``None`` if the result has no rows.
        Raises :class:`.MultipleResultsFound`
        if multiple rows are returned.

        .. versionadded:: 1.4

        :return: The first :class:`_engine.Row` or ``None`` if no row
         is available.

        :raises: :class:`.MultipleResultsFound`

        .. seealso::

            :meth:`_engine.Result.first`

            :meth:`_engine.Result.one`

        TFr�r�r@s rB�one_or_nonezResult.one_or_none�s#��*�!�!�!%�e�E�"�
�	
rDc��yr>r.r@s rB�
scalar_onezResult.scalar_one����36rDc��yr>r.r@s rBr�zResult.scalar_one����!$rDc�*�|jddd��S)a*Return exactly one scalar result or raise an exception.

        This is equivalent to calling :meth:`_engine.Result.scalars` and
        then :meth:`_engine.ScalarResult.one`.

        .. seealso::

            :meth:`_engine.ScalarResult.one`

            :meth:`_engine.Result.scalars`

        Tr�r�r@s rBr�zResult.scalar_one�s#���!�!�!%�d�4�"�
�	
rDc��yr>r.r@s rB�scalar_one_or_nonezResult.scalar_one_or_none�s��EHrDc��yr>r.r@s rBr�zResult.scalar_one_or_none�r�rDc�*�|jddd��S)a0Return exactly one scalar result or ``None``.

        This is equivalent to calling :meth:`_engine.Result.scalars` and
        then :meth:`_engine.ScalarResult.one_or_none`.

        .. seealso::

            :meth:`_engine.ScalarResult.one_or_none`

            :meth:`_engine.Result.scalars`

        TFr�r�r@s rBr�zResult.scalar_one_or_none�s#���!�!�!%�e�D�"�
�	
rDc�*�|jddd��S)aeReturn exactly one row or raise an exception.

        Raises :class:`.NoResultFound` if the result returns no
        rows, or :class:`.MultipleResultsFound` if multiple rows
        would be returned.

        .. note::  This method returns one **row**, e.g. tuple, by default.
           To return exactly one single scalar value, that is, the first
           column of the first row, use the
           :meth:`_engine.Result.scalar_one` method, or combine
           :meth:`_engine.Result.scalars` and
           :meth:`_engine.Result.one`.

        .. versionadded:: 1.4

        :return: The first :class:`_engine.Row`.

        :raises: :class:`.MultipleResultsFound`, :class:`.NoResultFound`

        .. seealso::

            :meth:`_engine.Result.first`

            :meth:`_engine.Result.one_or_none`

            :meth:`_engine.Result.scalar_one`

        TFr�r�r@s rB�onez
Result.one�s#��:�!�!�!%�d�5�"�
�	
rDc��yr>r.r@s rBrDz
Result.scalar�s��9<rDc��yr>r.r@s rBrDz
Result.scalar�s�� rDc�*�|jddd��S)a�Fetch the first column of the first row, and close the result set.

        Returns ``None`` if there are no rows to fetch.

        No validation is performed to test if additional rows remain.

        After calling this method, the object is fully closed,
        e.g. the :meth:`_engine.CursorResult.close`
        method will have been called.

        :return: a Python scalar value, or ``None`` if no rows remain.

        FTr�r�r@s rBrDz
Result.scalar�s#���!�!�!&�u�T�"�
�	
rDc��t|�S)aReturn a callable object that will produce copies of this
        :class:`_engine.Result` when invoked.

        The callable object returned is an instance of
        :class:`_engine.FrozenResult`.

        This is used for result set caching.  The method must be called
        on the result when it has been unconsumed, and calling the method
        will consume the result fully.   When the :class:`_engine.FrozenResult`
        is retrieved from a cache, it can be called any number of times where
        it will produce a new :class:`_engine.Result` object each time
        against its stored set of rows.

        .. seealso::

            :ref:`do_orm_execute_re_executing` - example usage within the
            ORM to implement a result-set cache.

        )�FrozenResultr@s rB�freezez
Result.freeze
s��*�D�!�!rDc�6�t|j|f|z�S)a�Merge this :class:`_engine.Result` with other compatible result
        objects.

        The object returned is an instance of :class:`_engine.MergedResult`,
        which will be composed of iterators from the given result
        objects.

        The new result will use the metadata from this result object.
        The subsequent result objects must be against an identical
        set of result / cursor metadata, otherwise the behavior is
        undefined.

        )�MergedResultr�)rA�otherss  rB�mergezResult.merge!s���D�N�N�T�G�f�,<�=�=rD)ror-�r|r$�rvrrwrrxrr|r��r|r��r|r�r7r�r|r$r>�rzOptional[_UniqueFilterType]r|r$�r�r�r|r$)rA�Result[Tuple[_T]]r|�ScalarResult[_T])rAr�rhz
Literal[0]r|r�)r)rhr�r|zScalarResult[Any]r�)rIr�rQrr|r�r�)r|r�)r|zTupleResult[_TP]�r|zIterator[_RowData])r|zIterator[Row[_TP]])r|zRow[_TP])r�r�r|zIterator[Sequence[Row[_TP]]])r|�Sequence[Row[_TP]])r|zOptional[Row[_TP]])r�r�r|r�)rAr�r|r*�r|r)rAr�r|�Optional[_T]�r|�
Optional[Any])r|�FrozenResult[_TP])r�r�r|zMergedResult[_TP]).r�r�r�r�r�r�r�r�r5r�
immutabledictrmr�rqryrtr�r|r~rr�r�r�rr�rir�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rDr�r�r.rDrBrkrk�s���2*�I�@D�O�=�D�%*��d�*� $�J�
�$�0B��0B�0B�0D�K�-�D�)���$�,�$��$��$��$��1��1�f�&��&�P-4�^�A��A�
����(2��	�����I��I�)�448�5� �5�,0�5�	,�5�	9�#�"�	��	��4$�!�!�%)�8�!�8�	%�8�t�
�,0�*�&%
�N
�2�6��6�
�$��$�
�"�H��H�
�6��6�
�"
�B�<��<�
� �� �
�$"�.>rDrkc���eZdZUdZdZded<ded<dd�Zdd�Zedd	��Z	ddd
�Z
edd��Zedd��Z
dd
�Zedd��Zdd�Z	d			dd�Zdd�Z	d			d d�Zy)!�FilterResultaZA wrapper for a :class:`_engine.Result` that returns objects other than
    :class:`_engine.Row` objects, such as dictionaries or scalar objects.

    :class:`_engine.FilterResult` is the common base for additional result
    APIs including :class:`_engine.MappingResult`,
    :class:`_engine.ScalarResult` and :class:`_engine.AsyncResult`.

    )r�r�r�r�rlr�r�r�r�c��|Sr>r.r@s rBrqzFilterResult.__enter__HrrrDc�>�|jj|||�yr>)r�ryrus    rBryzFilterResult.__exit__Ks�����"�"�5�%��;rDc�F�|jj|�|_|S)a�Configure the row-fetching strategy to fetch ``num`` rows at a time.

        The :meth:`_engine.FilterResult.yield_per` method is a pass through
        to the :meth:`_engine.Result.yield_per` method.  See that method's
        documentation for usage notes.

        .. versionadded:: 1.4.40 - added :meth:`_engine.FilterResult.yield_per`
           so that the method is available on all result set implementations

        .. seealso::

            :ref:`engine_stream_results` - describes Core behavior for
            :meth:`_engine.Result.yield_per`

            :ref:`orm_queryguide_yield_per` - in the :ref:`queryguide_toplevel`

        )r�r�r�s  rBr�zFilterResult.yield_perNs"��&!�-�-�7�7��<����rDc�<�|jj|��y�NrI)r�r�r�s  rBr�zFilterResult._soft_closeds�����%�%�4�%�0rDc�.�|jjSr>)r�r|r@s rBr|zFilterResult._soft_closedgs��� � �-�-�-rDc�.�|jjS)z|Return ``True`` if the underlying :class:`_engine.Result` reports
        closed

        .. versionadded:: 1.4.43

        )r�r~r@s rBr~zFilterResult.closedks��� � �'�'�'rDc�8�|jj�y)zUClose this :class:`_engine.FilterResult`.

        .. versionadded:: 1.4.43

        N)r�rtr@s rBrtzFilterResult.closeus��	
�����!rDc�.�|jjSr>)r�rmr@s rBrmzFilterResult._attributes}s��� � �,�,�,rDc�6�|jj�Sr>)r�r�r@s rBr�zFilterResult._fetchiter_impl�s��� � �0�0�2�2rDc�:�|jj|��S)NrH)r�r�r�s  rBr�zFilterResult._fetchone_impl�s��� � �/�/�:�/�F�FrDc�6�|jj�Sr>)r�r�r@s rBr�zFilterResult._fetchall_impl�s��� � �/�/�1�1rDNc�:�|jj|��S�N�r�)r�r�r�s  rBr�zFilterResult._fetchmany_impl�s��� � �0�0�d�0�;�;rDr�r�r�r[r`r�r�)r|zDict[Any, Any]rZr\r_r>r])r�r�r�r�r�r�rqryrr�r�r�r|r~rtrmr�r�r�r�r.rDrBr�r�2s�����I�<�;����<�����*1��.��.��(��(�"��-��-�3�"'�G��G�	,�G�
2�%)�<�!�<�	(�<rDr�c��eZdZUdZdZdZded<dd�Zddd�Zddd	�Z	dd
�Z
ddd�Zdd�Zdd
�Z
dd�Zdd�Zdd�Zdd�Zy)r�a�A wrapper for a :class:`_engine.Result` that returns scalar values
    rather than :class:`_row.Row` values.

    The :class:`_engine.ScalarResult` object is acquired by calling the
    :meth:`_engine.Result.scalars` method.

    A special limitation of :class:`_engine.ScalarResult` is that it has
    no ``fetchone()`` method; since the semantics of ``fetchone()`` are that
    the ``None`` value indicates no more results, this is not compatible
    with :class:`_engine.ScalarResult` since there is no way to distinguish
    between ``None`` as a row value versus ``None`` as an indicator.  Use
    ``next(result)`` to receive values individually.

    r.Fr�r�c���||_|jr|j|_d|_n;|jj	|g�|_tjd�|_|j|_yrr)r�r�r�r�rdrfrgr�)rAr
rhs   rBr�zScalarResult.__init__�sc��'����/�/�(�2�2�D�N�+/�D�(�(�2�2�:�:�E�7�C�D�N�+3�+>�+>�q�+A�D�(�$/�$D�$D��!rDNc�(�t�|f|_|S)z�Apply unique filtering to the objects returned by this
        :class:`_engine.ScalarResult`.

        See :meth:`_engine.Result.unique` for usage details.

        r�r�s  rBr�zScalarResult.unique����&)�U�H�$5��!��rDc#�HK�|j}	|||�}|r|��ny��w)z�Iterate through sub-lists of elements of the size given.

        Equivalent to :meth:`_engine.Result.partitions` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.

        Nr�r�s    rBr�zScalarResult.partitions�s2�����%�%����t�T�*�I������r�c�"�|j�S)�:A synonym for the :meth:`_engine.ScalarResult.all` method.r�r@s rBr�zScalarResult.fetchall�r�rDc�&�|j||�S)z�Fetch many objects.

        Equivalent to :meth:`_engine.Result.fetchmany` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.

        r�r�s  rBr�zScalarResult.fetchmany�s���#�#�D�$�/�/rDc�"�|j�S)z�Return all scalar values in a sequence.

        Equivalent to :meth:`_engine.Result.all` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.

        r�r@s rBr�zScalarResult.all�s���}�}��rDc�"�|j�Sr>r�r@s rBr�zScalarResult.__iter__�r�rDc�"�|j�Sr>r�r@s rBr�zScalarResult.__next__�r�rDc�*�|jddd��S)z�Fetch the first object or ``None`` if no object is present.

        Equivalent to :meth:`_engine.Result.first` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.


        Fr�r�r@s rBr�zScalarResult.first��#���!�!�!&�u�U�"�
�	
rDc�*�|jddd��S)z�Return at most one object or raise an exception.

        Equivalent to :meth:`_engine.Result.one_or_none` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.

        TFr�r�r@s rBr�zScalarResult.one_or_none��#���!�!�!%�e�E�"�
�	
rDc�*�|jddd��S)z�Return exactly one object or raise an exception.

        Equivalent to :meth:`_engine.Result.one` except that
        scalar values, rather than :class:`_engine.Row` objects,
        are returned.

        TFr�r�r@s rBr�zScalarResult.one�#���!�!�!%�d�5�"�
�	
rD)r
r�rhr�r>r��r�r�r|zIterator[Sequence[_R]]�r|�Sequence[_R]�r�r�r|rrbrc�r|ra)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r.rDrBr�r��sQ��
��I��N�;�;�
E���$�
0��!�!�
�

�

rDr�c��eZdZdZdZeru	d			dd�Zdd�Zdd�Zddd�Z	dd�Z
dd	�Zdd
�Zdd�Z
dd�Zdd
�Zedd��Zedd��Zdd�Ze				d d��Zed!d��Zd!d�Zed d��Zedd��Zdd�Zyy)"�TupleResultaA :class:`_engine.Result` that's typed as returning plain
    Python tuples instead of rows.

    Since :class:`_engine.Row` acts like a tuple in every way already,
    this class is a typing only class, regular :class:`_engine.Result` is
    still used at runtime.

    r.Nc��y)z�Iterate through sub-lists of elements of the size given.

            Equivalent to :meth:`_engine.Result.partitions` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.

            Nr.r�s  rBr�zTupleResult.partitions#s��
rDc��y)z�Fetch one tuple.

            Equivalent to :meth:`_engine.Result.fetchone` except that
            tuple values, rather than :class:`_engine.Row`
            objects, are returned.

            Nr.r@s rBr�zTupleResult.fetchone/���
rDc��y)r�Nr.r@s rBr�zTupleResult.fetchall9s��rDc��y)z�Fetch many objects.

            Equivalent to :meth:`_engine.Result.fetchmany` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.

            Nr.r�s  rBr�zTupleResult.fetchmany=rrDc��y)z�Return all scalar values in a sequence.

            Equivalent to :meth:`_engine.Result.all` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.

            Nr.r@s rBr�zTupleResult.allGrrDc��yr>r.r@s rBr�zTupleResult.__iter__Qs��CrDc��yr>r.r@s rBr�zTupleResult.__next__Ss��#rDc��y)z�Fetch the first object or ``None`` if no object is present.

            Equivalent to :meth:`_engine.Result.first` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.


            Nr.r@s rBr�zTupleResult.firstUs��
rDc��y)z�Return at most one object or raise an exception.

            Equivalent to :meth:`_engine.Result.one_or_none` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.

            Nr.r@s rBr�zTupleResult.one_or_none`rrDc��y)z�Return exactly one object or raise an exception.

            Equivalent to :meth:`_engine.Result.one` except that
            tuple values, rather than :class:`_engine.Row` objects,
            are returned.

            Nr.r@s rBr�zTupleResult.onejrrDc��yr>r.r@s rBr�zTupleResult.scalar_onets��<?rDc��yr>r.r@s rBr�zTupleResult.scalar_onews��%(rDc��y)aBReturn exactly one scalar result or raise an exception.

            This is equivalent to calling :meth:`_engine.Result.scalars`
            and then :meth:`_engine.ScalarResult.one`.

            .. seealso::

                :meth:`_engine.ScalarResult.one`

                :meth:`_engine.Result.scalars`

            Nr.r@s rBr�zTupleResult.scalar_onez���
rDc��yr>r.r@s rBr�zTupleResult.scalar_one_or_none�r�rDc��yr>r.r@s rBr�zTupleResult.scalar_one_or_none�s��7:rDc��y)aBReturn exactly one or no scalar result.

            This is equivalent to calling :meth:`_engine.Result.scalars`
            and then :meth:`_engine.ScalarResult.one_or_none`.

            .. seealso::

                :meth:`_engine.ScalarResult.one_or_none`

                :meth:`_engine.Result.scalars`

            Nr.r@s rBr�zTupleResult.scalar_one_or_none�rrDc��yr>r.r@s rBrDzTupleResult.scalar�s��BErDc��yr>r.r@s rBrDzTupleResult.scalar�r�rDc��y)a�Fetch the first column of the first row, and close the result
            set.

            Returns ``None`` if there are no rows to fetch.

            No validation is performed to test if additional rows remain.

            After calling this method, the object is fully closed,
            e.g. the :meth:`_engine.CursorResult.close`
            method will have been called.

            :return: a Python scalar value , or ``None`` if no rows remain.

            Nr.r@s rBrDzTupleResult.scalar�s��
rDr>r	r
r
rrbrc)rA�TupleResult[Tuple[_T]]r|r*r�)rAr%r|r�r�)r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�rr�r�rDr.rDrBrrs�����I��)-�
	�%�
	�
#�
	�	�	�	�	�	0�%�		�	�	�
�?�
�?�	�(�
�(�
	�
�	�(�	�
�	�
�	�
�:�
�:�
	�
�E�
�E�	�$�
�$�	�KrDrc��eZdZdZdZdZejd�Zdd�Z	ddd�Z
dd�Z	d			dd	�Zdd
�Z
dd�Zddd�Zdd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zy)r�z�A wrapper for a :class:`_engine.Result` that returns dictionary values
    rather than :class:`_engine.Row` values.

    The :class:`_engine.MappingResult` object is acquired by calling the
    :meth:`_engine.Result.mappings` method.

    r.T�_mappingc��||_|j|_|j|_|jr"|jj	dg�|_yyrr)r�r�r�r�rd�rA�results  rBr�zMappingResult.__init__�sK��"���$*�$?�$?��!��)�)����*�*�!�^�^�3�3�Q�C�8�D�N�+rDNc�(�t�|f|_|S)z�Apply unique filtering to the objects returned by this
        :class:`_engine.MappingResult`.

        See :meth:`_engine.Result.unique` for usage details.

        r�r�s  rBr�zMappingResult.unique�r�rDc�$�|j|�S)z:Establish the columns that should be returned in each row.r�r�s  rBr�zMappingResult.columns�s���"�"�?�3�3rDc#�HK�|j}	|||�}|r|��ny��w)z�Iterate through sub-lists of elements of the size given.

        Equivalent to :meth:`_engine.Result.partitions` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.

        Nr�r�s    rBr�zMappingResult.partitions�s2�����%�%����t�T�*�I������r�c�"�|j�S)z;A synonym for the :meth:`_engine.MappingResult.all` method.r�r@s rBr�zMappingResult.fetchall�r�rDc�:�|j|�}|tury|S)z�Fetch one object.

        Equivalent to :meth:`_engine.Result.fetchone` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.

        Nr�rRs  rBr�zMappingResult.fetchone�s#���!�!�$�'���'�>���JrDc�&�|j||�S)z�Fetch many objects.

        Equivalent to :meth:`_engine.Result.fetchmany` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.

        r�r�s  rBr�zMappingResult.fetchmanys���#�#�D�$�/�/rDc�"�|j�S)z�Return all scalar values in a sequence.

        Equivalent to :meth:`_engine.Result.all` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.

        r�r@s rBr�zMappingResult.alls���}�}��rDc�"�|j�Sr>r�r@s rBr�zMappingResult.__iter__r�rDc�"�|j�Sr>r�r@s rBr�zMappingResult.__next__r�rDc�*�|jddd��S)z�Fetch the first object or ``None`` if no object is present.

        Equivalent to :meth:`_engine.Result.first` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.


        Fr�r�r@s rBr�zMappingResult.first rrDc�*�|jddd��S)z�Return at most one object or raise an exception.

        Equivalent to :meth:`_engine.Result.one_or_none` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.

        TFr�r�r@s rBr�zMappingResult.one_or_none-rrDc�*�|jddd��S)z�Return exactly one object or raise an exception.

        Equivalent to :meth:`_engine.Result.one` except that
        :class:`_engine.RowMapping` values, rather than :class:`_engine.Row`
        objects, are returned.

        TFr�r�r@s rBr�zMappingResult.one9rrD)r*r�r>r�r�)r�r�r|zIterator[Sequence[RowMapping]])r|�Sequence[RowMapping])r|zOptional[RowMapping])r�r�r|r7)r|zIterator[RowMapping])r|r)r�r�r�r�r�r�rf�
attrgetterr�r�r�r�r�r�r�r�r�r�r�r�r�r�r.rDrBr�r��s|����I��N�1�h�1�1�*�=��9��4�
%)��!��	'��(�

�	0�	�!�!�
�

�

rDr�c�D�eZdZUdZded<d	d�Zd
d�Z				dd�Zdd�Zy)
r�a�Represents a :class:`_engine.Result` object in a "frozen" state suitable
    for caching.

    The :class:`_engine.FrozenResult` object is returned from the
    :meth:`_engine.Result.freeze` method of any :class:`_engine.Result`
    object.

    A new iterable :class:`_engine.Result` object is generated from a fixed
    set of data each time the :class:`_engine.FrozenResult` is invoked as
    a callable::


        result = connection.execute(query)

        frozen = result.freeze()

        unfrozen_result_one = frozen()

        for row in unfrozen_result_one:
            print(row)

        unfrozen_result_two = frozen()
        rows = unfrozen_result_two.all()

        # ... etc

    .. versionadded:: 1.4

    .. seealso::

        :ref:`do_orm_execute_re_executing` - example usage within the
        ORM to implement a result-set cache.

        :func:`_orm.loading.merge_frozen_result` - ORM function to merge
        a frozen result back into a :class:`_orm.Session`.

    r��datac��|jj�|_|j|_|j|_|jrt|j
��|_y|j�|_yr>)	r�rMr�r�rmr�r�r:r�r)s  rBr�zFrozenResult.__init__os`���(�(�4�4�6��
�(.�(G�(G��%�!�-�-����(�(��V�5�5�7�8�D�I����)�D�IrDc��|jr|jD�cgc]}|g��c}S|jD�cgc]
}t|���c}Scc}wcc}wr>)r�r:r�)rA�elemrs   rB�rewrite_rowszFrozenResult.rewrite_rowsysK���(�(�'+�y�y�1�y�t�T�F�y�1�1�)-���3��#�D��I��3�3��2��3s
�
A�Ac��tjt�}|j|_|j|_|j|_|jr|D�cgc]}|d��	c}|_|S||_|Scc}wrr)r��__new__r�rmr�r:)rA�
tuple_data�fr�ds    rB�
with_new_rowszFrozenResult.with_new_rowssw���
!�
!�,�
/���m�m����)�)���&*�&C�&C��#��(�(�%/�0�Z��q��t�Z�0�B�G��	�!�B�G��	��1s�A<c��t|jt|j��}|j|_|j
|_|Sr>)�IteratorResultr�r�r:rmr�r)s  rB�__call__zFrozenResult.__call__�s@��&4��M�M�4��	�	�?�'
��"�-�-���*.�*G�*G��'��
rDN)r*�Result[_TP])r|zSequence[Sequence[Any]])rAr�r|r�)r|rH)	r�r�r�r�r�r�r>rDrGr.rDrBr�r�Fs4��$�L��*�4��,��	��rDr�c��eZdZdZdZdZ		d
							dd�Zedd��Zddd�Z	dd�Z
dd�Zdd	�Z	d			dd
�Z
dd�Z	d			dd�Zy)rFz�A :class:`_engine.Result` that gets data from a Python iterator of
    :class:`_engine.Row` objects or similar row-like data.

    .. versionadded:: 1.4

    FNc�<�||_||_||_||_yr>)r��iterator�rawr�)rArorKrLr�s     rBr�zIteratorResult.__init__�s!��)��� ��
����(@��%rDc��|jS)z{Return ``True`` if this :class:`_engine.IteratorResult` has
        been closed

        .. versionadded:: 1.4.43

        )�_hard_closedr@s rBr~zIteratorResult.closed�s��� � � rDc��|rd|_|j�|jjdd|i|��tg�|_|j�d|_y)NTr�r.)rNrLr�r�rK�_reset_memoizationsr|)rAr��kws   rBr�zIteratorResult._soft_close�sR��� $�D���8�8�� �D�H�H� � �1�d�1�b�1��R���
�� � �"� ��rDc�,�tjd��)NzThis result object is closed.)r�ResourceClosedErrorr@s rB�_raise_hard_closedz!IteratorResult._raise_hard_closed�s���%�%�&E�F�FrDc��|jSr>)rKr@s rBr�z IteratorResult._raw_row_iterator�s���}�}�rDc�R�|jr|j�|jSr>)rNrTrKr@s rBr�zIteratorResult._fetchiter_impl�s!������#�#�%��}�}�rDc��|jr|j�t|jt�}|tur|j|��y|Sr�)rNrT�nextrKr�r�)rAr�rs   rBr�zIteratorResult._fetchone_impl�sI������#�#�%��4�=�=�'�*���'�>����*��-���JrDc��|jr|j�	t|j�|j	�S#|j	�wxYwr>)rNrTr�rKr�r@s rBr�zIteratorResult._fetchall_impl�sA������#�#�%�	���
�
�&������D����s�A�Ac��|jr|j�ttj|j
d|��Srr)rNrTr��	itertools�islicerKr�s  rBr�zIteratorResult._fetchmany_impl�s7������#�#�%��I�$�$�T�]�]�A�t�<�=�=rDr�)ror-rK�(Iterator[_InterimSupportsScalarsRowType]rLr�r�rr�r[�r�rrQrr|r�)r|rr�)r|r]r\r_r>r])r�r�r�r�rNr|r�r�r~r�rTr�r�r�r�r�r.rDrBrFrF�s�����L��L�&*�).�
A�'�
A�;�
A�#�	
A�
#'�
A��!��!�!�G���"'����	,���%)�>�!�>�	(�>rDrFc�>�ttg�tg��Sr>)rFr�r�r.rDrB�null_resultr`�s���.�r�2�D��H�=�=rDc�p��eZdZdZ			d									dd�Zedd��Zd	d
�fd�
Z	d			d�fd�
Z�xZ	S)
�ChunkedIteratorResulta�An :class:`_engine.IteratorResult` that works from an
    iterator-producing callable.

    The given ``chunks`` argument is a function that is given a number of rows
    to return in each chunk, or ``None`` for all rows.  The function should
    then return an un-consumed iterator of lists, each list of the requested
    size.

    The function can be called at any time again, in which case it should
    continue from the same result set but adjust the chunk size as given.

    .. versionadded:: 1.4

    c��||_||_||_||_tj
j
|jd��|_||_yr>)	r��chunksr�rLr[�chain�
from_iterablerK�dynamic_yield_per)rArord�source_supports_scalarsrLrgs      rBr�zChunkedIteratorResult.__init__�sH��)������(?��%����!���5�5�d�k�k�$�6G�H��
�!2��rDc�z�||_tjj|j	|��|_|Sr>)r5r[rerfrdrKr�s  rBr�zChunkedIteratorResult.yield_per	s/�����!���5�5�d�k�k�#�6F�G��
��rDc�8��t�|�dd|i|��d�|_y)Nr�c��gSr>r.r�s rB�<lambda>z3ChunkedIteratorResult._soft_close.<locals>.<lambda>	s��2rDr.)�superr�rd)rAr�rQr�s   �rBr�z!ChunkedIteratorResult._soft_close	s���
���,��,��,�%��rDc���|jr3tjj|j	|��|_t�|�|��Sr�)rgr[rerfrdrKrmr�)rAr�r�s  �rBr�z%ChunkedIteratorResult._fetchmany_impl	s@����!�!�%�O�O�9�9�$�+�+�d�:K�L�D�M��w�&�D�&�1�1rD)FNF)
ror-rdzBCallable[[Optional[int]], Iterator[Sequence[_InterimRowType[_R]]]]rhrrLr�rgrr�r[r^r>r])
r�r�r�r�r�rr�r�r��
__classcell__�r�s@rBrbrb�s����
�*).�%)�"'�3�'�3�
�3�"&�
3�#�3� �3�"�	��	�&�
%)�2�!�2�	(�2�2rDrbc�F��eZdZUdZdZded<				d�fd�Zdd	d�Z�xZS)
r�z�A :class:`_engine.Result` that is merged from any number of
    :class:`_engine.Result` objects.

    Returned by the :meth:`_engine.Result.merge` method.

    .. versionadded:: 1.4

    Fr��rowcountc�j��||_t�|�	|tjjd�|D���|dj|_|dj|_|dj|_|jj|D�cgc]}|j��c}�|_	ycc}w)Nc3�<K�|]}|j����y�wr>)r�)r/�rs  rBr0z(MergedResult.__init__.<locals>.<genexpr>9	s����*�/6�!��#�#�%�w�s�r)�_resultsrmr�r[rerfr�r5r�rm�
merge_with)rAro�resultsrur�s    �rBr�zMergedResult.__init__3	s���� ��
�
�����O�O�)�)�*�/6�*�
�	
�%,�A�J�$C�$C��!�!�!�*�/�/���)0��
�(K�(K��%�6�4�+�+�6�6�%,�
-�W��a�m�m�W�
-�
����
-s�B0c�b�|jD]}|jdd|i|���|rd|_yy)Nr�Tr.)rvr�r~)rAr�rQrus    rBr�zMergedResult._soft_closeH	s5�����A��A�M�M�*�t�*�r�*����D�K�rD)ror-rxzSequence[Result[_TP]]r[r^)	r�r�r�r�r~r�r�r�rorps@rBr�r�&	s4�����F���
�-�
�8M�
�*�rDr�r>)r�r7r�r�r|z#Callable[[Iterable[Any]], Row[Any]])r|zIteratorResult[Any])Xr��
__future__r�enumrr�r[rf�typingrrrrr	r
rrr
rrrrrrrrrrrr�rr�sql.baserrrr r!�util._has_cyr"�util.typingr#r$�_py_rowr%�"sqlalchemy.cyextension.resultproxy�sql.elementsr&�sql.type_apir'r��_KeyTyper�r�r�r5�_RowData�_RawRowTyper(r*r+�_InterimRowType�_InterimSupportsScalarsRowType�_ProcessorsTyper��_UniqueFilterTyperdr-�KeysViewr?r�r�r�r�r�rhrkr�r��
TypingOnlyrr�r�rFr`rbr�r.rDrB�<module>r�s���,�"�����
���������������� �������"�"�(�4��*�!��	����3�M�	���0�3���.�.�/���h��m�$�
����h��.�/����S��:�s�*�+����C��H�o��;��T��"���T����
�e�5��c��?�+����K��(���
"'�s�3�x��}�!5���8�$?�@�A���X�c�]�O�X�c�]�:�;���c�U�C�Z�(���s�3�x��2C�)D�D�E��u$�u$�p)�����$�)�DK�>�K�^37����"/��(���T���.�.��S!�&����S!�l#�#�4g
>�Y��s�3�x�0�g
>�T]<�>�"�%�]<�@@
�<��#�@
�F`�,�r�"�D�O�O�`�FK
�I�|�J�7�K
�\M�7�3�<�M�`P>�V�C�[�P>�f>�62�N�3�/�62�r&�>�#�&�&rD

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic