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__/default.cpython-312.pyc

�

���g�J��|�dZddlmZddlZddlZddlZddlZddlmZddl	Z	ddl	m
Z
ddl	mZddl	mZddl	m
Z
dd	l	mZdd
l	mZddl	mZddl	mZdd
l	mZddl	mZddl	mZddl	mZddl	mZddl	mZddl	mZddlZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddlm%Z%ddl&m'Z'ddl&m(Z(d d!lm)Z)d d"lm*Z*d d#lm+Z+d d$lm,Z,d d%l-m.Z.d d&l-m/Z/d d'l-m0Z0d d(l-m1Z1d d$l-m,Z2d d)l3m4Z4d d*l5m6Z6d d+l7m8Z8d d,l7m9Z9d d-l7m:Z:d d.l;m<Z<d d/l=m>Z>d d0l=m?Z?e	j.r�dd1l@mAZAdd2lmBZBdd3lmCZCdd4lmDZDdd5lmEZEdd6lmFZFdd7lmGZGdd8lmHZHdd9lmIZIdd:lmJZJdd;lmKZKdd<lmLZLdd=lMmNZNdd>lOmPZPd d?l)mQZQd d@l+mRZRd dAl+mSZSd dBl-mTZTd dCl7mUZUd dDl7mVZVd dEl7mWZWd dFlXmYZYd dGlXmZZZd dHl;m[Z[d dIl\m]Z]d dJl^m_Z_d dKl^m`Z`d dLl^maZaej�dMej�ej�z�Zeefe!�\ZgZhZiZjZkGdN�dOe#�ZlGdP�dQel�ZmGdR�dSe%�Znenel_oy)TaDefault 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.

�)�annotationsN)�perf_counter)�Any)�Callable)�cast)�Dict)�List)�Mapping)�MutableMapping)�MutableSequence)�Optional)�Sequence)�Set)�Tuple)�Type)�
TYPE_CHECKING)�Union�)�characteristics)�cursor)�
interfaces)�
Connection)�
CacheStats)�DBAPICursor)�Dialect)�ExecuteStyle)�ExecutionContext)�
ObjectKind)�ObjectScope�)�event)�exc)�pool)�util)�compiler)�dml)�
expression)�type_api)�
is_tuple_type)�_NoArg)�DDLCompiler)�InsertmanyvaluesSentinelOpts)�SQLCompiler)�quoted_name)�Final)�Literal)�
ModuleType)�Engine)�ResultFetchStrategy)�_CoreMultiExecuteParams)�_CoreSingleExecuteParams)�_DBAPICursorDescription)�_DBAPIMultiExecuteParams)�_ExecuteOptions)�_MutableCoreSingleExecuteParams)�_ParamStyle)�DBAPIConnection)�IsolationLevel)�Row)�URL)�_ListenerFnType)�Pool)�PoolProxiedConnection)�
Executable)�Compiled)�Linting)�ResultColumnsEntry)�DMLState)�
UpdateBase)�
BindParameter)�Column)�_BindProcessorType)�_ResultProcessorType)�
TypeEnginez	\s*SELECTc
�.�eZdZUdZej
ZejZejZ
ejZdZ
dZdZdZdZdZej(j*ZdZded<dZded<dZeZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2e3jhe5jl�e5jn�d	��Z8e3jhe3jre3jtd
�e3jtd
�e3jre3jre3jre3jvd��Z<ded
<dZ=dZ>dZ?dZ@ded<dZAded<dZBded<dZCded<dZDdZEiZFded<dZGdZH	dZI	dZJ	dZK	dZLdZMded<dZNded<eOj�ZQded<dZRd ed!<d"ZSdZTdZUdZVdZWdZXdZYded#<dZZdZ[dZ\d$Z]e3j�d%d&�'�ddddddde_j�deaej��df																							dhd(��Zcede3j�d)d*�d+���Zfe3j�d,��Zhe3j�d-��ZidZjdZke3j�did.��Zle3j�d/��Zmd0�Zne3j�d1��Zoe3j�d2��Zpedd3��Zqedd4��Zresdjd5��Ztdjd6�Zuesd7��Zvdkd8�Zwd9�Zxd:�Zyd;�Zzd<�Z{d=�Z|dld>�Z}								dmd?�Z~d@�ZdA�Z�dB�Z�						dndC�Z�						dodD�Z�dE�Z�dF�Z�dG�Z�dH�Z�dI�Z�dJ�Z�dK�Z�e3j�dL��Z�dpdM�Z�dpdN�Z�dO�Z�dP�Z�dQ�Z�dR�Z�dS�Z�dldT�Z�dldU�Z�dldV�Z�dW�Z�e3�j.dX��Z�dY�Z�dZ�Z�d[�Z�d\�Z�d]�Z�d^�Z�d_�Z�d`�Z�da�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�y)q�DefaultDialectz!Default implementation of DialectTFNzOptional[Set[Any]]�include_set_input_sizes�exclude_set_input_sizesr)�isolation_level�
logging_token�debug)�pool_timeout�echo�	echo_pool�pool_recycle�	pool_size�max_overflow�future�Mapping[str, Any]�engine_config_types�defaulti'�
Optional[int]�#_user_defined_max_identifier_lengthz
Optional[str]rQ�max_index_name_length�max_constraint_name_lengthz<MutableMapping[Type[TypeEngine[Any]], Type[TypeEngine[Any]]]�colspecs�named�DEFAULT�bool�use_insertmanyvalues�!use_insertmanyvalues_wo_returningr,�"insertmanyvalues_implicit_sentineli��int�insertmanyvalues_page_sizei��default_schema_namezutf-8)�1.4aThe :paramref:`_sa.create_engine.empty_in_strategy` keyword is deprecated, and no longer has any effect.  All IN expressions are now rendered using the "expanding parameter" strategy which renders a set of boundexpressions, or an "empty set" SELECT, at statement executiontime.)rlz�The :paramref:`_sa.create_engine.server_side_cursors` parameter is deprecated and will be removed in a future release.  Please use the :paramref:`_engine.Connection.execution_options.stream_results` parameter.)�empty_in_strategy�server_side_cursorsc�d�|r+|jstjd|z��d|_t	|dd�r5tjdd�tjj|_
d|_d|_||_
|�||_n9|j�|jj|_n|j|_|jdv|_|j!|�|_||_t	|dd�}
|
�,t't(t*j,|j.�}n|j0}||�x|_|_|�||_||_|j6r|j6|_||_|
|_|	�|	|_|t@jBur||_"yy)	Nz/Dialect %s does not support server side cursorsT�use_setinputsizesFzoThe dialect-level use_setinputsizes attribute is deprecated.  Please use bind_typing = BindTyping.SETINPUTSIZES�2.0)�qmark�format�numeric�numeric_dollar�
type_compiler)#�supports_server_side_cursorsr"�
ArgumentErrorrn�getattrr$�warn_deprecatedr�
BindTyping�
SETINPUTSIZES�bind_typing�
positional�_ischema�dbapi�
paramstyle�default_paramstyle�preparer�identifier_preparer�_on_connect_isolation_levelrrr%�GenericTypeCompilerrv�type_compiler_cls�type_compiler_instance�supports_native_booleanr_�max_identifier_length�label_length�compiler_lintingrfr*�NO_ARGrj)�selfr�rQr��implicit_returningr�r�r�rjrfr�rn�kwargs�legacy_tt_callable�tt_callables               �J/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/engine/default.py�__init__zDefaultDialect.__init__s���H��4�4��'�'�E��L���,0��(��4�,�e�4�� � �9��	
� *�4�4�B�B�D�������
���
��!�(�D�O�
�Z�Z�
#�"�j�j�3�3�D�O�"�5�5�D�O��/�/�.
�
���$(�=�=��#6�� �+:��(�$�T�?�D�A���)���X�1�1�2��"�"��K�
�0�0�K�;F�t�;L�L��#�d�&8�"�.�+B�D�(�3H��0��3�3��8�8�
�&�)��� 0����+�(<�D�%�%�V�]�]�:�.H�D�+�;�rqz]full_returning is deprecated, please use insert_returning, update_returning, delete_returningc�R�|jxr|jxr|jS�N)�insert_returning�update_returning�delete_returning�r�s r��full_returningzDefaultDialect.full_returningus.��
�!�!�
&��%�%�
&��%�%�	
r�c�6�|jxr|jS)aDefault implementation for insert_executemany_returning, if not
        otherwise overridden by the specific dialect.

        The default dialect determines "insert_executemany_returning" is
        available if the dialect in use has opted into using the
        "use_insertmanyvalues" feature. If they haven't opted into that, then
        this attribute is False, unless the dialect in question overrides this
        and provides some other implementation (such as the Oracle Database
        dialects).

        �r�rfr�s r��insert_executemany_returningz+DefaultDialect.insert_executemany_returning�s���$�$�B��)B�)B�Br�c�6�|jxr|jS)a�Default implementation for
        insert_executemany_returning_deterministic_order, if not otherwise
        overridden by the specific dialect.

        The default dialect determines "insert_executemany_returning" can have
        deterministic order only if the dialect in use has opted into using the
        "use_insertmanyvalues" feature, which implements deterministic ordering
        using client side sentinel columns only by default.  The
        "insertmanyvalues" feature also features alternate forms that can
        use server-generated PK values as "sentinels", but those are only
        used if the :attr:`.Dialect.insertmanyvalues_implicit_sentinel`
        bitflag enables those alternate SQL forms, which are disabled
        by default.

        If the dialect in use hasn't opted into that, then this attribute is
        False, unless the dialect in question overrides this and provides some
        other implementation (such as the Oracle Database dialects).

        r�r�s r��4insert_executemany_returning_sort_by_parameter_orderzCDefaultDialect.insert_executemany_returning_sort_by_parameter_order�s��*�$�$�B��)B�)B�Br�c�d�|j�tjd|�d���|jS)N�Dialect z\ does not have a Python DBAPI established and cannot be used for actual database interaction)r�r"�InvalidRequestErrorr�s r��loaded_dbapizDefaultDialect.loaded_dbapi�s>���:�:���)�)��4�&�!E�E��
��z�z�r�c�N�|jtjjuSr�)r}rr{�RENDER_CASTSr�s r��_bind_typing_render_castsz(DefaultDialect._bind_typing_render_casts�s�����:�#8�#8�#E�#E�E�Er�c�v�t|t�s)tjdt�dt	|��d���y)Nz7The argument passed to Dialect.has_table() should be a z, got z�. Additionally, the Dialect.has_table() method is for internal dialect use only; please use ``inspect(some_engine).has_table(<tablename>>)`` for public API use.)�
isinstancerr"rx�type)r��args  r��_ensure_has_table_connectionz+DefaultDialect._ensure_has_table_connection�s5���#�z�*��#�#�*4�T�#�Y�
@��
�+r�c���|jjjdd�}|�2tjd|j
�d|j�d�d��t|�S)N�supports_statement_cacher��:a� will not make use of SQL compilation caching as it does not set the 'supports_statement_cache' attribute to ``True``.  This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions.  Dialect maintainers should seek to set this attribute to True after appropriate development and testing for SQLAlchemy 1.4 caching support.   Alternatively, this attribute may be set to False which will disable this warning.�cprf)�code)�	__class__�__dict__�getr$�warn�name�driverre)r��sscs  r��_supports_statement_cachez(DefaultDialect._supports_statement_cache�sU���n�n�%�%�)�)�*D�d�K���;��I�I�#�i�i����	6��
��C�y�r�c�*�tj�Sr�)�weakref�WeakKeyDictionaryr�s r��_type_memoszDefaultDialect._type_memos�s���(�(�*�*r�c�:�|jdz|jzS)N�+)r�r�r�s r��dialect_descriptionz"DefaultDialect.dialect_description�s���y�y�3�����,�,r�c��|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_rowcountr�s r�� supports_sane_rowcount_returningz/DefaultDialect.supports_sane_rowcount_returning�s���*�*�*r�c�8�t|dtj�S)N�	poolclass)ryr#�	QueuePool)�cls�urls  r��get_pool_classzDefaultDialect.get_pool_class�s���s�K����8�8r�c�$�|j|�Sr�)r�)r�r�s  r��get_dialect_pool_classz%DefaultDialect.get_dialect_pool_class�s���"�"�3�'�'r�c��dj|jjd�dd�}	t|dz�y#t$rYywxYw)N�.r���z
.provision)�join�
__module__�split�
__import__�ImportError)r��packages  r��load_provisioningz DefaultDialect.load_provisioning�sJ���(�(�3�>�>�/�/��4�Q�r�:�;��	��w��-�.���	��	�s�>�	A
�	A
c�,���j��fd�}|Sy)Nc�>���j|�j�yr�)�_assert_and_set_isolation_levelr�)�
dbapi_conn�conn_recr�s  �r��builtin_connectz:DefaultDialect._builtin_onconnect.<locals>.builtin_connect�s����4�4��� @� @�r�)r�)r�r�s` r��_builtin_onconnectz!DefaultDialect._builtin_onconnect�s����+�+�7�
�
#�"�r�c�.�	|j|�|_	|j|�|_	|j|jj�|_|js|j|�}|r||_|jrH|j|jkDr.tjd|j|jfz��yy#t$r
d|_Y��wxYw#t$r
d|_Y��wxYw#t$r
d|_Y��wxYw)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_namerk�get_default_isolation_level�
connection�dbapi_connection�default_isolation_levelr_�_check_max_identifier_lengthr�r�r"rx)r�r��max_ident_lengths   r��
initializezDefaultDialect.initializes*��	,�'+�'D�'D��(�D�$�
	,�'+�'D�'D��(�D�$�	0�+/�+K�+K��%�%�6�6�,�D�(��7�7�#�@�@��L���-=��*�
����!�!�D�$>�$>�>��#�#�3��$�$�d�&@�&@�A�B��
�?�
��-#�	,�'+�D�$�	,��#�	,�'+�D�$�	,��#�	0�+/�D�(�	0�s3�C�C+�*D�C(�'C(�+C>�=C>�D�Dc��yr��r�s r��
on_connectzDefaultDialect.on_connect*s��r�c��y)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��r�r�s  r�r�z+DefaultDialect._check_max_identifier_length.s��r�c�$�|j|�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�r�r�s  r�r�z*DefaultDialect.get_default_isolation_level:s���'�'�
�3�3r�c�B�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_typerb)r��typeobjs  r��type_descriptorzDefaultDialect.type_descriptorJs���"�"�7�D�M�M�:�:r�c�|�|j||fd|i|��sy|j||fd|i|��D]}|d|k(s�yy)N�schemaFr�T)�	has_table�get_indexes)r�r��
table_name�
index_namer��kw�idxs       r��	has_indexzDefaultDialect.has_indexUsa���t�~�~�j�*�J�V�J�r�J��#�4�#�#��
�
�+1�
�57�
�C��6�{�j�(��	
�r�c�,�||j|fi|��vSr�)�get_schema_names)r�r��schema_namer�s    r��
has_schemazDefaultDialect.has_schema`s"���3�d�3�3�J�E�"�E�E�Er�c�|�t|�|jkDr$tjd||jfz��y)Nz7Identifier '%s' exceeds maximum length of %d characters)�lenr�r"�IdentifierError)r��idents  r��validate_identifierz"DefaultDialect.validate_identifieresB���u�:��2�2�2��%�%�I��$�4�4�5�6��
�3r�c�:�|jj|i|��Sr�)r��connect)r��cargs�cparamss   r�r	zDefaultDialect.connectls ��(�t� � �(�(�%�;�7�;�;r�c�`�|j�}|j|j�g|fSr�)�translate_connect_args�update�query)r�r��optss   r��create_connect_argsz"DefaultDialect.create_connect_argsps*���)�)�+�����C�I�I���D�z�r�c������t�j�j��}|r>tj�fd�|D���tj|d���fd��}yy)Nc3�,�K�|]}|�|f���
y�wr�r���.0r�rs  �r��	<genexpr>z>DefaultDialect.set_engine_execution_options.<locals>.<genexpr>}������D�/>�t��t�D�z�"�����engine_connectc�*���j|��yr�)�_set_connection_characteristics)r�rr�s ��r��set_connection_characteristicszSDefaultDialect.set_engine_execution_options.<locals>.set_connection_characteristics�s����4�4���r�)�set�connection_characteristics�intersectionr$�
immutabledictr!�listens_for)r��enginer�supported_namesrrs` `  @r��set_engine_execution_optionsz+DefaultDialect.set_engine_execution_optionsvsn����d�=�=�>�K�K��
���15�1C�1C�D�/>�D�2�O��
�
�v�'7�
8�
�9�
�
r�c���t|j�j��}|r1tj�fd�|D��}|j||�yy)Nc3�,�K�|]}|�|f���
y�wr�r�rs  �r�rzBDefaultDialect.set_connection_execution_options.<locals>.<genexpr>�rr)rrrr$r r)r�r�rr#rs  `  r�� set_connection_execution_optionsz/DefaultDialect.set_connection_execution_options�s^����d�=�=�>�K�K��
���15�1C�1C�D�/>�D�2�O�
�0�0��_�M�	r�c�R�|j�D��cgc]\}}||j||f��}}}|j�rU|D���cgc]\}}}|jr||f��}}}}|r.t	j
ddj
d�|D��z��|jj}	|D]\}}
}|
j|||	|��|jjjjtj|j|��ycc}}wcc}}}w)Nz�This connection has already initialized a SQLAlchemy Transaction() object via begin() or autobegin; %s may not be altered unless rollback() or commit() is called first.�, c3�&K�|]	\}}|���y�wr�r�)rr��objs   r�rzADefaultDialect._set_connection_characteristics.<locals>.<genexpr>�s���� B�z�)�$���z�s�)�itemsr�in_transaction�
transactionalr"r�r�r�r��set_connection_characteristic�_connection_record�finalize_callback�append�	functools�partial�_reset_characteristics)r�r�rr��value�characteristic_valuesr+�_�
trans_objsr��characteristics           r�rz.DefaultDialect._set_connection_characteristics�s>�� 5��4�4�6�!
�6���e��4�2�2�4�8�%�@�6�	�!
�
�$�$�&�%:��$9�L�D�#�q��$�$��s��$9�
��
��-�-�'��y�y� B�z� B�B�	D���&�0�0�A�A��(=�$�A�~�u��8�8��j�"2�E�
�)>�	���0�0�B�B�I�I����d�9�9�?�K�	
��3!
��s�D�
D"c�T�|D]#}|j|}|j||��%yr�)r�reset_characteristic)r�rr��characteristic_namer:s     r�r5z%DefaultDialect._reset_characteristics�s3��#2��!�<�<�#��N�
�/�/��6F�G�	$3r�c��yr�r��r�r�s  r��do_beginzDefaultDialect.do_begin����r�c�$�|j�yr�)�rollbackr?s  r��do_rollbackzDefaultDialect.do_rollback�s���!�!�#r�c�$�|j�yr�)�commitr?s  r��	do_commitzDefaultDialect.do_commit�s�����!r�c�&�|j|�yr�)�do_closer?s  r��do_terminatezDefaultDialect.do_terminate�s���
�
�&�'r�c�$�|j�yr�)�closer?s  r�rIzDefaultDialect.do_close�s����� r�c�^�ttjd�j|���S)Nr��dialect)�strr'�select�compiler�s r��_dialect_specific_select_onez+DefaultDialect._dialect_specific_select_one�s&���:�$�$�Q�'�/�/��/�=�>�>r�c�F�	|j|�S#|jj$rt}|j||d�}|jrH	tj|||dd��n,#tj$r}|j}Yd}~nd}~wwxYw|rYd}~y�d}~wwxYw)NFT)�
is_disconnect�invalidate_pool_on_disconnect�is_pre_ping)
�do_pingr��ErrorrU�_has_eventsr�$_handle_dbapi_exception_noconnectionr"�StatementError�connection_invalidated)r�r��errrU�new_errs     r��_do_ping_w_eventzDefaultDialect._do_ping_w_event�s���	��<�<� 0�1�1��� � �&�&�	� �.�.�s�4D�d�K�M����	C��C�C���&3�6;�$(����)�)�C�$+�$B�$B�M��C������%	�sD��B �B�A'�&B�'B�:B�B�B�B�B�B c��d}|j�}	|j|j�|j�y#|j�wxYw)NT)r�executerSrL)r�r�rs   r�rXzDefaultDialect.do_ping�sE����!�(�(�*��	��N�N�4�<�<�=��L�L�N���
�L�L�N�s�A�Ac�:�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�randintr�s r��
create_xidzDefaultDialect.create_xid�s���V�^�^�A�q�#�v�6�6�6r�c�L�|jtj|��yr�)rbr'�SavepointClause�r�r�r�s   r��do_savepointzDefaultDialect.do_savepoint�s�����:�5�5�d�;�<r�c�L�|jtj|��yr�)rbr'�RollbackToSavepointClauserjs   r��do_rollback_to_savepointz'DefaultDialect.do_rollback_to_savepoint�s�����:�?�?��E�Fr�c�L�|jtj|��yr�)rbr'�ReleaseSavepointClauserjs   r��do_release_savepointz#DefaultDialect.do_release_savepoint�s�����:�<�<�T�B�Cr�c#�K�tt|�}tt|j�}d}d}	d}
|j}|j
}|�J�t
|j�}
|jjd|j�}|jr|jjdi�}nd}|
rg}||_|j}nd}d}|j|||||||�D�]>}|��|
s�	|j|�}|�J�|j,�r|j.�s�|j,dkD}|j0r4|rJ�|j3t5t7j8d��	����|j:sJ�|j<sJ�|j,}|
s�|rTt?|j<|j@|d�D��cgc]$\}}|jBjE||d���&}}}n9|j<d
jBjE||j@dd�}	d}
|r/D�cic]#}tGd�t?||d|�D��|��%}}n/|	rD�cic]}|	|d�|��}}nD�cic]}|d|��
}}tI|�tI|jJ�k7r8tMjNdtI|jJ��d
tI|��d���	|jPD�cgc]}||��	}}|j3|���.|j3���Ay#t $rI}|j#|t%j&|j(�|j*d|d��Yd}~��sd}~wwxYwcc}}wcc}wcc}wcc}wcc}w#tR$r,}tMjNd|jTd
�d��|�d}~wwxYw�w)Nr�Frj�schema_translate_mapT)�is_sub_execrr�)�keyrc3�:K�|]\}}|r||�n|���y�wr�r�)r�val�procs   r�rzCDefaultDialect._deliver_insertmanyvalues_batches.<locals>.<genexpr>ss+����"�2"�I�C��/3��c���!;�2"�s�zASentinel-keyed result set did not produce correct number of rows z; produced zP.  Please ensure the sentinel column is fully unique and populated in all cases.zACan't match sentinel values in result set to parameter sets; key aT was not found. There may be a mismatch between the datatype passed to the DBAPI driver vs. that which it returns in a result row.  Ensure the given Python value matches the expected result type *exactly*, taking care to not rely upon implicit conversions which may occur such as when using strings in place of UUID or integer values, etc. )+r�DefaultExecutionContextr-�compiled�compiled_parameters�_insertmanyvaluesre�effective_returning�execution_optionsr�rjrs�_insertmanyvalues_rows�sort_by_parameter_order�!_deliver_insertmanyvalues_batches�fetchall_for_returning�
BaseException�_handle_dbapi_exception�sql_util�_long_statement�replaced_statement�replaced_parameters�num_sentinel_columns�
is_downgraded�implicit_sentinel�extend�sorted�operator�
itemgetter�sentinel_param_keys�sentinel_columns�zip�descriptionr��_cached_result_processor�tupler�batchr"r��sentinel_values�KeyError�args)r�r�r�	statement�
parameters�generic_setinputsizes�contextrz�_composite_sentinel_proc�_scalar_sentinel_proc�_sentinel_proc_initializedr{�imv�is_returning�
batch_sizers�resultr��	imv_batch�rows�be�composite_sentinel�_nsc�col�cursor_desc�row�rows_by_sentinel�
sentinel_keys�ordered_rows�kes                              r�r�z0DefaultDialect._deliver_insertmanyvalues_batches�s������.��8����W�%5�%5�6��
�	!�FJ��+0�"�%�9�9���(�(������$(��)E�)E�$F���.�.�2�2�(�$�*I�*I�
�
��(�(�#*�#<�#<�#@�#@�&��$� �$(� ��*,�F�-3�G�*�&)�&A�&A�#�',�#��F�!�C�C����!��#� �
�I��O��
�"�9�9�&�A�D��)�)�)��+�+�I�4K�4K�),�)A�)A�A�)E�&��,�,�$6�5�5��
�
�"�4�X�-@�-@��-D�E��!��2�2�2�2��/�/�/�/��3�3�D�5�-�
9<�$'�$8�$8�$*�$6�$6��u�v�$>�9"�	8�9"�$4�C��!$��� A� A�$(�+�a�.�!"�9"�	5�8�!$� 4� 4�Q� 7�"�d�#;�#;� $�f�&8�&8��&<�Q�&?�$�2�
6:�2�*�(,�,�(,��
"�"�14�$'����K�1I�2"�"��
 #�#�(,�)�,�/�KO�,�KO�C�1�#�b�'�:�C�?�4�)�,�EI�+I�D�S�C��G�S�L�D�(�+I��+�,��I�O�O�0D�D�"�5�5�6�69�)�/�/�6J�5K�L(�"�#3�4�5�6)�)���"�2;�1J�1J�(�1J�
�-�]�;�1J�%�(�*�M�M�,�/��M�M�$�'�{
��%���6�6�� �0�0��1M�1M�N�!�5�5���$(�
7������D8��,,��,��,J�� (��$�"�"�5�5�3�35�7�7�1�:�.�AP�	P�� "�"��	"�s��C0O�4L+�CO�)N�.AO�3(N�	O�$N�7O�>
N�AO�'N�5N�N�(O�+	M=�4>M8�2O�8M=�=O�N�	O�#'O
�
O�Oc�(�|j||�yr�)�executemany�r�rr�r�r�s     r��do_executemanyzDefaultDialect.do_executemany�s�����9�j�1r�c�(�|j||�yr��rbr�s     r��
do_executezDefaultDialect.do_execute�s�����y�*�-r�c�&�|j|�yr�r�)r�rr�r�s    r��do_execute_no_paramsz#DefaultDialect.do_execute_no_params�s�����y�!r�c��y)NFr�)r��er�rs    r�rUzDefaultDialect.is_disconnect�s��r�c
�R�	t|j|��}|D�cgc]"}|jdd�j���$}}||k7r<t	d|j
�dt
t|�j|������t|�Scc}w#t$rYywxYw)Nr8� r�zi get_isolation_level_values() method should return names as UPPERCASE using spaces, not underscores; got )�list�get_isolation_level_values�replace�upper�
ValueErrorr�r�r�
differencer�r�)r�r��
raw_levels�level�normalized_levelss     r��_gen_allowed_isolation_levelsz,DefaultDialect._gen_allowed_isolation_levels�s���	,��d�=�=�j�I�J�J�
>H�!�=G�E��
�
�c�3�'�-�-�/�Z�
�!��.�.� ��t�y�y�m�,,��c�*�o�8�8�9J�K�L�M�O����*�+�+��!��#�	��	�s�B�'B�	B&�%B&c
��|jdd�j�}|j|�}|r;||vr7tjd|�d|j
�ddj
|�����|j||�y)Nr8r�zInvalid value z1 for isolation_level. Valid isolation levels for z are r))r�r�r�r"rxr�r��set_isolation_level)r�r�r��_allowed_isolation_levelss    r�r�z.DefaultDialect._assert_and_set_isolation_level�s����
�
�c�3�'�-�-�/��$(�$F�$F��%
�!�
&��6�6��#�#� ��	�*.�.2�i�i�]�%��9�9�6�7�8�:��
�	
� � ��U�3r�c��|j�G|jdk(s|j|jk(sJ�|j||j�y|j�J�|j||j�y)N�
AUTOCOMMIT)r�r�r�r�s  r��reset_isolation_levelz$DefaultDialect.reset_isolation_level�s����+�+�7��0�0�L�@��3�3��/�/�0�
�0�
�0�0��D�<�<�
��/�/�;�;�;��0�0���,�,�
r�c���|�y|j�}|j�}||k(r|S||k(r|jj|�s|S||k(r
t	|d��S|S)NT)�quote)�lowerr�r��_requires_quotesr.�r�r��
name_lower�
name_uppers    r��normalize_namezDefaultDialect.normalize_name�sy���<���Z�Z�\�
��Z�Z�\�
���#��K�
�4�
��$�$�5�5�
�&�)�
��
�4�
��t�4�0�0��Kr�c��|�y|j�}|j�}||k(r|S||k(r|jj|�s|}|Sr�)r�r�r�r�r�s    r��denormalize_namezDefaultDialect.denormalize_names_���<���Z�Z�\�
��Z�Z�\�
���#��K�
�4�
��$�$�5�5�
�&�)��D��r�c��|Sr�r�r�s  r��get_driver_connectionz$DefaultDialect.get_driver_connections���r�c�t�tt|�|�jtt|�juSr�)ryr��__code__rN)r��methods  r��_overrides_defaultz!DefaultDialect._overrides_defaults0���D��J��'�0�0��>�6�2�;�;�
<�	
r�c+��K�g}g}	tj|vr6|j|j�|	j|j�tj
|vr6|j|j�|	j|j�tj|vr|j|j�|jdi�}
|r'|tjur|tjur|}npg}d|i|�}g}
tj|vr|
j|�tj|vr|
j|	�|
D]}	|j||fi|����|rt#|�}|D]}|r||vs�
||f}	||||fd|i|��f��� y#t $rY�ZwxYw#t$j&$r}||
vr||
|<Yd}~�Rd}~wt$j($rY�jwxYw�w)N�
unreflectabler�)r�TABLEr2�get_table_names�get_temp_table_names�VIEW�get_view_names�get_temp_view_names�MATERIALIZED_VIEW�get_materialized_view_names�popr�ANYrdr��	TEMPORARYr�rr"�UnreflectableTableError�NoSuchTableError)r��single_tbl_methodr��kindr��filter_names�scoper��	names_fns�temp_names_fnsr��names�name_kw�fns�fn�tablerur^s                  r��_default_multi_reflectz%DefaultDialect._default_multi_reflect s������	������t�#����T�1�1�2��!�!�$�";�";�<��?�?�d�"����T�0�0�1��!�!�$�":�":�;��'�'�4�/����T�=�=�>������3�
�
�����(��
���&�!�E��E���.�2�.�G��C��"�"�e�+��
�
�9�%��$�$��-��
�
�>�*�����L�L��J�!:�'�!:�;����|�,�L��E��5�L�#8��u�o����)�&���6<��@B����	��+�����"�2�2�1��-�/�-0�
�c�*����+�+����sf�EG,�F �-G,�G,�
F/�G,� 	F,�)G,�+F,�,G,�/G)�	G�G,�G)�&G,�(G)�)G,c�>�|j|j|fi|��Sr�)r��get_table_options�r�r�r�s   r��get_multi_table_optionsz&DefaultDialect.get_multi_table_optionsi�*��*�t�*�*��"�"�J�
�24�
�	
r�c�>�|j|j|fi|��Sr�)r��get_columnsr�s   r��get_multi_columnsz DefaultDialect.get_multi_columnsn�"��*�t�*�*�4�+;�+;�Z�N�2�N�Nr�c�>�|j|j|fi|��Sr�)r��get_pk_constraintr�s   r��get_multi_pk_constraintz&DefaultDialect.get_multi_pk_constraintqr�r�c�>�|j|j|fi|��Sr�)r��get_foreign_keysr�s   r��get_multi_foreign_keysz%DefaultDialect.get_multi_foreign_keysvs*��*�t�*�*��!�!�:�
�13�
�	
r�c�>�|j|j|fi|��Sr�)r�r�r�s   r��get_multi_indexesz DefaultDialect.get_multi_indexes{rr�c�>�|j|j|fi|��Sr�)r��get_unique_constraintsr�s   r��get_multi_unique_constraintsz+DefaultDialect.get_multi_unique_constraints~s*��*�t�*�*��'�'��
�79�
�	
r�c�>�|j|j|fi|��Sr�)r��get_check_constraintsr�s   r��get_multi_check_constraintsz*DefaultDialect.get_multi_check_constraints�s*��*�t�*�*��&�&�
�
�68�
�	
r�c�>�|j|j|fi|��Sr�)r��get_table_commentr�s   r��get_multi_table_commentz&DefaultDialect.get_multi_table_comment�r�r�)r�zOptional[_ParamStyle]rQzOptional[IsolationLevel]r�zOptional[ModuleType]r�z
Literal[True]r��Optional[bool]r�r^r�r^rjzUnion[_NoArg, int]rfrr�rDrnrer�r)�returnr1)r�r>rz
Type[Pool])rzOptional[_ListenerFnType]r�)r�rrrPr�rrre)r"r2rr[r�None)r�rrr[rr)r�r;rre)��__name__r��__qualname__�__doc__r%r-�statement_compilerr+�ddl_compilerr�r��IdentifierPreparerr��supports_alter�supports_comments�supports_constraint_comments�inline_commentsr��div_is_floordivrr{�NONEr}rO�__annotations__rP�default_sequence_baser��execute_sequence_format�supports_schemas�supports_views�supports_sequences�sequences_optional�"preexecute_autoincrement_sequences�supports_identity_columns�postfetch_lastrowid�favor_returning_over_lastrowid�#insert_null_pk_still_autoincrementsr�r��update_returning_multifrom�delete_returning_multifromr��cte_follows_insert�supports_native_enumr��supports_native_uuid�returns_native_bytes�#non_native_boolean_check_constraint�supports_simple_order_by_label�tuple_in_valuesr$r r�IsolationLevelCharacteristic�LoggingTokenCharacteristicr�asint�bool_or_str�asboolr\�supports_native_decimalr�r�r_rQr`rar��supports_sane_multi_rowcountrbr��supports_default_values�supports_default_metavalue�default_metavalue_token�supports_empty_insert�supports_multivalues_insertrfrgr,�
NOT_SUPPORTEDrhrj�insertmanyvalues_max_parameters�supports_is_distinct_fromrwrn�supports_for_update_ofr�rk�requires_name_normalize�is_async�
has_terminate�$_legacy_binary_type_literal_encoding�deprecated_paramsr*r�ri�
NO_LINTINGr��property�
deprecatedr��memoized_propertyr�r��update_executemany_returning�delete_executemany_returningr�r�r�r�r�r�r��classmethodr�r�r�r�r�r�r�r�r�r�rrr	rr$r'rr5r@rDrGrJrIrSr`rXrgrkrnrqr�r�r�r�rU�memoized_instancemethodr�r�r�r�r�r�r�r�r�rrrr	rrrr�r�r�rNrNss`��+�!�-�-���'�'�L� �4�4���*�*�H��N���#(� ��O�#���O��'�'�,�,�K�26��/�6�26��/�6���$�����N�����).�&� %����%*�"�*/�'�����!&��!&������ ��#�� �� ��*.�'�%)�"��O�!3��!3�!3�K��K�K�M�G�_�G�G�I�	
�"��.@�T�-?�-?� �J�J�$�D�$�$�W�-�)��)�)�'�2� �J�J���� �J�J��k�k�	
�
.��*�
�$���D�!��9=�'��=�%)�O�]�)�
,0��=�/�04��
�4�!��#'� �MO�H�J�O� ��#��:�!&��<�'���
!��.�"'��!&��$�&�.3�%�t�3�	%�2�2�'�(D��'+���*�&+�#� $��#(� ���#����)-���-�$���H��M�
,3�(��T���
�
��*-1�48�&*�,0�26�/3�&*�9?���/3�%(��(;�(;�$<�$)�PI�)�PI�2�PI�$�	PI�
*�PI�"0�
PI� -�PI�$�PI�%7�PI�-�PI�"�PI�"�PI��PI�'�&PI�d��T�_�_�
�	-��

���
�
���C��C�
���C��C�,$)� �#(� �	������
���F��F�
�
������&
���+��+��-��-��+��+��9��9�(�����
�"�H�
�4� 	;�	�F�$�F�36�F�>A�F�	
�F�
�<�����$5��	
��"
N�$�
N�,=�
N�	
�
N�
�<H�
�$�"�(�!�
���?��?��.�7�=�G�D�j(�X2�.�"��
�!�!�,�"�,�$4�$�"�4�"�
�G�R
�
O�
�

�
O�
�

�

r�rNc��eZdZejZejZejZ	ejZdZdZ
dZdZdZdZdZdZdZdZdZy)�StrCompileDialectTFN)rr�rr%�StrSQLCompilerrr+r�StrSQLTypeCompilerr�rr�r�r�r�r�r*r'r(r)r�rBr5r�r�r�rUrU�sr��!�0�0���'�'�L� �3�3���*�*�H�������#�� $������).�&�"��"&��%)�"r�rUc��eZdZUdZdZdZdZdZdZe	jZded<dZ
ded<dZded<dZd	ed
<ej"Zded<ej(ZdZd
ed<dZdZdZdZdZdZded<dZded<ej<�Zded<	e Z!ded<ded<ded<ded<ded<ded <d!ed"<d#ed$<e"d%ej"�Z#dZ$d&ed'<d(Z%d)ed*<e&												dXd+��Z'e&e(jRf																			dYd,��Z*e&														dZd-��Z+e&										d[d.��Z,d\d/�Z-e.d0��Z/ej`d1��Z1ej`d2��Z2ej`d]d3��Z3ej`d]d4��Z4ej`d5��Z5d^d6�Z6ej`d7��Z7d8�Z8d9�Z9d:�Z:d;�Z;d<�Z<d=�Z=d>�Z>d?�Z?d@�Z@dA�ZAdB�ZBej�d_dC��ZDe.dD��ZEdE�ZFdF�ZGdG�ZHdH�ZIdI�ZJej`dJ��ZKdK�ZLdL�ZMdM�ZNdN�ZO		d`dO�ZPdP�ZQdQ�ZRdZSdRedS<	dadT�ZTdU�ZUdV�ZVdW�ZWy)bryFr�
execute_styleNzOptional[Compiled]rzzAOptional[Tuple[List[ResultColumnsEntry], bool, bool, bool, bool]]�result_column_structzOptional[Sequence[Row[Any]]]�returned_default_rowsr8r~zOptional[Executable]�invoked_statementr^�	_rowcountzOptional[Callable[[str], str]]�_translate_colnamezMapping[str, List[str]]�_expanded_parametersr�root_connectionrA�_dbapi_connectionrrOrP�unicode_statementrrz%List[_MutableCoreSingleExecuteParams]r{r7r��&Optional[Sequence[BindParameter[Any]]]�extracted_parametersr[zOptional[List[Tuple[Any, ...]]]rrri�_num_sentinel_colsc�&�|j|�}||_||_|j|_|x|_}d|_||_t|�|_|jrJ|jjdi�}|jj}	|	|j|�|_|j|_
|j�|_g|_|j"r|j%�g|_|S|j(g|_|S)zKInitialize execution context for an ExecutableDDLElement
        construct.Trs)�__new__r`rarOrz�isddlr~rPrbrsr�r��_render_schema_translatesr��
create_cursorrr{r~r$r��_empty_dict_params)
r�rOr�r�r~�compiled_ddlr�rzrs�rsts
          r��	_init_ddlz!DefaultExecutionContext._init_ddl�s���{�{�3���)���!1���!�)�)���#/�/��
����
�!2���!$�X�����(�(�#'�#9�#9�#=�#=�&��$� ��#�#�=�=�C�%(��&�&�(<�&�D�"��/�/����(�(�*���#%�� ����&�>�>�@�A�D�O��� $�6�6�7�D�O��r�c

���|j|�}
||
_||
_|j|
_||
_||
_||
_|	|
_||
_|j|j|j|j|jf|
_|jx|
_}|j x|
_}|j"x|
_}
|j$|
_|s|s|
�r�|j(j*}t,rt/|t0�sJ�d|
_t5|j6�x|
_}t5|j:�x|
_}|r|j>rd|
_ |r|rJ�|s|�rf|jB�rY|rC|
jjDs-tGjHd|
jjJ�d���|rO|jLrC|
jjNs-tGjHd|
jjJ�d���|r7|
jjPr!|jRstGjHd��|rC|
jjTs-tGjHd|
jjJ�d���|
rC|
jjVs-tGjHd|
jjJ�d���|s|jY|d�	�g|
_-n�t]|�D��cgc]\}}|jY|d||�
���c}}|
_-t_|�dkDrl|
jrK|jRr?t`jb|
_2|jR}|jf�'|jh|
_5nt`jl|
_2|jn|
_8|
js�|
_:|
jjvs|
jjxr|
j{�|j|}|}|j~s|j�r�|
j�rtGjHd
��|j�|
jZd�}|j*|
_8|j�|
_Dt�|�}|j�|j��|j�}n%|j�r|
jj�}nd}|j�rJ|
jj�di�}|j�j�}||
jp|�|
_8|
jp|
_|j�rdg}|�J�|
jZD]F}|D�cgc]}||vr||||�n||��}}|j�|j�|���H||
_P|
Sg}|j�}|
jZD]p}|r6|D�cic]*}|j�||�||vr||||�n||��,} }n%|D�cic]}|||vr||||�n||��} }|j�| ��r||
_P|
Scc}}wcc}wcc}wcc}w)z6Initialize execution context for a Compiled construct.Tr�z] with current server capabilities does not support INSERT..RETURNING when executemany is usedz} with current server capabilities does not support INSERT..RETURNING with deterministic row ordering when executemany is usedznStatement does not have "insertmanyvalues" enabled, can't use INSERT..RETURNING with executemany in this case.z] with current server capabilities does not support UPDATE..RETURNING when executemany is usedz] with current server capabilities does not support DELETE..RETURNING when executemany is usedF)rd�escape_names)rp�
_group_numberrdrNzL'literal_execute' or 'expanding' parameters can't be used with executemany()rrs)Rrgr`rarOrdr\rz�	cache_hitr~�_result_columns�_ordered_columns�_textual_ordered_columns�_ad_hoc_textual�_loose_column_name_matchingrZ�isinsert�isupdate�isdelete�isplaintext�is_text�
compile_stater�rr�rG�is_crudre�
_returning�_is_explicit_returningr��_is_implicit_returning�_supplemental_returning�_is_supplemental_returning�for_executemanyr�r"r�r��_sort_by_parameter_orderr�rfr|rPrQ�construct_paramsr{�	enumeraterr�INSERTMANYVALUESrYr�r�re�EXECUTEMANY�stringrbrjr�insert_prefetch�update_prefetch�_process_execute_defaults�_bind_processors�literal_execute_params�post_compile_paramsr��#_process_parameters_for_postcompile�parameter_expansionr_�dictr�
processors�positiontupr~rsr�r�rir2r$r��escaped_bind_names)!r�rOr�r�r~rzr�r\rdrrr��ii�iu�id_�
dml_statement�ier�iir�grp�mr�r��flattened_processors�expanded_stater�rsrm�core_positional_parameters�compiled_paramsru�l_param�core_dict_parameters�
escaped_names�d_params!                                 r��_init_compiledz&DefaultExecutionContext._init_compileds����{�{�3���)���!1���!�)�)���$8��!�!2��� ��
�"���!2���
�$�$��%�%��-�-��$�$��0�0�%
��!�&�.�.�.��
��%�.�.�.��
��&�/�/�/��
���+�+���
��s�$�2�2�<�<�M��!�-��<�<�<��D�L�04�]�5M�5M�0N�N�D�'�#�04��+�+�1�
�D�'�#��}�<�<�26��/���$�$��s�� 8� 8��d�l�l�G�G��1�1�"�4�<�<�#C�#C�"D�EE�E����%�>�>� �L�L�]�]��1�1�"�4�<�<�#C�#C�"D�E3�3�������9�9�$�6�6��1�1�4���
���� I� I��1�1�"�4�<�<�#C�#C�"D�EE�E���
����!J�!J��1�1�"�4�<�<�#C�#C�"D�EE�E�����)�)�)=�!&�*��(�D�$�(�
�3�(�4�F�C��
�)�)��!&�"%�)=�	*��4�(�D�$��:���"��=�=�X�%?�%?�)5�)F�)F�D�&�"�4�4�C��+�+�7�25�2J�2J��/�)5�)A�)A�D�&�!)������(�(�*����=�=�(�(�D�M�M�,I�,I��*�*�,��.�.�
�
�	��*�*�h�.J�.J�����-�-�.���
&�I�I��(�(��+��N�
&4�%=�%=�D�"�(6�(J�(J�D�%�#'�
�#3� � �'�'��(A�(A�B�(�4�4�K�
�
 �
 ��-�-�3�3�K��K��(�(�#'�#9�#9�#=�#=�&��$� ��#�#�=�=�C�%(��&�&�(<�&�D�"��/�/������IK�&��*�*�*�#'�#;�#;�� +�
&� +���"6�6�2�,�S�1�/�#�2F�G�,�S�1�2� +�
�&�+�1�1��3�3�G�<��$<�9�D�O�F��CEG� �$�7�7�M�$(�#;�#;�� �$3�
�$3�C�&�)�)�#�s�3�"�&:�:�6�0��5�o�c�6J�K�!0��!5�6�
$3�
��$3�
�$3�C��"�&:�:�6�0��5�o�c�6J�K�!0��!5�6�
$3�
��%�+�+�G�4�)$<�,3�D�O����{(��\&��2��s�Y�/Y�/Y�Y c�\�|j|�}||_||_|j|_d|_||_|s@|jjr|j�g|_ns|jg|_n`t|d|j�r||_n?t|dt�r||_n$|D�cgc]}|j|���c}|_t|�dkDrtj|_|x|_|_|j%�|_|Scc}w)z8Initialize execution context for a string SQL statement.Trr)rgr`rarOr|r~r~r$r�rkr�r�rrr�rYr�rbrjr)	r�rOr�r�r~r�r�r��ps	         r��_init_statementz'DefaultExecutionContext._init_statement�s���{�{�3���)���!1���!�)�)������!2�����|�|�&�&�#*�#B�#B�#D�"E���#'�#:�#:�";���
�
�1�
�w�'F�'F�
G�(�D�O�
�
�1�
�t�
,�(�D�O�=G��<F�q��/�/��2�J��D�O��z�?�Q��!-�!9�!9�D��2;�;����/��(�(�*������s�D)c��|j|�}||_||_|j|_||_|j�|_|S)z;Initialize execution context for a ColumnDefault construct.)rgr`rarOr~rjr)r�rOr�r�r~r�s      r��
_init_defaultz%DefaultExecutionContext._init_defaultsL���{�{�3���)���!1���!�)�)���!2����(�(�*����r�c���|j�yt�}|j}|jj}|�J�|tur	d||z
fzS|t
ur	d||z
fzS|tur	d||z
fzS|tur.d|jvrd|jd||z
fzSd||z
fzS|tur3d|jj|jj||z
fzSy	)
Nzraw sqlzno key %.5fszcached since %.4gs agozgenerated in %.5fs�_cache_disable_reasonzcaching disabled (%s) %.5fs zcaching disabled %.5fsz,dialect %s+%s does not support caching %.5fs�unknown)
rzrrr�	_gen_time�NO_CACHE_KEY�	CACHE_HIT�
CACHE_MISS�CACHING_DISABLEDr~�NO_DIALECT_SUPPORTrOr�r�)r��now�ch�gen_times    r��_get_cache_statsz(DefaultExecutionContext._get_cache_stats2s���=�=� ���n��
�^�^���=�=�*�*���#�#�#�
���!�S�8�^�$5�5�5�
�9�_�+�s�X�~�.?�?�?�
�:�
�'�3��>�*;�;�;�
�#�
#�&�$�*@�*@�@�5��*�*�+B�C��(�N�9���
0�3��>�2C�C�C�
�%�
%�A����!�!����#�#��h��E��
�r�c�Z�|jtjtjfvSr�)rYrr�r�r�s r�r�z#DefaultExecutionContext.executemanyTs,���!�!��$�$��)�)�&
�
�	
r�c���|jr|jjSd|jvr2|jjj|jd�S|jjS)Nrs)rzr�r~rOr��_with_schema_translater�s r�r�z+DefaultExecutionContext.identifier_preparer[se���=�=��=�=�)�)�)�
#�t�'=�'=�
=��<�<�3�3�J�J��&�&�'=�>��
��<�<�3�3�3r�c�.�|jjSr�)r`r"r�s r�r"zDefaultExecutionContext.enginefs���#�#�*�*�*r�c�r�trt|jt�sJ�|jjSr�)rr�rzr-�	postfetchr�s r��postfetch_colsz&DefaultExecutionContext.postfetch_colsjs)����d�m�m�[�9�9�9��}�}�&�&�&r�c���trt|jt�sJ�|jr|jj
S|jr|jjSy)Nr�)rr�rzr-rxr�ryr�r�s r��
prefetch_colsz%DefaultExecutionContext.prefetch_colspsJ����d�m�m�[�9�9�9��=�=��=�=�0�0�0�
�]�]��=�=�0�0�0�r�c�:�|jjdd�S)N�
no_parametersF)r~r�r�s r�r�z%DefaultExecutionContext.no_parameters{s���%�%�)�)�/�5�A�Ar�c�$�|j}d|jvr;|jjdi�}|jj}|||�}|s3|j
jr|j
j�}ni}|j|j|||��|jj�}|�|d}nd}|�@|j|j
|jjdd�}	|	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.

        rs)r�Nrr)
r`r~r�r�rirOr~r$�_cursor_executer�fetchoner�r�)
r��stmt�type_r��connrsrmr��rrxs
          r��_execute_scalarz'DefaultExecutionContext._execute_scalars���#�#��!�T�%;�%;�;�#'�#9�#9�#=�#=�&��$� ��*�*�D�D�C��t�1�2�D���|�|�&�&�!�\�\�A�A�C�
��
����T�[�[�$�
�D��I��k�k�"�"�$���?��A��A��A����1�1����d�k�k�5�5�a�8��;��D���A�w���r�c��|jSr�)r`r�s r�r�z"DefaultExecutionContext.connection�s���#�#�#r�c�,�|jjsy|jjr�|jj	dd�xr�|j
xr.t
|j
jtj�xsl|j
xs.t
|j
jtj�xr-|jxrtj|j�}|S|jj	dd�}|S)NF�stream_resultsT)rOrwrnr~r�rzr�r�r'�
Selectable�
TextClauserb�SERVER_SIDE_CURSOR_RE�match)r��use_server_sides  r��_use_server_side_cursorz/DefaultExecutionContext._use_server_side_cursor�s����|�|�8�8���<�<�+�+�"�4�4�8�8� �$����
�
�O��t�}�}�6�6�
�8M�8M�N��!�M�M�)��%� �M�M�3�3�Z�5J�5J��L��.�.�
L�.�3�3�D�4J�4J�K�
�*��	#�4�4�8�8� �%��O��r�c��|jjrY|jjdd�s&|jjr'|j�rd|_|j�Sd|_|j�S)Nr�FT)	rOrwr~r�rnr��_is_server_side�create_server_side_cursor�create_default_cursorr�s r�rjz%DefaultExecutionContext.create_cursor�sq��
�L�L�5�5��&�&�*�*�+;�U�C��L�L�4�4��4�4�6�$(�D� ��1�1�3�3�#(�D� ��-�-�/�/r�c�"�|j�Sr�)�fetchall)r�rs  r�r�z.DefaultExecutionContext.fetchall_for_returning�s����� � r�c�6�|jj�Sr�)rarr�s r�r�z-DefaultExecutionContext.create_default_cursor�s���%�%�,�,�.�.r�c��t��r��r�r�s r�r�z1DefaultExecutionContext.create_server_side_cursor�s��!�#�#r�c��yr�r�r�s r��pre_execz DefaultExecutionContext.pre_exec�rAr�c��td��)Nz,This dialect does not support OUT parametersr�)r�r�s  r��get_out_parameter_valuesz0DefaultExecutionContext.get_out_parameter_values�s��!�:�
�	
r�c��yr�r�r�s r��	post_execz!DefaultExecutionContext.post_exec�rAr�c�:�|j|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�rO)r�r��colname�coltypes    r��get_result_processorz,DefaultExecutionContext.get_result_processor�s���-�-�d�l�l�G�D�Dr�c�.�|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 for an INSERT statement that would need to
        return the last inserted primary key for those dialects that make use
        of the lastrowid concept.  In these cases, it is called directly after
        :meth:`.ExecutionContext.post_exec`.

        )r�	lastrowidr�s r��
get_lastrowidz%DefaultExecutionContext.get_lastrowid�s��"�{�{�$�$�$r�c��yr�r�)r�r�s  r��handle_dbapi_exceptionz.DefaultExecutionContext.handle_dbapi_exceptionrAr�c�^�|j�|jS|jjSr�)r]r�rowcountr�s r�r�z DefaultExecutionContext.rowcounts&���>�>�%��>�>�!��;�;�'�'�'r�c��|jduSr�)r]r�s r��
_has_rowcountz%DefaultExecutionContext._has_rowcounts���~�~�T�)�)r�c�.�|jjSr�)rOr�r�s r�r�z.DefaultExecutionContext.supports_sane_rowcounts���|�|�2�2�2r�c�.�|jjSr�)rOr=r�s r�r=z4DefaultExecutionContext.supports_sane_multi_rowcounts���|�|�8�8�8r�c�N�|j}|j�-|jdd�r|jj|_|j
s|jr|j�}dx}}n�|jdd�}|jxs|jdd�}|j}|r<|tjur*tj|j|j�}|jxs|jj}|�tj}tj |||�}|j"}|r7|j$s+t't(|�j*r|j-|�|j.|_|r|j1|�}|S)N�preserve_rowcountF�	yield_perr�)r~r]r�rr�r~r|�_setup_dml_or_text_resultr��cursor_fetch_strategy�_cursor�_DEFAULT_FETCH�BufferedRowCursorFetchStrategy�alternate_cursor_descriptionr��_NO_CURSOR_DQL�CursorResultrzrhrr-�has_out_parameters�_setup_out_parameters�_soft_closedr�)r��exec_optr��yp�sr�strategy�cursor_descriptionrzs        r��_setup_result_proxyz+DefaultExecutionContext._setup_result_proxy sc���)�)���>�>�!�h�l�l�3F��&N�!�[�[�1�1�D�N��<�<�4�<�<��3�3�5�F��O�B�����k�4�0�B��%�%�N����6F��)N�B��1�1�H��h�'�"8�"8�8�"�A�A��K�K��!7�!7����5�5�+��;�;�*�*�
�"�)�"�1�1���)�)�$��:L�M�F��=�=��
��J�J��[�(�+�>�>��&�&�v�.�"�/�/���
��%�%�b�)�F��
r�c�v�tt|j�}|jj	�D��cgc]\}}|j
r||f��}}}i}t
|D��cgc]\}}|��	c}}|j|D��cgc]\}}|��	c}}��D]�\}}|j}	|	j|j�}
|
j|jj�}|
j|j|�}|�||�}|||j<��||_ycc}}wcc}}wcc}}wr�)rr-rz�
bind_namesr,�
isoutparamr�r�r��dialect_implrO�get_dbapi_typer��result_processorru�out_parameters)
r�r�rz�paramr��out_bindparamsr�	bindparam�	raw_valuer��	impl_type�
dbapi_typer
s
             r�rz-DefaultExecutionContext._setup_out_parametersJs3����T�]�]�3�� (�2�2�8�8�:�
�:���t�����D�M�:�	�
�
��$'�&4�5�n�{�u�d�U�n�5��)�)�)7�8��+�%����8�
�%
� �I�y��N�N�E��*�*�4�<�<�8�I�"�1�1�$�,�,�2K�2K�L�J�(�9�9����j� �� �+�,�Y�7�	�,5�N�9�=�=�)�%
� !/����/
��
6��8s�D)�!D/
�D5c��tt|j�}|j}|jr|j
tjurB|jr6tj|j|j|j��}|jr|j�|_|j"r<|tj$ur*tj&|j|j(�}|tj*urd}n$|jxs|jj,}|�tj*}n:|j.r.|j
tjusJ�|d|j.}tj0|||�}|jr�|j2rw|j5�}||_|j9||�|_|j:j<sJ�|j>r|jA|�|S|jC�|S|jDs|jC�|S|j2rq|j5�}|r||_tG|�|_$|j>r|jA|�n|jC�|j:j<sJ�|S|j:j<s9|jH�|jjJ|_$|jC�|S|jLs|jNr'|jH�|jjJ|_$|S)N)�initial_buffer�alternate_descriptionr)(rr-rzr�rxrYrr�r}r�� FullyBufferedCursorFetchStrategyrrr�r+�_setup_ins_pk_from_lastrowid�inserted_primary_key_rowsr�r�r�r~�_NO_CURSOR_DMLr�rer�r��allr[�%_setup_ins_pk_from_implicit_returning�	_metadata�returns_rowsr��_rewind�_soft_closer�rr]r�ryrz)r�rzrrr�r�s      r�r�z1DefaultExecutionContext._setup_dml_or_text_resultfs�����T�]�]�3��(,�(B�(B���=�=��"�"�l�&C�&C�C��0�0�"�C�C��K�K�#'�#>�#>�!�=�=�
���+�+��5�5�7��.����H��0F�0F�$F��=�=����T�3�3��H��w�-�-�-�!%���5�5�+��;�;�*�*�
�
�%��-�-�H�
�
$�
$��%�%��)F�)F�F�F�F�"4��T�,�,�,�"��-4�,@�,@��(�.�-
���=�=��*�*��z�z�|��-1��*��>�>�v�t�L��.��'�'�4�4�4�4�
�2�2��N�N�4�(�J�
�G�&�&�(�F�
�E�0�0��"�"�$�B�
�3�
(�
(��:�:�<�D��-1��*� ��Y�D�N��.�.����t�$��"�"�$��#�#�0�0�0�0��
��!�!�.�.��~�~�%�!%���!5�!5������ ��
��]�]�d�m�m��~�~�%�!%���!5�!5����
r�c�"�|j�Sr�)�_setup_ins_pk_from_emptyr�s r�rz1DefaultExecutionContext.inserted_primary_key_rows�s��
�,�,�.�.r�c��tt|j�j}|j	�}|||j
d�gS)Nr)rr-rz�+_inserted_primary_key_from_lastrowid_getterr�r{)r��getterr�s   r�rz4DefaultExecutionContext._setup_ins_pk_from_lastrowid�sI�������
�
5�
5�	��&�&�(�	��y�$�":�":�1�"=�>�?�?r�c��tt|j�j}|jD�cgc]}|d|���
c}Scc}wr�)rr-rzr%r{)r�r&rs   r�r#z0DefaultExecutionContext._setup_ins_pk_from_empty�sG�������
�
5�
5�	�26�1I�1I�J�1I���t�U�#�1I�J�J��Js�Ac���|sgStt|j�j}|j}t||�D��cgc]\}}|||���c}}Scc}}wr�)rr-rz�+_inserted_primary_key_from_returning_getterr{r�)r�r�r�r&r�r�rs       r�rz=DefaultExecutionContext._setup_ins_pk_from_implicit_returning�si����I������
�
5�
5�	��2�2��25�T�?�1K�
�1K�:�3��F�3���1K�
�	
��
s�Ac��|jxs|jxr-ttt|j
�j�Sr�)rxryrerr-rzr�r�s r��lastrow_has_defaultsz,DefaultExecutionContext.lastrow_has_defaults�s7���
�
�.����
�D���d�m�m�,�6�6�5
�	
r�c���	�
���|js|jrytt|j�}|j�}|�y|j}|jrHt|�}|jj||j|j|j|�|jr
|j�nd�|jr-|j xsdD�cgc]}||j"|f��}}n.|j$j'�D��cgc]	\}}||f��}}}g}|D�]\}��|j(vr�||j*vr�t-�j.�rXt1�j.j2��|��
|j5��
��fd�t7|j*|�D����|j9�d��	|j5��	�fd�|j*|D����|j9�d��	���j9||�n|}|j;|�	�j.f���|Scc}wcc}}w)a�Given a cursor and ClauseParameters, prepare arguments
        in order to 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 set the
        :attr:`.Dialect.bind_typing` attribute to
        :attr:`.BindTyping.SETINPUTSIZES`.  Python-oracledb and cx_Oracle are
        the only DBAPIs that requires setinputsizes(); pyodbc offers it as an
        option.

        Prior to SQLAlchemy 2.0, the setinputsizes() approach was also used
        for pg8000 and asyncpg, which has been changed to inline rendering
        of casts.

        Nr�c3��K�|]@\}}���j||�n|�|�z�jj|�zf���By�wr�)r�r��types)rr��	paramnamer�dbtypesr��nums   ����r�rzCDefaultExecutionContext._prepare_set_input_sizes.<locals>.<genexpr>>s`�����
.�/�N�C��
$6�#A�!3� 6� 6�y�)� L�%.�#�C�#�I�.�%�N�N�0�0��s��;��/�s�AA	c3�d�K�|]'}���j||�n|��jf���)y�wr�)r�r�)rr/r�dbtyper�s  ���r�rzCDefaultExecutionContext._prepare_set_input_sizes.<locals>.<genexpr>NsF�����.�*H�I�
$6�#A�!3� 6� 6�y�)� L�%.�"�%�N�N��*H�s�-0)rhr|rr-rz�_get_set_input_sizes_lookuprOrZr��dispatch�do_setinputsizesrr�r�r�r~r��bindsr	r,r�r_r)r�rr.r�r�r�r2)
r�rz�
inputsizesrOrur,r�generic_inputsizes�escaped_namer3r0r�r1s
      `  @@@@r��_prepare_set_input_sizesz0DefaultExecutionContext._prepare_set_input_sizes�sU���&�:�:�������T�]�]�3���9�9�;�
�����,�,������j�)�J����-�-��D�K�K�������$�
��&�&�!)�!<�!<��!%�����$�/�/�5�2�5��5�C��h�n�n�S�)�*�5�
��'/�&9�&9�&?�&?�&A��&A�N�I�s��i� �&A�
��
FH��#�N�C���H�;�;�;���d�/�/�/� ����0��i�n�n�2�2�3�C�(��3�G�&�-�-�
.�/8� �5�5�c�:�/�
.�
�(�^�^�I�t�<�F�&�-�-�.�*.�)B�)B�3�)G�.��$���	�4�8��*�5�'�*�*�3��4���#�)�)�!�6�9�>�>�:��[$�b"�!��y��
s�%I
�Ic���|jr|j||�S|jr||_|j	|�S|j
r|j
|||�S|jSr�)�is_sequence�
fire_sequence�is_callable�current_columnr��is_clause_element�_exec_default_clause_element)r��columnr]r�s    r��
_exec_defaultz%DefaultExecutionContext._exec_defaultisj������%�%�g�u�5�5�
�
 �
 �#)�D���;�;�t�$�$�
�
&�
&��4�4�V�W�e�L�L��;�;�r�c	�T�|js!tj|j|�}n|j}tj|�j|j��}|j�}|j}|jrM|jj|jxsdD�cgc]}||vr||||�n||��c}�}	n%|D�cic]}|||vr||||�n||��}	}|jt|�||	��Scc}wcc}w)NrNr�)r�)�
_arg_is_typedr'�type_coercer�rQrRrOr�r�r~r$r�r�rP)
r�rCr]r��default_argrzr�r�rur�s
          r�rBz4DefaultExecutionContext._exec_default_clause_elementxsY���$�$�$�0�0����e�D�K�!�+�+�K��$�$�[�1�9�9�$�,�,�9�O��"�3�3�5���.�.�
�������=�=� (�3�3�9�r�9�
� :���*�,�(�
�3����(<�=�,�S�1�2� :�
�	�J�"+�
�+�C���j�(�$�J�s�O�O�C�$8�9�(��-�.�
+�

���#�#���M�5�Z�$�
�	
��%��s�8D �"D%z"Optional[_CoreSingleExecuteParams]�current_parametersc����	|j�|j}|�J���J�tdtt|j�j�}|�J�|r�tj|�r�|jr�|jr5|jdz�|jj�|ji}n|j�|ji}d�|j �J�|j j#�}|j%��fd�|D��|S�S#t$rtjd��wxYw)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 functionrFrrc3�6�K�|]}|�d|�fzf���y�w)z%s_m%dNr�)rru�indexr�s  ��r�rzADefaultExecutionContext.get_current_parameters.<locals>.<genexpr>�s(������FJ�s��j��S�%�L�!8�9�:�d�s�)rIr@�AttributeErrorr"r�rr-rzr}r&rx�_has_multi_parameters�_is_multiparam_columnrL�originalru�_dict_parameters�keysr)r��isolate_multiinsert_groupsrCr}�drRrLr�s      @@r��get_current_parametersz.DefaultExecutionContext.get_current_parameters�sE���B
	*��0�0�J��(�(�F��%�%�%��)�)�)����[�$�-�-�8�F�F�
�
��(�(�(�&����]�+��3�3��+�+����q�(���_�_�(�(�*�V�Z�Z�*@�A���Z�Z��F�J�J�!7�8���� �1�1�=�=�=� �1�1�6�6�8�D�
�H�H��FJ��
��H����=�	��)�)�C��
�	�s�D�D=c�j�|j�y|j||j|j�Sr�)r]rDr��r�rCs  r��get_insert_defaultz*DefaultExecutionContext.get_insert_default�s,���>�>�!���%�%�f�f�n�n�f�k�k�J�Jr�c�j�|j�y|j||j|j�Sr�)�onupdaterDr�rWs  r��get_update_defaultz*DefaultExecutionContext.get_update_default	s,���?�?�"���%�%�f�f�o�o�v�{�{�K�Kr�c�F�tt|j�}|j}d}|jr8|jD�cgc]"}|||�|j
|jf��$}}nF|jr8|jD�cgc]"}|||�|j|jf��$}}ng}|jD]T}||_|D]F\}}\}}	}
}}|r|||<|dz
}�|	r|||<�"|
r||_||�||<�7||�}
|
��B|
||<�H�V|`ycc}wcc}w)Nrr)
rr-rz�_within_exec_param_key_getterr��_default_description_tuplerXr��_onupdate_description_tupler[r{rIr@)r�rz�
key_getter�sentinel_counter�c�
prefetch_recsr�	param_keyr��	is_scalarr?�is_sentinel�fallbackrws              r�r�z1DefaultExecutionContext._process_execute_defaults	sv����T�]�]�3���;�;�
����#�#�"�1�1��2�A���q�M��0�0��+�+�	�2�
���
%�
%�"�1�1��2�A���q�M��1�1��+�+�	�2�
���M��-�-�E�&+�D�#�����:��i��k���'7�E�)�$�$��)�$��'*�E�)�$� �*+�D�'�'*�4�y�E�)�$�"�1�+�C���+.��i�(��.�,
�#��Y��s�'D�'D)rOrr�rr�rAr~r8rlr+rr)rOrr�rr�rAr~r8rzr-r�r4r\rBrdrcrrrrr)rOrr�rr�rAr~r8r�rPr�r7rr)
rOrr�rr�rAr~r8rr)rrP)rzOptional[Sequence[Column[Any]]]r�)rri)rz0Optional[List[Tuple[str, Any, TypeEngine[Any]]]])T)Xrr�rrxryrzr~r|rhr�EXECUTErYr"rzrZr[r$�
EMPTY_DICTr~r�r�r�r\r�r�r�r�rr]r^r r_r�rrrrkrrerRrnrr�r�r�r�r�rMr�rOr�r"r�r�r�r�r�r�rjr�r�r�r�r�r�r�r�r��non_memoized_propertyr�r�r�r=rrr�rrr#rr+r;rDrBrIrUrXr[r�r�r�r�ryry�sd���H��H��H��G��G��E�".�"6�"6�M�<�6�#'�H� �'�	
���
�;?��7�>�)-�����8�#�2�2��.2��+�2�"��"��!&���O��L�#�I�}�#�
:>��6�=�4F�D�4F�4F�4H��1�H���I���,�,�
������>�>�(�(�@�@��1�4�?�?�C��>B��;�B������*��*��*�0�	*�
+�*�"�
*�
�*��*�X�!+� ;� ;�c��c��c�0�	c�
+�c��
c�,�c�&�c�E�c��c�
�c��c�J�'��'��'�0�	'�
+�'��
'�-�'�
�'��'�R������0�	�
+��
�
���& �D�
��
�
���4��4�
���+��+�
���'��'�

������
���B��B�'�R
���$��$��:0�$!�/�$�
�
�

�E�%�&
�
���(� �(��*��*�3�9�(�T/�8p�d
���/��/�@�K�
�
�
i"�	9�i"�V
�%
�N>B��:�A��0B�HK�L�4$r�ry)pr�
__future__rr3r�re�re�timer�typingrrrrr	r
rrr
rrrrrrr��rrr�r�baserrrrrr�
reflectionrrr!r"r#r$�sqlr%r&r'r(r��sql._typingr)�sql.baser*�sql.compilerr+r,r-�sql.elementsr.�util.typingr/r0r.r1r2r3r4r5r6r7r8r9r:r;r<r�r=r�r>r?r@rArBrCrDrE�sql.dmlrFrGrH�
sql.schemarI�sql.type_apirJrKrLrR�I�UNICODEr�r�r�r�r�r�r�rNrUry�execution_ctx_clsr�r�r��<module>r~sw���#���
�	��
�������!�"������ �������"�#��$�(�"�#���������"�'��&�7�&�&��!�	��� ��+�3�4�3�4�+�;�'�+�*���'��,� �'�&�1�"�$�,�#�1�3�)�#��
�
�<�����
�
�1B�C��	���
�
�����X
�W�X
�v *��*�0V$�.�V$�r$$;�� r�

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