Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/engine/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/engine/__pycache__/default.cpython-311.pyc

�

�܋fI���H�dZddlZddlZddlZddlZddlmZddlmZddlmZddlm	Z	dd	lm
Z
dd
lmZddlmZddlm
Zdd
lmZddlmZddlmZddlmZddlmZejdejejz��Zejdejejz��ZGd�dej��ZGd�de��ZGd�deej��Z Gd�deej!��Z"Gd�deej#��Z$Gd�de��Z%Gd �d!ej&��Z'e'e_(dS)"aDefault implementations of per-dialect sqlalchemy.engine classes.

These are semi-private implementation classes which are only of importance
to database dialect authors; dialects will usually use the classes here
as the base class for their own corresponding classes.

�N�)�
interfaces)�
reflection)�result�)�event)�exc)�pool)�
processors)�types)�util)�compiler)�
expression)�schema)�quoted_namez-\s*(?:UPDATE|INSERT|CREATE|DELETE|DROP|ALTER)z	\s*SELECTc��eZdZdZejZejZej	Z
ejZdZ
dZdZdZeZdZdZdZdZdZdZdZdZdZdZdZdZdZe j!de j"d��fde j#fde j"d	��fd
e j"d	��fde j#fde j#fd
e j#fde j$fg��Z%dZ&e j'r	dZ(dZ)dZ*dZ+ndZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2iZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<	dZ=dZ>e j!��Z?	e j@d���											d?d���ZAe jBd���ZCeDd���ZEeDd���ZFeGd���ZHeGd���ZId�ZJd �ZKd!�ZLd"�ZMd@d#�ZNd$�ZOd%�ZPd&�ZQd@d'�ZRd(�ZSd)�ZTd*�ZUd+�ZVd,�ZWd-�ZXd.�ZYd/�ZZd0�Z[d1�Z\e jBd2���Z]d3�Z^d4�Z_d5�Z`d6�Zad7�Zbd@d8�Zcd@d9�Zdd@d:�Zed;�Zfd<�Zgd=�Zhd>�ZidS)A�DefaultDialectz!Default implementation of DialectTFr�convert_unicode�force�pool_timeout�echo�debug�	echo_pool�pool_recycle�	pool_size�max_overflow�pool_threadlocalN�use_encoding�defaulti'�named�)z1.3z�The :paramref:`_sa.create_engine.convert_unicode` parameter and corresponding dialect-level parameters are deprecated, and will be removed in a future release.  Modern DBAPIs support Python Unicode natively and this parameter is unnecessary.)r�utf-8�staticc��t|dd��stjd|jz��||_||_d|_d|_||_|�||_	n%|j�|jj	|_	n|j
|_	|�||_|j	dv|_|�|��|_
|�|��|_|�||_|�||_||_|	|_|	dkrd|_n+|	dvrd|_|	dk|_nt+jd	���|
|_|jr|j|_||_|jd
krt7j|��|_n%|j�t7j|j��|_t=j|j��|_ t7j|j��|_!dS)N�ported_sqla_06Tz2The %s dialect is not yet ported to the 0.6 formatF)�qmark�format�numericr#)�dynamic�dynamic_warnr*z?empty_in_strategy may be 'static', 'dynamic', or 'dynamic_warn'r)"�getattrr
�warn�namer�encoding�
positional�_ischema�dbapi�
paramstyle�default_paramstyle�implicit_returning�preparer�identifier_preparer�
type_compiler�supports_right_nested_joins�supports_native_boolean�case_sensitive�empty_in_strategy�_use_static_in�_warn_on_empty_inr	�
ArgumentError�#_user_defined_max_identifier_length�max_identifier_length�label_length�description_encodingr�to_unicode_processor_factory�_description_decoder�codecs�
getencoder�_encoder�_decoder)
�selfrr.r2r1r4r8r:r9r;r@rA�kwargss
             �P/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/engine/default.py�__init__zDefaultDialect.__init__�s��2�t�-�t�4�4�	��I�D��)��
�
�
�
 /��� ��
������
���
��!�(�D�O�O�
�Z�
#�"�j�3�D�O�O�"�5�D�O��)�&8�D�#��/�-K�K���#'�=�=��#6�#6�� �!�/�/��5�5���&�2�/J�D�,�"�.�+B�D�(�,���!2�����(�(�"&�D���
�"=�
=�
=�"'�D��%6�.�%H�D�"�"��#�/���
�
4I��0��3�	��8�
�&�)����$��6�6��7��)�)�D�%�%��
&�
2��7��'�))�))�D�%��)�$�-�8�8��
�"�?��
�N�N��
�
�
�c�(�tj��S�N)�weakref�WeakKeyDictionary�rIs rK�_type_memoszDefaultDialect._type_memoss���(�*�*�*rMc�&�|jdz|jzS)N�+)r-�driverrRs rK�dialect_descriptionz"DefaultDialect.dialect_descriptions���y�3����,�,rMc��|jS)z�True if this dialect supports sane rowcount even if RETURNING is
        in use.

        For dialects that don't support RETURNING, this is synonymous with
        ``supports_sane_rowcount``.

        )�supports_sane_rowcountrRs rK� supports_sane_rowcount_returningz/DefaultDialect.supports_sane_rowcount_returnings
���*�*rMc�8�t|dtj��S)N�	poolclass)r+r
�	QueuePool)�cls�urls  rK�get_pool_classzDefaultDialect.get_pool_class)s���s�K���8�8�8rMc��d�|j�d��dd���}	t|dz��dS#t$rYdSwxYw)N�.r���z
.provision)�join�
__module__�split�
__import__�ImportError)r^�packages  rK�load_provisioningz DefaultDialect.load_provisioning-sl���(�(�3�>�/�/��4�4�Q�r�T�:�;�;��	��w��-�.�.�.�.�.���	�	�	��D�D�	���s�A�
A�Ac��	|�|��|_n#t$r
d|_YnwxYw	|�|��|_n#t$r
d|_YnwxYw	|�|j��|_n#t$r
d|_YnwxYw|�|��|_	|j
�#|�|��rdx|_|_
|j
s|�|��}|r||_|jr3|j|jkr%t#jd|j|jfz���dSdS)NzQLabel length of %d is greater than this dialect's maximum identifier length of %d)�_get_server_version_info�server_version_info�NotImplementedError�_get_default_schema_name�default_schema_name�get_default_isolation_level�
connection�default_isolation_level�_check_unicode_returns�returns_unicode_stringsrB�_check_unicode_descriptionrDr?�_check_max_identifier_lengthr@rAr	r>)rIrr�max_ident_lengths   rK�
initializezDefaultDialect.initialize5s���	,�'+�'D�'D��(�(�D�$�$��#�	,�	,�	,�'+�D�$�$�$�	,����	,�'+�'D�'D��(�(�D�$�$��#�	,�	,�	,�'+�D�$�$�$�	,����	0�+/�+K�+K��%�,�,�D�(�(��#�	0�	0�	0�+/�D�(�(�(�	0����(,�'B�'B�:�'N�'N��$�
�%�1��/�/�
�;�;�
2�EI�H�D�%��(A��7�	>�#�@�@��L�L���
>�-=��*�
��	��!�D�$>�>�>��#�3��$�d�&@�A�B���
�		�	�>�>s/��1�1�A�A$�#A$�(B�B�Bc��dSrOr!rRs rK�
on_connectzDefaultDialect.on_connectas���trMc��dS)z�Perform a connection / server version specific check to determine
        the max_identifier_length.

        If the dialect's class level max_identifier_length should be used,
        can return None.

        .. versionadded:: 1.3.9

        Nr!)rIrrs  rKrwz+DefaultDialect._check_max_identifier_lengthes	���trMc�,�|�|��S)a�Given a DBAPI connection, return its isolation level, or
        a default isolation level if one cannot be retrieved.

        May be overridden by subclasses in order to provide a
        "fallback" isolation level for databases that cannot reliably
        retrieve the actual isolation level.

        By default, calls the :meth:`_engine.Interfaces.get_isolation_level`
        method, propagating any exceptions raised.

        .. versionadded:: 1.3.22

        )�get_isolation_level�rI�
dbapi_conns  rKrqz*DefaultDialect.get_default_isolation_levelqs���'�'�
�3�3�3rMc�������tjr�js
tj�ntj��jr�����ni�����fd��tjtj	d��tjd����tjtj	d��tjd����g}|r||z
}�fd�|D��}|�
ddg��rdS|dhkS)	Nc�����tj|g���������}	�j���}��||���|���}|���t|dtj
��S#tj$r"}tj
d|z��Yd}~dSd}~wwxYw)N��dialectrz2Exception attempting to detect unicode returns: %rF)r�select�compilerr�cursor�_cursor_execute�fetchone�close�
isinstancer
�	text_typer	�
DBAPIErrorr,)	�test�	statementr��row�de�cast_torr�
parametersrIs	     ����rK�
check_unicodez<DefaultDialect._check_unicode_returns.<locals>.check_unicode�s�������!�4�&�)�)�1�1�$�1�?�?���I�
:�#�.�5�5�7�7���*�*�6�9�j�I�I�I��o�o�'�'��������"�#�a�&�$�.�9�9�9���>�
�
�
��	�1�35�6�����u�u�u�u�u�����
���s�AB-�-C�<C�Cz'test plain returns'�<z'test unicode returns'c�&��h|]
}�|����Sr!r!)�.0r�r�s  �rK�	<setcomp>z8DefaultDialect._check_unicode_returns.<locals>.<setcomp>�s#���9�9�9�4�=�=��&�&�9�9�9rMTF�conditional)r
�py2k�supports_unicode_statements�binary_typer�r/�execute_sequence_formatr�cast�literal_column�sqltypes�VARCHAR�Unicode�
issuperset)rIrr�additional_tests�tests�resultsr�r�r�s``   @@@rKrtz%DefaultDialect._check_unicode_returns�s3��������9�	%�T�=�	%��&�G�G��n�G��?�	��5�5�7�7�J�J��J�	:�	:�	:�	:�	:�	:�	:�	:�,
�O��)�*@�A�A�� ��$�$�
�
�
�O��)�*B�C�C�� ��$�$�
�
�
���	&��%�%�E�9�9�9�9�5�9�9�9�����t�U�m�,�,�	%� �=��t�f�$�$rMc	��tjr|js
tj}ntj}|j���}	|�|tj	tj
d���d��g���|�������t|jddtj��|���S#|���wxYw)Nz'x'�
some_labelr�r)r
r�r�r�r�rrr��executerr�r��labelr�r��descriptionr�)rIrrr�r�s    rKrvz)DefaultDialect._check_unicode_description�s���
�9�	%�T�=�	%��&�G�G��n�G��&�-�-�/�/��
	��N�N����%�#�2�5�9�9�?�?��M�M�N����g�d�g�+�+���
�
�
��f�0��3�A�6���G�G��L�L�N�N�N�N��F�L�L�N�N�N�N���s
�BC0�0Dc�6�tj||j��S)a)Provide a database-specific :class:`.TypeEngine` object, given
        the generic object which comes from the types module.

        This method looks for a dictionary called
        ``colspecs`` as a class or instance-level variable,
        and passes on to :func:`_types.adapt_type`.

        )r��
adapt_type�colspecs)rI�typeobjs  rK�type_descriptorzDefaultDialect.type_descriptor�s���"�7�D�M�:�:�:rMc�b�tj�|��}|j||||fi|��SrO)r�	Inspector�from_engine�reflecttable)rIrr�table�include_columns�exclude_columns�resolve_fks�opts�insps        rKr�zDefaultDialect.reflecttable�sG���#�/�/�
�;�;�� �t� ��?�O�[�
�
�DH�
�
�	
rMc�(�d|j||fd|i|��iS)z�Compatibility method, adapts the result of get_primary_keys()
        for those dialects which don't implement get_pk_constraint().

        �constrained_columnsr)�get_primary_keys)rI�conn�
table_namer�kws     rK�get_pk_constraintz DefaultDialect.get_pk_constraint�s=��
"�#8�4�#8��j�$�$�)/�$�35�$�$�
�	
rMc�r�t|��|jkrtjd||jfz���dS)Nz7Identifier '%s' exceeds maximum length of %d characters)�lenr@r	�IdentifierError)rI�idents  rK�validate_identifierz"DefaultDialect.validate_identifier�sF���u�:�:��2�2�2��%�I��$�4�5�6���
�3�2rMc�&�|jj|i|��SrO)r1�connect)rI�cargs�cparamss   rKr�zDefaultDialect.connect�s��!�t�z�!�5�4�G�4�4�4rMc�f�|���}|�|j��g|gSrO)�translate_connect_args�update�query)rIr_r�s   rK�create_connect_argsz"DefaultDialect.create_connect_args�s1���)�)�+�+�����C�I�����D�z�rMc������d|vr)|d�tj|d����fd���}d|vrCtj|d����|_tj|d���fd���}dSdS)N�isolation_level�engine_connectc�<��|s��|���dSdSrO)�_set_connection_isolation)rr�branchr�rIs  ��rK�
set_isolationzBDefaultDialect.set_engine_execution_options.<locals>.set_isolations4����P��2�2�:��O�O�O�O�O�P�PrM�schema_translate_mapc����|_dSrO)�schema_for_object)rrr��getters  �rK�set_schema_translate_mapzMDefaultDialect.set_engine_execution_options.<locals>.set_schema_translate_maps���/5�
�,�,�,rM)r�listens_forr�_schema_getterr�)rI�enginer�r�r�r�r�s`    @@rK�set_engine_execution_optionsz+DefaultDialect.set_engine_execution_optionss��������$�$�"�#4�5�O�
�
�v�'7�
8�
8�
P�
P�
P�
P�
P�9�
8�
P�"�T�)�)��*�4�0F�+G�H�H�F�'-�F�$�
�
�v�'7�
8�
8�
6�
6�
6�
6�9�
8�
6�
6�
6�*�)rMc��d|vr|�||d��d|vr#tj|d��}||_dSdS)Nr�r�)r�rr�r�)rIrrr�r�s    rK� set_connection_execution_optionsz/DefaultDialect.set_connection_execution_optionss`����$�$��*�*�:�t�<M�7N�O�O�O�!�T�)�)��*�4�0F�+G�H�H�F�+1�J�(�(�(�*�)rMc���|���rtjd��|�|j|��|jjj�|j��dS)Nz�Connection is already established with a Transaction; setting isolation_level may implicitly rollback or commit the existing transaction, or have no effect until next transaction)	�in_transactionr
r,�set_isolation_levelrr�_connection_record�finalize_callback�append�reset_isolation_level)rIrr�levels   rKr�z(DefaultDialect._set_connection_isolations{���$�$�&�&�	��I�#�
�
�
�	
� � ��!6��>�>�>���0�B�I�I��&�	
�	
�	
�	
�	
rMc��dSrOr!�rI�dbapi_connections  rK�do_beginzDefaultDialect.do_begin*����rMc�.�|���dSrO)�rollbackr�s  rK�do_rollbackzDefaultDialect.do_rollback-s���!�!�#�#�#�#�#rMc�.�|���dSrO)�commitr�s  rK�	do_commitzDefaultDialect.do_commit0s�����!�!�!�!�!rMc�.�|���dSrO)r�r�s  rK�do_closezDefaultDialect.do_close3s����� � � � � rMc�n�ttjdg���|�����S)Nrr�)�strrr�r�rRs rK�_dialect_specific_select_onez+DefaultDialect._dialect_specific_select_one6s.���:�$�a�S�)�)�1�1�$�1�?�?�@�@�@rMc�2�d}	|���}	|�|j��|���n#|���wxYw	dS#|jj$r#}|�|||��rYd}~dS�d}~wwxYw�NTF)r�r�r�r�r1�Error�
is_disconnect)rIr�r��errs    rK�do_pingzDefaultDialect.do_ping:s�����	�%�,�,�.�.�F�
����t�@�A�A�A���������������������4��
�z��	�	�	��!�!�#�'7��@�@�
��u�u�u�u�u������		���s3�A$�A�A$�A�A$�$B�3B�B�Bc�8�dtjdddz��zS)z�Create a random two-phase transaction ID.

        This id will be passed to do_begin_twophase(), do_rollback_twophase(),
        do_commit_twophase().  Its format is unspecified.
        z	_sa_%032xrr�)�random�randintrRs rK�
create_xidzDefaultDialect.create_xidJs���V�^�A�q�C�x�8�8�8�8rMc�T�|�tj|����dSrO)r�r�SavepointClause�rIrrr-s   rK�do_savepointzDefaultDialect.do_savepointSs'�����:�5�d�;�;�<�<�<�<�<rMc�T�|�tj|����dSrO)r�r�RollbackToSavepointClausers   rK�do_rollback_to_savepointz'DefaultDialect.do_rollback_to_savepointVs'�����:�?��E�E�F�F�F�F�FrMc�T�|�tj|����dSrO)r�r�ReleaseSavepointClausers   rK�do_release_savepointz#DefaultDialect.do_release_savepointYs'�����:�<�T�B�B�C�C�C�C�CrMc�2�|�||��dSrO)�executemany�rIr�r�r��contexts     rK�do_executemanyzDefaultDialect.do_executemany\s�����9�j�1�1�1�1�1rMc�2�|�||��dSrO�r�rs     rK�
do_executezDefaultDialect.do_execute_s�����y�*�-�-�-�-�-rMc�0�|�|��dSrOr)rIr�r�rs    rK�do_execute_no_paramsz#DefaultDialect.do_execute_no_paramsbs�����y�!�!�!�!�!rMc��dS)NFr!)rI�errr�s    rKr�zDefaultDialect.is_disconnectes���urMc�<�|�||j��dSrO)r�rsrs  rKr�z$DefaultDialect.reset_isolation_levelhs#��	
� � ��T�-I�J�J�J�J�JrMc�V�|�dStjr/t|t��r|�|j��}|���}|���}||kr|S||kr|j�	|��s|S||krt|d���S|S)NT)�quote)r
r�r�r��decoder.�lower�upperr6�_requires_quotesr�rIr-�
name_lower�
name_uppers    rK�normalize_namezDefaultDialect.normalize_namens����<��4��9�	2��$��$�$�
2��{�{�4�=�1�1���Z�Z�\�\�
��Z�Z�\�\�
���#�#��K�
�4�
�
��$�5�5�
�&�&� �
��
�4�
�
��t�4�0�0�0�0��KrMc�,�|�dS|���}|���}||kr|S||kr|j�|��s|}tjr1|js|�|j��}nt|��}|SrO)
rr r6r!r
r��supports_unicode_binds�encoder.�unicoder"s    rK�denormalize_namezDefaultDialect.denormalize_name�s����<��4��Z�Z�\�\�
��Z�Z�\�\�
���#�#��K�
�4�
�
��$�5�5�
�&�&� ��D��9�	%��.�
%��{�{�4�=�1�1����t�}�}���rM)Fr"NNNNTNr#NNrO)j�__name__re�__qualname__�__doc__r�SQLCompiler�statement_compiler�DDLCompiler�ddl_compiler�GenericTypeCompilerr7�IdentifierPreparerr5�supports_alter�supports_comments�inline_comments�default_sequence_base�tupler��supports_views�supports_sequences�sequences_optional�"preexecute_autoincrement_sequences�postfetch_lastrowidr4r8�cte_follows_insert�supports_native_enumr9�#non_native_boolean_check_constraint�supports_simple_order_by_label�tuple_in_valuesr
�
immutabledict�bool_or_str�asint�asbool�engine_config_types�supports_native_decimal�py3kr�r'rurBr-r@r?�max_index_name_length�max_constraint_name_lengthrY�supports_sane_multi_rowcountr�r3�supports_default_values�supports_empty_insert�supports_multivalues_insert�supports_is_distinct_from�supports_server_side_cursors�supports_for_update_ofrm�construct_arguments�requires_name_normalize�reflection_options�dbapi_exception_translation_map�deprecated_paramsrL�memoized_propertyrS�propertyrWrZ�classmethodr`rjryr{rwrqrtrvr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrr�r�r%r*r!rMrKrr,s������+�+�!�-���'�L��0�M��*�H��N����O���$���N�����).�&�����"&���� ��#��*.�'�%)�"��O�,�$�,�
� 0�� 0�� 9� 9�:�
�T�Z�(�
�%�T�%�g�.�.�/�
�*�$�*�7�3�3�4�
�T�Z�(�
�$�*�%�
�T�Z�(�
���-�		
���� $���y�	.�&*�#�!%��"&��#���&+�#�!&��"'��-���D�!��*.�'�
!��!%��!��#'� ��H� ��#�� ��"'�� $��#(� �#������"�R$����&8�d�&8�&:�&:�#���T��
���������$(�� $�"�"��HO�HO�HO���HO�T
��+�+���+��-�-��X�-��+�+��X�+��9�9��[�9�����[��*�*�*�X���
�
�
�4�4�4� 5%�5%�5%�5%�n���.	;�	;�	;�
�
�
�	
�	
�	
�	
����5�5�5����6�6�6�"2�2�2�
�
�
�
�
�
�$�$�$�"�"�"�!�!�!�
��A�A���A���� 9�9�9�=�=�=�G�G�G�D�D�D�2�2�2�2�.�.�.�.�"�"�"�"����K�K�K����:����rMrc��eZdZd�ZdS)�_RendersLiteralc��d�}|S)Nc��d|zS)Nz'%s'r!)�values rK�processz2_RendersLiteral.literal_processor.<locals>.process�s���E�>�!rMr!)rIr�r`s   rK�literal_processorz!_RendersLiteral.literal_processor�s��	"�	"�	"��rMN)r+rer,rar!rMrKr\r\�s#����������rMr\c��eZdZdS)�_StrDateTimeN�r+rer,r!rMrKrcrc���������DrMrcc��eZdZdS)�_StrDateNrdr!rMrKrgrg�rerMrgc��eZdZdS)�_StrTimeNrdr!rMrKriri�rerMric��eZdZejZejZejZ	ej
ZdZdZ
dZdZdZdZejeejeejeiZdS)�StrCompileDialectTFN)r+rer,r�StrSQLCompilerr/r0r1�StrSQLTypeCompilerr7r3r5r:r;r<r4r9rAr��DateTimerc�Daterg�Timerir�r!rMrKrkrk�sr������!�0���'�L��/�M��*�H�����).�&���"��%)�"�	��<��
�x��
�x��H�H�HrMrkc�p�eZdZdZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZej��Zed���Zed���Zd�Zed���Zed���Zejd���Zejd	���Zejd
���Zejd���Zejd���Zejd
���Z ejd���Z!d�Z"e#d���Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*d�Z+d�Z,d�Z-d�Z.e#d���Z/d�Z0d�Z1d�Z2d�Z3d �Z4d!�Z5d"�Z6	d+d#�Z7d$�Z8dZ9	d,d&�Z:d'�Z;d(�Z<d)�Z=d*�Z>dS)-�DefaultExecutionContextFNc�z�|�|��}||_||_|j|_|x|_}d|_|j|_|jr8t|j��|_|j�	|j��|j
s?tj|��|_
|�|j
��d|_n tj|��x|_|_
|���|_g|_|jr|���g|_nig|_|S)z8Initialize execution context for a DDLElement construct.Tr)�__new__�root_connection�_dbapi_connectionr��compiled�isddl�execution_options�_execution_options�dictr�r�r
r��unicode_statementrGr��
create_cursorr��compiled_parametersr/r�r�)r^r�rrr��compiled_ddlrIrws       rK�	_init_ddlz!DefaultExecutionContext._init_ddl�s(���{�{�3����)���!1���!�)���#/�/��
����
�!)�!;����(�	I�%)�$�*@�%A�%A�D�"��"�)�)�*�*G�H�H�H��2�	O�%)�^�H�%=�%=�D�"�$�-�-�d�.D�E�E�a�H�D�N�N�6:�n�X�6N�6N�N�D�N�T�3��(�(�*�*���#%�� ���	#�&�>�>�@�@�A�D�O�O�!�d�D�O��rMc�������|�|��}||_||_|j|_�|_�jsJ��j�|j��|_�j	�j
�jf|_tj���|_�js*|j�|jj��|_n|j|_�j|_�j|_�j|_�j|_|s����g|_n8�fd�t7|��D��|_t9|��dk|_|���|_|js|js|jrKd|_ tC�jj"��|_#tC�j$o�jj"��|_%|jj&s|jj'r0|jr|�(��n|�)���j*��j+r&tY����|�-����}n�j.r|jj/}g}�j.r�|jD]{�g}|D]L}	|	�vr+|�0�|	�|	�����1|�0�|	���M|�0��1|�����|nc�j}
|jD]S�|
rtY���fd��D����}ntY��fd��D����}|�0|���T��1|��|_2|S)z6Initialize execution context for a Compiled construct.c�D��g|]\}}��||�����S))�
_group_number)�construct_params)r��grp�mrws   �rK�
<listcomp>z:DefaultExecutionContext._init_compiled.<locals>.<listcomp>.s@���(�(�(��C���)�)�!�3�)�?�?�(�(�(rMrTc3��K�|]B}��|��d|�vr�|�|��n�|fV��CdS)rN�rG)r��key�compiled_paramsr�rs  ���rK�	<genexpr>z9DefaultExecutionContext._init_compiled.<locals>.<genexpr>_s�����!�!� �$�,�,�S�1�1�!�4�"�j�0�0�,�J�s�O�O�C�,@�A�A�A�!0��!5�	�!�!�!�!�!�!rMc3�b�K�|])}||�vr�|�|��n�|fV��*dSrOr!)r�r�r�rs  ��rKr�z9DefaultExecutionContext._init_compiled.<locals>.<genexpr>isl�����!�!� � �"�j�0�0�,�J�s�O�O�C�,@�A�A�A�!0��!5�	�!�!�!�!�!�!rM)3rtrurvr�rw�can_executery�unionrz�_result_columns�_ordered_columns�_textual_ordered_columns�result_column_structr
r�r|r�r(r.r��isinsert�isupdate�isdelete�isplaintext�is_textr�r~�	enumerater�rr}r��is_crud�bool�
_returning�_is_explicit_returning�	returning�_is_implicit_returning�insert_prefetch�update_prefetch�_process_executemany_defaults�_process_executesingle_defaults�_bind_processors�contains_expanding_parametersr{�_expand_in_parametersr/�positiontupr�r�r�)
r^r�rrr�rwr�rIr��paramr�r(r�rs
 `  `      @@rK�_init_compiledz&DefaultExecutionContext._init_compileds�������{�{�3����)���!1���!�)��� ��
��#�#�#�#�!)�!;�!A�!A��)�"
�"
���

�$��%��-�%
��!�"&���!9�!9����2�	4�!�3�:�:���%���D�N�N�"�3�D�N� �)��
� �)��
� �)��
��+����	3�(0�(A�(A�(C�(C�'D�D�$�$�(�(�(�(�'�
�3�3�(�(�(�D�$�
 #�:����2�D���(�(�*�*����=�	�D�M�	�T�]�	��D�L�*.�x�/A�/L�*M�*M�D�'�*.��"�H�8�+=�+H�'H�+�+�D�'��=�(�	7�D�M�,I�	7���
7��2�2�4�4�4�4��4�4�6�6�6��.�
��1�	4��j�)�)�J��4�4�X�z�J�J�K�K�
�
 �	4��-�3�K�
�
���"	)�#'�#;�
J�
J����&�;�;�C��j�(�(����_�Z��_�_�S�5I�%J�%J�K�K�K�K����_�S�%9�:�:�:�:��!�!�'�"A�"A�%�"H�"H�I�I�I�I�
J�!�<�<�F�#'�#;�
)�
)���� �!�!�!�!�!�!�$3�!�!�!���E�E�!�!�!�!�!�!�$3�!�!�!���E��!�!�%�(�(�(�(�!�9�9�*�E�E����rMc�
���	�
���jrtjd����jjr�jjrt
d���i�_�jd}|jrg}nd}i�
i}|jr�jj	n�jj
D�]ъ	�jj
�	}|j�r��	�
vr
|�	��n|��	��}|s9gx�|�	<�j�
|jr|jn|jg���
�	<n�t!|dt"t$f��re�	fd�t'|d��D��x�|�	<�jjrdndd	���fd
�t'|��D����z�
�	<nE�	fd�t'|d��D��x�|�	<d	��fd��D�����
�	<|�����j�	�fd
��D����|jr|�d��D����d��D���j�	<���|jr|��	����ӈ
fd�}t5jd|�j���_|S)z�handle special 'expanding' parameters, IN tuples that are rendered
        on a per-parameter basis for an otherwise fixed SQL statement string.

        z7'expanding' parameters can't be used with executemany()zQ'expanding' bind parameters not supported with 'numeric' paramstyle at this time.rNc�Z��g|]'\}}t|d��D]\}}��d|�d|��|f���(S)r�_)r�)r��i�
tuple_element�jr_r-s     �rKr�zADefaultExecutionContext._expand_in_parameters.<locals>.<listcomp>�sh���<�<�<� 0��=�,5�m�Q�,G�,G�<�<�!)��5�,0�4�4����A�A�6��>�<�<�<�<rMrzVALUES ��, c3����K�|];\��dd�����fd�t���D����zV��<dS)z(%s)r�c3�~�K�|]7\}}�jjd��t���z|zdizV��8dS)r-rN)rw�bindtemplater�)r�r�r_r�rI�	to_updater�s   ����rKr�zJDefaultExecutionContext._expand_in_parameters.<locals>.<genexpr>.<genexpr>�ss�����(�(�%-�A�u�
!%�
� :�$*�I�()�C�
�,>�,>�(>��(B�-&�&'�-)�#"�!"�(�(�(�(�(�(rMN)rdr�)r�r�r�rIr�s @@��rKr�z@DefaultExecutionContext._expand_in_parameters.<locals>.<genexpr>�s��������&�&�!1��=�#�"�i�i�(�(�(�(�(�(�(�1:�-�0H�0H�(�(�(���	�&�&�&�&�&�&rMc�(��g|]\}}��d|��|f��S)r�r!)r�r�r_r-s   �rKr�zADefaultExecutionContext._expand_in_parameters.<locals>.<listcomp>�s=���<�<�<� (��5�)-���a�a�0�%�8�<�<�<rMc3�@�K�|]\}}�jjd|izV��dS)r-N)rwr�)r�r�r_rIs   �rKr�z@DefaultExecutionContext._expand_in_parameters.<locals>.<genexpr>�sQ�����B�B� *��U�!�M�6�&�#��F�B�B�B�B�B�BrMc3�:�K�|]\}}��v�	|��fV��dSrOr!)r�r�r_r-rs   ��rKr�z@DefaultExecutionContext._expand_in_parameters.<locals>.<genexpr>�sH�����"�"�"��U��z�)�)��*�T�*�+�)�)�)�)�"�"rMc3� K�|]	\}}|V��
dSrOr!)r�r-r_s   rKr�z@DefaultExecutionContext._expand_in_parameters.<locals>.<genexpr>�s&����&I�&I���e�t�&I�&I�&I�&I�&I�&IrMc��g|]\}}|��Sr!r!)r��
expand_keyr_s   rKr�zADefaultExecutionContext._expand_in_parameters.<locals>.<listcomp>�s)��3�3�3�#4�:�u�J�3�3�3rMc�:���|�d��S)Nr)�group)r��replacement_expressionss �rK�process_expandingzHDefaultExecutionContext._expand_in_parameters.<locals>.process_expanding�s���*�1�7�7�1�:�:�6�6rMz\[EXPANDING_(\S+)\])rr	�InvalidRequestErrorrwr/�_numeric_bindsrn�_expanded_parametersr~r��binds�	expanding�pop�visit_empty_set_expr�_expanding_in_types�typer�r8�listr�r�rBrdr��extendr��re�subr�)rIrwrr�r��to_update_sets�	parameter�valuesr�r-r�r�s` `      @@@rKr�z-DefaultExecutionContext._expand_in_parametersys��������
��	��)�L���
��=�#�	��
�(D�	�%�5���
�
%'��!��2�1�5����	��K�K��K�"$�����"�
%�D�M�%�%���$�H	)�H	)�D�
�
�+�D�1�I��"�B
)��2�2�2� .�t� 4�I�I�-�0�0��6�6�F�!�'�;=�=�	�N�4�$8�!�M�>�>�(�<�2�I�9�9�"+�.�!1���0� ���$�F�1�I��t�}�=�=��<�<�<�<�4=�f�a�4H�4H�<�<�<��	�N�4�$8�*.��)E�M�I�I�2� �I�I�&�&�&�&�&�5>�f�4E�4E�&�&�&���9�/��5�5� <�<�<�<�,5�f�a�,@�,@�<�<�<��	�N�4�$8�9=�	�	�B�B�B�B�.7�B�B�B�9�9�/��5�
 �&�&�y�1�1�1�!�
�!�"�"�"�"�"�&/�"�"�"����
�&�J��&�&�&I�&I�y�&I�&I�&I�I�I�I�3�3�8A�3�3�3��)�$�/�/��$�
)��"�"�4�(�(�(��	7�	7�	7�	7�	7���"�$5�t�~�
�
����rMc����|�|��}||_||_|j|_d|_|j|_|s0|jjr����g|_	n�ig|_	nwt|d�j��r||_	nTt|dt��r&�jr||_	n*�fd�|D��pig|_	n�fd�|D��|_	t|��dk|_�jsBt|tj��r(||_��|��d|_n|x|_|_|���|_|S)z8Initialize execution context for a string SQL statement.Trc�0���g|]���fd��D����S)c�T��i|]$}��|��d�|��%S)rr�)r��k�dr�s  ��rK�
<dictcomp>zFDefaultExecutionContext._init_statement.<locals>.<listcomp>.<dictcomp>s2���=�=�=�a�W�%�%�a�(�(��+�Q�q�T�=�=�=rMr!)r�r�r�s @�rKr�z;DefaultExecutionContext._init_statement.<locals>.<listcomp>sA����#�#�#��>�=�=�=�=�1�=�=�=�#�#�#rMc�:��g|]}��|����Sr!)r�)r��pr�s  �rKr�z;DefaultExecutionContext._init_statement.<locals>.<listcomp>s4������78��/�/��2�2���rMr)rtrurvr�r�rzryr/r�r�r�r{r�r�rr
r�r|rGr�r}r�)r^r�rrr�r�r�rIs `     rK�_init_statementz'DefaultExecutionContext._init_statement�s�����{�{�3����)���!1���!�)������",�!>����	��|�&�
'�#*�#B�#B�#D�#D�"E����#%�$����
�
�1�
�w�'F�
G�
G�
	�(�D�O�O�
�
�1�
�t�
,�
,�	��2�
�",����#�#�#�#�'�#�#�#�#��T����
����<F����D�O��z�?�?�Q�.����2�	@�z��t�~�8
�8
�	@�&/�D�"�$�-�-�i�8�8��;�D�N�N�6?�?�D�N�T�3��(�(�*�*����rMc��|�|��}||_||_|j|_|j|_|���|_|S)z;Initialize execution context for a ColumnDefault construct.)rtrurvr�rzryr}r�)r^r�rrr�rIs     rK�
_init_defaultz%DefaultExecutionContext._init_defaultsR���{�{�3����)���!1���!�)���!+�!>����(�(�*�*����rMc��|jr|jjSd|jvr*|jj�|jd��S|jjS)Nr�)rwr5ryr�r6�_with_schema_translaterRs rKr6z+DefaultExecutionContext.identifier_preparer#s[���=�	4��=�)�)�
#�t�'=�
=�
=��<�3�J�J��&�'=�>���
��<�3�3rMc��|jjSrO)rur�rRs rKr�zDefaultExecutionContext.engine.s���#�*�*rMc��|jjSrO)rw�	postfetchrRs rK�postfetch_colsz&DefaultExecutionContext.postfetch_cols2s
���}�&�&rMc�R�|jr|jjS|jr|jjSdS)Nr!)r�rwr�r�r�rRs rK�
prefetch_colsz%DefaultExecutionContext.prefetch_cols6s1���=�	��=�0�0�
�]�	��=�0�0��2rMc��|jjdSrO)rwr�rRs rK�returning_colsz&DefaultExecutionContext.returning_cols?s���
����rMc�8�|j�dd��S)N�
no_parametersF)ry�getrRs rKr�z%DefaultExecutionContext.no_parametersCs���%�)�)�/�5�A�A�ArMc���|j�d|jr|jrtjpd��}|tjur|�|j��S|S)N�
autocommitF)ryr�rwr�r�PARSE_AUTOCOMMIT�should_autocommit_textr|)rIr�s  rK�should_autocommitz)DefaultExecutionContext.should_autocommitGsq���+�/�/���
��
,���
,��+�
��
�
�
���4�4�4��.�.�t�/E�F�F�F��rMc���|j}t|tj��r,|jjs |j�|��d}|jjr|j���}ni}|�	|j
|||���|j
���d}|�>|�|j|j
j
dd��}|r||��S|S)aExecute a string statement on the current cursor, returning a
        scalar result.

        Used to fire off sequences, default phrases, and "select lastrowid"
        types of statements individually or in the context of a parent INSERT
        or UPDATE statement.

        r)rNr)rur�r
r�r�r�rGr/r�r�r�r��_cached_result_processorr�)rI�stmt�type_r��default_params�r�procs       rK�_execute_scalarz'DefaultExecutionContext._execute_scalarVs����#���t�T�^�,�,�	2��L�<�	2��<�(�(��.�.�q�1�D��<�"�	 �!�\�A�A�C�C�N�N��N����T�[�$����M�M�M��K� � �"�"�1�%�����1�1���d�k�5�a�8��;���D��
��t�A�w�w���rMc�4�|j���SrO)ru�_branchrRs rKrrz"DefaultExecutionContext.connectionws���#�+�+�-�-�-rMc�6�t�|��SrO)�AUTOCOMMIT_REGEXP�match)rIr�s  rKr�z.DefaultExecutionContext.should_autocommit_text{s�� �&�&�y�1�1�1rMc��|jjsdS|jjr�|j�dd��o||jr$t
|jjtj	��pQ|jp#t
|jjtj
��o%|jot�|j��}n|j�dd��}|S)NF�stream_resultsT)
r�rQ�server_side_cursorsryr�rwr�r�r�
Selectable�
TextClause�SERVER_SIDE_CURSOR_REr�)rI�use_server_sides  rK�_use_server_side_cursorz/DefaultExecutionContext._use_server_side_cursor~s����|�8�	��5��<�+�	�"�4�8�8� �$�����M��"��
�/��1F���
�!%�
�-��)� $�
� 7��9N� � �H�!�N�
H�2�7�7���G�G�!
�O�*#�4�8�8� �%���O��rMc��|���rd|_|���Sd|_|j���Sr�)r�_is_server_side�create_server_side_cursorrvr�rRs rKr}z%DefaultExecutionContext.create_cursor�sM���'�'�)�)�	3�#'�D� ��1�1�3�3�3�#(�D� ��)�0�0�2�2�2rMc��t���rO)rnrRs rKrz1DefaultExecutionContext.create_server_side_cursor�s��!�#�#�#rMc��dSrOr!rRs rK�pre_execz DefaultExecutionContext.pre_exec�r�rMc��dSrOr!rRs rK�	post_execz!DefaultExecutionContext.post_exec�r�rMc�8�|�|j|��S)z�Return a 'result processor' for a given type as present in
        cursor.description.

        This has a default implementation that dialects can override
        for context-sensitive result type handling.

        )r�r�)rIr��colname�coltypes    rK�get_result_processorz,DefaultExecutionContext.get_result_processor�s���-�-�d�l�G�D�D�DrMc��|jjS)a�return self.cursor.lastrowid, or equivalent, after an INSERT.

        This may involve calling special cursor functions,
        issuing a new SELECT on the cursor (or a new one),
        or returning a stored value that was
        calculated within post_exec().

        This function will only be called for dialects
        which support "implicit" primary key generation,
        keep preexecute_autoincrement_sequences set to False,
        and when no explicit id value was bound to the
        statement.

        The function is called once, directly after
        post_exec() and before the transaction is committed
        or ResultProxy is generated.   If the post_exec()
        method assigns a value to `self._lastrowid`, the
        value is used in place of calling get_lastrowid().

        Note that this method is *not* equivalent to the
        ``lastrowid`` method on ``ResultProxy``, which is a
        direct proxy to the DBAPI ``lastrowid`` accessor
        in all cases.

        )r��	lastrowidrRs rK�
get_lastrowidz%DefaultExecutionContext.get_lastrowid�s��4�{�$�$rMc��dSrOr!)rIrs  rK�handle_dbapi_exceptionz.DefaultExecutionContext.handle_dbapi_exception�r�rMc�`�|jrtj|��Stj|��SrO)rr�BufferedRowResultProxy�ResultProxyrRs rK�get_result_proxyz(DefaultExecutionContext.get_result_proxy�s/����	,��0��6�6�6��%�d�+�+�+rMc��|jjSrO)r��rowcountrRs rKrz DefaultExecutionContext.rowcount�s
���{�#�#rMc��|jjSrO)r�rYrRs rKrYz.DefaultExecutionContext.supports_sane_rowcount�s
���|�2�2rMc��|jjSrO)r�rLrRs rKrLz4DefaultExecutionContext.supports_sane_multi_rowcount�s
���|�8�8rMc�t�|jrV|jsO|js-|jjs!|jjr|���n|js|���|�	��}|jrg|jrB|j
��}||_|�|��|j
��d|_nv|js|j
��d|_nX|jr4|jr-|j
��}||_|j
��d|_n|j�|j|j
��|SrO)r�rr�rw�inliner�r=�_setup_ins_pk_from_lastrowid�_setup_ins_pk_from_emptyrr��returned_defaults�%_setup_ins_pk_from_implicit_returning�_soft_close�	_metadatar�r�r)rIrr�s   rK�_setup_crud_result_proxyz0DefaultExecutionContext._setup_crud_result_proxy�sr���=�
	0��!1�
	0��/�	
0��
�,�	
0��L�4�	
0��1�1�3�3�3�3��0�
0��-�-�/�/�/��&�&�(�(���=�	!��*�
(�%�f�o�'�'��),��&��:�:�3�?�?�?�"��"�$�$�$�#'�� � ��0�
(�"��"�$�$�$�#'�� ��
�]�	!�t�:�	!�!�&�/�#�#�C�%(�D�"��F�� � � �#�F���
�
�
%�
�O�O��F�� � � ��
rMc�r�����|jjd�|jjj}|jd�|������S|j���-�j�|j	d��}|�|��������fd�|j
D��|_dS��fd�|j
D��|_dS)Nrrc�Z��g|]'}|�ur�n���|��d����(SrO�r�)r��c�autoinc_colr��
key_getterrs  ����rKr�zHDefaultExecutionContext._setup_ins_pk_from_lastrowid.<locals>.<listcomp>sU���)�)�)����#�#��	�$�(�(���A����=�=�)�)�)rMc�N��g|]!}���|��d����"SrOr&�r�r'r�r)s  ��rKr�zHDefaultExecutionContext._setup_ins_pk_from_lastrowid.<locals>.<listcomp>'sA���)�)�)�� �#�#�J�J�q�M�M�4�8�8�)�)�)rM)rw�_key_getters_for_crud_columnr�r�r~r�_autoincrement_columnr�r�r��primary_key�inserted_primary_key)rIr�r�r(r�r)rs   @@@@rKrz4DefaultExecutionContext._setup_ins_pk_from_lastrowids�������]�?��B�
��
�'�-���2�1�5���&�&�(�(�	�� ��5�K��&�"�'�@�@��L�$�����#� $��Y���I�)�)�)�)�)�)�)��*�	)�)�)�D�%�%�%�)�)�)�)�)��*�)�)�)�D�%�%�%rMc����|jjd�|jjj}|jd���fd�|jD��|_dS)Nrrc�N��g|]!}���|��d����"SrOr&r+s  ��rKr�zDDefaultExecutionContext._setup_ins_pk_from_empty.<locals>.<listcomp>0s>���%
�%
�%
�9:�O���
�
�1�
�
�t�4�4�%
�%
�%
rM)rwr,r�r�r~r.r/)rIr�r�r)s  @@rKrz0DefaultExecutionContext._setup_ins_pk_from_empty,sf�����]�?��B�
��
�'�-���2�1�5��%
�%
�%
�%
�%
�>C�>O�%
�%
�%
��!�!�!rMc��������	d|_dS|jjd�|jjj}|jd��fd���fd�|jD��D��|_dS)Nrrc�.��g|]\}}|��|n|��SrOr!)r��colr_r�s   �rKr�zQDefaultExecutionContext._setup_ins_pk_from_implicit_returning.<locals>.<listcomp><s9���%
�%
�%
���U��
�C��H�H�5�%
�%
�%
rMc�R��g|]#}|���|��d��f��$SrOr&)r�r4r�r)s  ��rKr�zQDefaultExecutionContext._setup_ins_pk_from_implicit_returning.<locals>.<listcomp>>sF��������o�)�)�*�*�S�/�/�4�@�@�A���rM)r/rwr,r�r�r~r.)rIr�r�r�r)s ` @@rKr z=DefaultExecutionContext._setup_ins_pk_from_implicit_returning4s�������;�(,�D�%��F��]�?��B�
��
�'�-���2�1�5��%
�%
�%
�%
������ �,����%
�%
�%
��!�!�!rMc�P�|js|jot|jj��SrO)r�r�r�rwr�rRs rK�lastrow_has_defaultsz,DefaultExecutionContext.lastrow_has_defaultsDs,���
�.���
�D��M�#�5
�5
�	
rMc�z��t|jd��sdSi}|jjD]p}|j�|j��}t|��}|�|jj�����|r�|vr||vr|r�|vs||vr�||<�kd||<�q|jjr2|jj	�
||j|j|j
|��|jjr�g}|jjD]|}	|jj|	}|�|d�����P|	|jvr2|��gt)|j|	��z���g|�����}	|jj|�dS#t.$r)}
|j�|
ddd|��Yd}
~
dSd}
~
wwxYwi}|jj���D]�\}}	|�|d�����|r|�|	|	��}	|jjs |j�|	��d}	|	|jvr-|��fd�|j|	D�������||	<��	|jjdi|��dS#t.$r)}
|j�|
ddd|��Yd}
~
dSd}
~
wwxYw)a&Given a cursor and ClauseParameters, call the appropriate
        style of ``setinputsizes()`` on the cursor, using DB-API types
        from the bind parameter's ``TypeEngine`` objects.

        This method only called by those dialects which require it,
        currently cx_oracle.

        �
bind_namesNrc3� �K�|]}|�fV��	dSrOr!)r�r��dbtypes  �rKr�z:DefaultExecutionContext.set_input_sizes.<locals>.<genexpr>�s<�����2�2� *�(��0�2�2�2�2�2�2rMr!)�hasattrrwr9r��_unwrapped_dialect_implr��get_dbapi_typer1�_has_events�dispatch�do_setinputsizesr�r�r�r/r�r�r�r�r�r�r��
setinputsizes�
BaseExceptionru�_handle_dbapi_exception�itemsr'rGr�)
rI�	translate�
include_types�
exclude_types�
inputsizes�	bindparam�dialect_impl�dialect_impl_cls�positional_inputsizesr�r�keyword_inputsizesr;s
            @rK�set_input_sizesz'DefaultExecutionContext.set_input_sizesIs�����t�}�l�3�3�	��F��
���1�	-�	-�I�$�>�A�A�$�,�O�O�L�#�L�1�1��!�0�0���1C�D�D�F��"�%�#��]�2�2�(�
�=�=�&�>���.�.�'�=�8�8�)/�
�9�%�%�(,�
�9�%�%��<�#�	��L�!�2�2��D�K�����$�
�
�
��<�"�*	�$&�!��}�0�	
=�	
=�� �M�/��4�	�#���	�4�8�8���%��d�7�7�7�-�4�4�#�H�s�4�+D�S�+I�'J�'J�J�����.�4�4�V�<�<�<��
�)���)�+@�A�A�A�A�� �
�
�
��$�<�<��t�T�4���������������
����
"$��"&�-�":�"@�"@�"B�"B�
9�
9��	�3�#���	�4�8�8���%� �6�(�m�m�C��5�5���<�>�<�"�l�3�3�C�8�8��;���d�7�7�7�*�1�1�2�2�2�2�.2�.G��.L�2�2�2�����
39�*�3�/��
�)���)�?�?�,>�?�?�?�?�?�� �
�
�
��$�<�<��t�T�4���������������
���s0�.E?�?
F2�	F-�-F2�3J�
J:�J5�5J:c��|jr|�||��S|jr||_|�|��S|jr�|j}|jstj	|j|��}n|j}tj
|g���|���}|�|di���
��S|jS)N)�bindr!)�is_sequence�
fire_sequence�is_callable�current_column�arg�is_clause_elementrr�
_arg_is_typedr�type_coercer�r��_execute_compiled�scalar)rI�columnrr�r��default_argr's       rK�
_exec_defaultz%DefaultExecutionContext._exec_default�s�����	��%�%�g�u�5�5�5�
�
 �	�"(�D���;�;�t�$�$�$�
�
&�	��?�D��(�
*�(�4�W�[�%�H�H���%�k���!�;�-�0�0�8�8�d�8�C�C�A��)�)�!�R��4�4�;�;�=�=�=��;�rMTc����	|j�|j}n"#t$rtjd���wxYw|r�|jr�|jjjr�|j	r$|j
dz�|jj�|ji}n|j�|ji}d�|jjj
d���}|���fd�|D����|S�S)aiReturn a dictionary of parameters applied to the current row.

        This method can only be used in the context of a user-defined default
        generation function, e.g. as described at
        :ref:`context_default_functions`. When invoked, a dictionary is
        returned which includes entries for each column/value pair that is part
        of the INSERT or UPDATE statement. The keys of the dictionary will be
        the key value of each :class:`_schema.Column`,
        which is usually synonymous
        with the name.

        :param isolate_multiinsert_groups=True: indicates that multi-valued
         INSERT constructs created using :meth:`_expression.Insert.values`
         should be
         handled by returning only the subset of parameters that are local
         to the current column default invocation.   When ``False``, the
         raw parameters of the statement are returned including the
         naming convention used in the case of multi-valued INSERT.

        .. versionadded:: 1.2  added
           :meth:`.DefaultExecutionContext.get_current_parameters`
           which provides more functionality over the existing
           :attr:`.DefaultExecutionContext.current_parameters`
           attribute.

        .. seealso::

            :attr:`.DefaultExecutionContext.current_parameters`

            :ref:`context_default_functions`

        zdget_current_parameters() can only be invoked in the context of a Python side column default functionrrc3�6�K�|]}|�d|�fzfV��dS)z%s_m%dNr!)r�r��indexr�s  ��rKr�zADefaultExecutionContext.get_current_parameters.<locals>.<genexpr>sG�������?B��j��S�%�L�!8�9�:������rM)�current_parametersrU�AttributeErrorr	r�r�rwr��_has_multi_parameters�_is_multiparam_columnra�originalr�r��keysr�)rI�isolate_multiinsert_groupsr\r�rgrar�s     @@rK�get_current_parametersz.DefaultExecutionContext.get_current_parameters�s-����B	��0�J��(�F�F���	�	�	��)�C���
�	����
'�	��
�	��
�'�=�	�
�+�
���q�(���_�(�*�V�Z�*@�A����Z��F�J�!7�8�����=�*�5�a�8�=�=�?�?�D�
�H�H������FJ����
�
�
��H��s��2c�V�|j�dS|�||j|j��SrO)rr^r��rIr\s  rK�get_insert_defaultz*DefaultExecutionContext.get_insert_default	s+���>�!��4��%�%�f�f�n�f�k�J�J�JrMc�V�|j�dS|�||j|j��SrO)�onupdater^r�rks  rK�get_update_defaultz*DefaultExecutionContext.get_update_defaults+���?�"��4��%�%�f�f�o�v�{�K�K�KrMc��|jjd}i}|jj}|jj}|D]$}|jr|jjr|jj||<�%|D]$}|jr|jjr|jj||<�%|jD]w}||_	|D]4}||vr	||}n|�
|��}|�||||��<�5|D]4}||vr	||}n|�|��}|�||||��<�5�x|`	dS)Nr)rwr,r�r�r�	is_scalarrVrnr~rbrlro)rIr)�scalar_defaultsr�r�r'r��vals        rKr�z5DefaultExecutionContext._process_executemany_defaultssc���]�?��B�
����-�7���-�7��
!�	3�	3�A��y�
3�Q�Y�0�
3�%&�Y�]���"�� �	4�	4�A��z�
4�a�j�2�
4�%&�Z�^���"���-�	/�	/�E�&+�D�#�$�
/�
/����'�'�)�!�,�C�C��1�1�!�4�4�C��?�+.�E�*�*�Q�-�-�(��$�
/�
/����'�'�)�!�,�C�C��1�1�!�4�4�C��?�+.�E�*�*�Q�-�-�(��

/�
�#�#�#rMc�~�|jjd}|jdx|_}|jjD]S}|jr%|jjs|jjr
|jj}n|�	|��}|�||||��<�T|jj
D]'}|�|��}|�||||��<�(|`dS)Nrr)rwr,r~rbr�rrRrqrVrlr�ro)rIr)r~r'rss     rKr�z7DefaultExecutionContext._process_executesingle_defaults:s����]�?��B�
�
�$�Q�'�	(������.�	9�	9�A��y�
1���!6�
1�1�9�;N�
1��i�m����-�-�a�0�0����58�#�J�J�q�M�M�2����.�	9�	9�A��)�)�!�,�,�C���58�#�J�J�q�M�M�2���#�#�#rM)NNN)T)?r+rer,r�r�r�r�r�rxrrwr�r�rr�r��_translate_colnamer
rCr�rZr�r�r�r�r�rXr6r�r�r�r�r�r�r�rYrrr�rr}rrr	r
rrrrrYrLr#rrr r7rOr^rbrirlror�r�r!rMrKrrrr�s��������H��H��H��G��G��E��K��H��I�����"��"����-�4�-�/�/������[��@�s�s��[�s�jl�l�l�\�-�-��[�-�^�	�	��[�	�
��4�4���4�
��+�+���+�
��'�'���'�
�������
�� � ��� �
��B�B���B�
����������B�.�.��X�.�2�2�2����@3�3�3�$�$�$�
�
�
�
�
�
�E�E�E�%�%�%�8
�
�
�,�,�,��$�$��X�$�3�3�3�9�9�9�%�%�%�N���:
�
�
�
�
�
� 
�
�
�AE�V�V�V�V�p���&���0:�:�:�:�xK�K�K�L�L�L�#$�#$�#$�J$�$�$�$�$rMrr))r-rErr�rPr�rrrrr	r
rrr�r
�sqlrrr�sql.elementsrr��I�UNICODEr�r��Dialectr�objectr\rnrcrorgrprirk�ExecutionContextrr�execution_ctx_clsr!rMrK�<module>r~s������
�
�
�
�
�
�
�	�	�	�	����������������������������������������������� � � � � � �������������������������&�&�&�&�&�&��B�J�4�b�d�R�Z�6G����
#��
�<����
�1B�C�C��s	�s	�s	�s	�s	�Z�'�s	�s	�s	�l�����f����	�	�	�	�	�?�H�$5�	�	�	�	�	�	�	�	���
�	�	�	�	�	�	�	�	���
�	�	�	����������.A$�A$�A$�A$�A$�j�9�A$�A$�A$�H$;�� � � rM

Hacked By AnonymousFox1.0, Coded By AnonymousFox