Ë
    ðmxi�  ã                  óÊ   — d dl mZ d dlZd dlZd dlmZ d dlmZ ej                  rddlmZ ddl	m
Z
 ddl	mZ  G d	„ d
ej                  «      Z G d„ de«      Z G d„ de«      Zy)é    )ÚannotationsN)ÚAny)ÚClassVaré   )Ú
Connection)ÚDBAPIConnection)ÚDialectc                  óò   — e Zd ZU dZdZdZded<   ej                  	 	 	 	 	 	 dd„«       Z	ej                  	 	 	 	 	 	 	 	 dd„«       Z
	 	 	 	 	 	 	 	 	 	 dd„Zej                  	 	 	 	 	 	 dd	„«       Z	 	 	 	 	 	 	 	 dd
„Zy)ÚConnectionCharacteristica÷  An abstract base for an object that can set, get and reset a
    per-connection characteristic, typically one that gets reset when the
    connection is returned to the connection pool.

    transaction isolation is the canonical example, and the
    ``IsolationLevelCharacteristic`` implementation provides this for the
    ``DefaultDialect``.

    The ``ConnectionCharacteristic`` class should call upon the ``Dialect`` for
    the implementation of each method.   The object exists strictly to serve as
    a dialect visitor that can be placed into the
    ``DefaultDialect.connection_characteristics`` dictionary where it will take
    effect for calls to :meth:`_engine.Connection.execution_options` and
    related APIs.

    .. versionadded:: 1.4

    © FúClassVar[bool]Útransactionalc                 ó   — y)zNReset the characteristic on the DBAPI connection to its default
        value.Nr   ©ÚselfÚdialectÚ
dbapi_conns      úX/home/htdocs/ttos/venv/lib/python3.12/site-packages/sqlalchemy/engine/characteristics.pyÚreset_characteristicz-ConnectionCharacteristic.reset_characteristic,   ó   � ó    c                 ó   — y)z<set characteristic on the DBAPI connection to a given value.Nr   ©r   r   r   Úvalues       r   Úset_characteristicz+ConnectionCharacteristic.set_characteristic3   r   r   c                ó*   — | j                  |||«       y)zÜset characteristic on the :class:`_engine.Connection` to a given
        value.

        .. versionadded:: 2.0.30 - added to support elements that are local
           to the :class:`_engine.Connection` itself.

        N)r   ©r   r   Úconnr   r   s        r   Úset_connection_characteristicz6ConnectionCharacteristic.set_connection_characteristic9   s   € ð 	×Ñ ¨°UÕ;r   c                 ó   — y)zXGiven a DBAPI connection, get the current value of the
        characteristic.

        Nr   r   s      r   Úget_characteristicz+ConnectionCharacteristic.get_characteristicI   r   r   c                ó&   — | j                  ||«      S )zæGiven a :class:`_engine.Connection`, get the current value of the
        characteristic.

        .. versionadded:: 2.0.30 - added to support elements that are local
           to the :class:`_engine.Connection` itself.

        )r!   ©r   r   r   r   s       r   Úget_connection_characteristicz6ConnectionCharacteristic.get_connection_characteristicR   s   € ð ×&Ñ& w°
Ó;Ð;r   N©r   r	   r   r   ÚreturnÚNone©r   r	   r   r   r   r   r&   r'   ©
r   r	   r   r   r   r   r   r   r&   r'   ©r   r	   r   r   r&   r   ©r   r	   r   r   r   r   r&   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   Ú__annotations__ÚabcÚabstractmethodr   r   r   r!   r$   r   r   r   r   r      s  … ñð& €Ià$)€M�>Ó)à×ÑðØðØ,;ðà	òó ðð 	×ÑðKØðKØ,;ðKØDGðKà	òKó ðKð
<àð<ð ð<ð $ð	<ð
 ð<ð 
ó<ð  	×ÑðØðØ,;ðà	òó ðð
<Øð
<Ø&0ð
<Ø>Mð
<à	ô
<r   r   c                  ó`   — e Zd ZU dZdZded<   	 	 	 	 	 	 d	d„Z	 	 	 	 	 	 	 	 d
d„Z	 	 	 	 	 	 dd„Zy)ÚIsolationLevelCharacteristicz0Manage the isolation level on a DBAPI connectionTr   r   c                ó&   — |j                  |«       y ©N)Úreset_isolation_levelr   s      r   r   z1IsolationLevelCharacteristic.reset_characteristicd   s   € ð 	×%Ñ% jÕ1r   c                ó(   — |j                  ||«       y r7   )Ú_assert_and_set_isolation_levelr   s       r   r   z/IsolationLevelCharacteristic.set_characteristici   s   € ð 	×/Ñ/°
¸EÕBr   c                ó$   — |j                  |«      S r7   )Úget_isolation_levelr   s      r   r!   z/IsolationLevelCharacteristic.get_characteristicn   s   € ð ×*Ñ*¨:Ó6Ð6r   Nr%   r(   r*   )	r,   r-   r.   r/   r   r1   r   r   r!   r   r   r   r5   r5   _   ss   … Ù:à$(€M�>Ó(ð2Øð2Ø,;ð2à	ó2ð
CØðCØ,;ðCØDGðCà	óCð
7Øð7Ø,;ð7à	ô7r   r5   c                  ó”   — e Zd ZU dZdZded<   	 	 	 	 	 	 dd„Z	 	 	 	 	 	 	 	 dd„Z	 	 	 	 	 	 	 	 	 	 dd„Z	 	 	 	 	 	 dd„Z		 	 	 	 	 	 	 	 dd	„Z
y
)ÚLoggingTokenCharacteristiczgManage the 'logging_token' option of a :class:`_engine.Connection`.

    .. versionadded:: 2.0.30

    Fr   r   c                 ó   — y r7   r   r   s      r   r   z/LoggingTokenCharacteristic.reset_characteristic}   s   € ð 	r   c                ó   — t        «       ‚r7   ©ÚNotImplementedErrorr   s       r   r   z-LoggingTokenCharacteristic.set_characteristic‚   ó   € ô "Ó#Ð#r   c                ó$   ‡— ‰rˆfd„|_         y |` y )Nc                ó   •— d‰›d| ›�S )Nú[z] r   )Úmsgr   s    €r   ú<lambda>zJLoggingTokenCharacteristic.set_connection_characteristic.<locals>.<lambda>�   s   ø� ºuÁcÐ2J€ r   )Ú_message_formatterr   s       `r   r   z8LoggingTokenCharacteristic.set_connection_characteristic‡   s   ø€ ñ Û&JˆDÕ#àÑ'r   c                ó   — t        «       ‚r7   rA   r   s      r   r!   z-LoggingTokenCharacteristic.get_characteristic“   rC   r   c                ó:   — |j                   j                  dd «      S )NÚlogging_token)Ú_execution_optionsÚgetr#   s       r   r$   z8LoggingTokenCharacteristic.get_connection_characteristic˜   s   € ð ×&Ñ&×*Ñ*¨?¸DÓAÐAr   Nr%   r(   r)   r*   r+   )r,   r-   r.   r/   r   r1   r   r   r   r!   r$   r   r   r   r>   r>   t   sÑ   … ñð %*€M�>Ó)ðØðØ,;ðà	óð
$Øð$Ø,;ð$ØDGð$à	ó$ð

(àð
(ð ð
(ð $ð	
(ð
 ð
(ð 
ó
(ð$Øð$Ø,;ð$à	ó$ð
BØðBØ&0ðBØ>MðBà	ôBr   r>   )Ú
__future__r   r2   Útypingr   r   ÚTYPE_CHECKINGÚbaser   Ú
interfacesr   r	   ÚABCr   r5   r>   r   r   r   ú<module>rU      sW   ðõ #ã 
Û Ý Ý à	×ÒÝ Ý+Ý#ôH<˜sŸw™wô H<ôV7Ð#;ô 7ô*'BÐ!9õ 'Br   