
    +h                     D    d dl Z ddlmZ  G d de      Z G d de      Zy)    N   )ABCc                       e Zd ZdZdZdZej                  d        Zej                  d        Z	ej                  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

     Fc                      y)z@Reset the characteristic on the connection to its default value.Nr   selfdialect
dbapi_conns      T/var/www/html/venv/lib/python3.12/site-packages/sqlalchemy/engine/characteristics.pyreset_characteristicz-ConnectionCharacteristic.reset_characteristic           c                      y)z6set characteristic on the connection to a given value.Nr   r
   r   r   values       r   set_characteristicz+ConnectionCharacteristic.set_characteristic"   r   r   c                      y)zXGiven a DBAPI connection, get the current value of the
        characteristic.

        Nr   r	   s      r   get_characteristicz+ConnectionCharacteristic.get_characteristic&   r   r   N)__name__
__module____qualname____doc__	__slots__transactionalabcabstractmethodr   r   r   r   r   r   r   r      sc    & IMO O 	E E 	 r   r   c                   "    e Zd ZdZd Zd Zd Zy)IsolationLevelCharacteristicTc                 &    |j                  |       y N)reset_isolation_levelr	   s      r   r   z1IsolationLevelCharacteristic.reset_characteristic1   s    %%j1r   c                 (    |j                  ||       y r"   )set_isolation_levelr   s       r   r   z/IsolationLevelCharacteristic.set_characteristic4   s    ##J6r   c                 $    |j                  |      S r"   )get_isolation_levelr	   s      r   r   z/IsolationLevelCharacteristic.get_characteristic7   s    **:66r   N)r   r   r   r   r   r   r   r   r   r   r    r    .   s    M277r   r    )r   utilr   r   r    r   r   r   <module>r)      s%    
 %s %P
7#; 
7r   