
    )f
                        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	  G d d	ej                        Z G d
 de      Zy)    )annotationsN)Any)ClassVar   )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
ej                  	 	 	 	 	 	 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)z@Reset the characteristic on the connection to its default value.Nr   selfdialect
dbapi_conns      ^/var/www/html/flask-app/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_characteristic1   r   r   c                     y)zXGiven a DBAPI connection, get the current value of the
        characteristic.

        Nr   r   s      r   get_characteristicz+ConnectionCharacteristic.get_characteristic7   r   r   Nr   r   r   r   returnNone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
      s    & I$)M>)OO,;O	O O
 	EE,;EDGE	E E
 	,;	 r   r
   c                  \    e Zd ZU dZded<   	 	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 d	dZ	 	 	 	 	 	 d
dZy)IsolationLevelCharacteristicTr   r   c                &    |j                  |       y N)reset_isolation_levelr   s      r   r   z1IsolationLevelCharacteristic.reset_characteristicD   s     	%%j1r   c                (    |j                  ||       y r-   )_assert_and_set_isolation_levelr   s       r   r   z/IsolationLevelCharacteristic.set_characteristicI   s     	//
EBr   c                $    |j                  |      S r-   )get_isolation_levelr   s      r   r   z/IsolationLevelCharacteristic.get_characteristicN   s     **:66r   Nr   r    r!   )r"   r#   r$   r   r'   r   r   r   r   r   r   r+   r+   A   sp    $(M>(22,;2	2
CC,;CDGC	C
77,;7	7r   r+   )
__future__r   r(   typingr   r   TYPE_CHECKING
interfacesr   r   ABCr
   r+   r   r   r   <module>r8      sC    # 
   	+#+sww +\7#; 7r   