
    ,h                        S SK Jr  S SKrS SKrS SKJr  S SKJr  \R                  (       a  SSKJr  SSK	J
r
  SSK	Jr   " S	 S
\R                  5      r " S S\5      r " S S\5      rg)    )annotationsN)Any)ClassVar   )
Connection)DBAPIConnection)Dialectc                     \ rS rSr% SrSrSrS\S'   \R                        SS j5       r
\R                          SS j5       r          SS	 jr\R                        SS
 j5       r        SS jrSrg)ConnectionCharacteristic   a  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                    g)zFReset the characteristic on the DBAPI connection to its default
value.Nr   selfdialect
dbapi_conns      Y/var/www/auris/envauris/lib/python3.13/site-packages/sqlalchemy/engine/characteristics.pyreset_characteristic-ConnectionCharacteristic.reset_characteristic,           c                    g)z<set characteristic on the DBAPI connection to a given value.Nr   r   r   r   values       r   set_characteristic+ConnectionCharacteristic.set_characteristic3   r   r   c                (    U R                  XU5        g)zset 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_characteristic6ConnectionCharacteristic.set_connection_characteristic9   s     	U;r   c                    g)zHGiven a DBAPI connection, get the current value of the
characteristic.

Nr   r   s      r   get_characteristic+ConnectionCharacteristic.get_characteristicI   r   r   c                $    U R                  X5      $ )zGiven 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_characteristic6ConnectionCharacteristic.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____firstlineno____doc__	__slots__r   __annotations__abcabstractmethodr   r   r"   r%   r)   __static_attributes__r   r   r   r   r      s   & I$)M>),;	  	KK,;KDGK	K K
<< < $	<
 < 
<  	,;	 
<
<&0
<>M
<	
<r   r   c                  n    \ rS rSr% SrSrS\S'         SS jr        SS jr      SS jr	S	r
g
)IsolationLevelCharacteristic_   z0Manage the isolation level on a DBAPI connectionTr   r   c                &    UR                  U5        g N)reset_isolation_levelr   s      r   r   1IsolationLevelCharacteristic.reset_characteristicd   s     	%%j1r   c                &    UR                  X#5        g r@   )_assert_and_set_isolation_levelr   s       r   r   /IsolationLevelCharacteristic.set_characteristici   s     	//
Br   c                $    UR                  U5      $ r@   )get_isolation_levelr   s      r   r%   /IsolationLevelCharacteristic.get_characteristicn   s     **:66r   r   Nr+   r.   r0   )r2   r3   r4   r5   r6   r   r8   r   r   r%   r;   r   r   r   r=   r=   _   ss    :$(M>(22,;2	2
CC,;CDGC	C
77,;7	7r   r=   c                      \ rS rSr% SrSrS\S'         SS jr        SS jr          SS jr	      SS	 jr
        SS
 jrSrg)LoggingTokenCharacteristict   z_Manage the 'logging_token' option of a :class:`_engine.Connection`.

.. versionadded:: 2.0.30

Fr   r   c                    g r@   r   r   s      r   r   /LoggingTokenCharacteristic.reset_characteristic}   s     	r   c                    [        5       er@   NotImplementedErrorr   s       r   r   -LoggingTokenCharacteristic.set_characteristic        "##r   c                0   ^ T(       a  U4S jUl         g U? g )Nc                   > ST< SU < 3$ )N[z] r   )msgr   s    r   <lambda>JLoggingTokenCharacteristic.set_connection_characteristic.<locals>.<lambda>   s
    uc2Jr   )_message_formatterr    s       `r   r"   8LoggingTokenCharacteristic.set_connection_characteristic   s     &JD#'r   c                    [        5       er@   rO   r   s      r   r%   -LoggingTokenCharacteristic.get_characteristic   rR   r   c                :    UR                   R                  SS 5      $ )Nlogging_token)_execution_optionsgetr(   s       r   r)   8LoggingTokenCharacteristic.get_connection_characteristic   s     &&**?DAAr   r   Nr+   r.   r/   r0   r1   )r2   r3   r4   r5   r6   r   r8   r   r   r"   r%   r)   r;   r   r   r   rJ   rJ   t   s     %*M>),;	
$$,;$DG$	$

(
( 
( $	
(
 
( 

($$,;$	$
BB&0B>MB	Br   rJ   )
__future__r   r9   typingr   r   TYPE_CHECKINGbaser   
interfacesr   r	   ABCr   r=   rJ   r   r   r   <module>rh      sW    # 
   	 +#H<sww H<V7#; 7*'B!9 'Br   