� g\�g�����ddlmZddlZddlZddlmZddlmZejrddlmZddl m Z ddl m Z Gd �d ej ��Z Gd �d e ��ZGd �de ��ZdS)�)� annotationsN)�Any)�ClassVar�)� Connection)�DBAPIConnection)�Dialectc��eZdZUdZdZdZded<ejdd ���Z ejdd���Z dd�Z ejdd���Z dd�Z dS)�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]� transactional�dialectr � dbapi_connr�return�Nonec��dS)zNReset the characteristic on the DBAPI connection to its default value.Nr ��selfrrs �q/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sqlalchemy/engine/characteristics.py�reset_characteristicz-ConnectionCharacteristic.reset_characteristic,������valuerc��dS)z<set characteristic on the DBAPI connection to a given value.Nr �rrrrs r�set_characteristicz+ConnectionCharacteristic.set_characteristic3rr�connrc�4�|�|||��dS)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�rrrrrs r�set_connection_characteristicz6ConnectionCharacteristic.set_connection_characteristic9s"�� �����U�;�;�;�;�;rc��dS)zXGiven a DBAPI connection, get the current value of the characteristic. Nr rs r�get_characteristicz+ConnectionCharacteristic.get_characteristicIrrc�.�|�||��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#�rrrrs r�get_connection_characteristicz6ConnectionCharacteristic.get_connection_characteristicRs���&�&�w� �;�;�;rN�rr rrrr�rr rrrrrr� rr rrrrrrrr�rr rrrr�rr rrrrrr)�__name__� __module__� __qualname__�__doc__� __slots__r�__annotations__�abc�abstractmethodrrr!r#r&r rrr r s����������&�I�$)�M�)�)�)�)���������  ��K�K�K���K� <�<�<�<�  �� � � ��� � <� <� <� <� <� <rr c�:�eZdZUdZdZded<dd �Zdd�Zdd�ZdS)�IsolationLevelCharacteristicz0Manage the isolation level on a DBAPI connectionTr rrr rrrrc�0�|�|��dS�N)�reset_isolation_levelrs rrz1IsolationLevelCharacteristic.reset_characteristicds�� �%�%�j�1�1�1�1�1rrrc�2�|�||��dSr7)�_assert_and_set_isolation_levelrs rrz/IsolationLevelCharacteristic.set_characteristicis �� �/�/� �E�B�B�B�B�Brc�,�|�|��Sr7)�get_isolation_levelrs rr#z/IsolationLevelCharacteristic.get_characteristicns���*�*�:�6�6�6rNr'r(r*) r,r-r.r/rr1rrr#r rrr5r5_sm�������:�:�$(�M�(�(�(�(�2�2�2�2� C�C�C�C� 7�7�7�7�7�7rr5c�J�eZdZUdZdZded<dd �Zdd�Zdd�Zdd�Z dd�Z dS)�LoggingTokenCharacteristiczgManage the 'logging_token' option of a :class:`_engine.Connection`. .. versionadded:: 2.0.30 Fr rrr rrrrc��dSr7r rs rrz/LoggingTokenCharacteristic.reset_characteristic}s �� �rrrc��t���r7��NotImplementedErrorrs rrz-LoggingTokenCharacteristic.set_characteristic����"�#�#�#rrrc�(���r �fd�|_dS|`dS)Nc���d��d|��S)N�[z] r )�msgrs �r�<lambda>zJLoggingTokenCharacteristic.set_connection_characteristic.<locals>.<lambda>�s����u�u�u�c�c�2J�r)�_message_formatterr s `rr!z8LoggingTokenCharacteristic.set_connection_characteristic�s0��� � (�&J�&J�&J�&J�D� #� #� #��'�'�'rc��t���r7rArs rr#z-LoggingTokenCharacteristic.get_characteristic�rCrc�8�|j�dd��S)N� logging_token)�_execution_options�getr%s rr&z8LoggingTokenCharacteristic.get_connection_characteristic�s���&�*�*�?�D�A�A�ArNr'r(r)r*r+) r,r-r.r/rr1rrr!r#r&r rrr>r>ts���������� %*�M�)�)�)�)� � � � � $�$�$�$� (� (� (� (�$�$�$�$� B�B�B�B�B�Brr>)� __future__rr2�typingrr� TYPE_CHECKING�baser� interfacesrr �ABCr r5r>r rr�<module>rUs/��#�"�"�"�"�"� � � � � � � � ������������� ��$� � � � � � �+�+�+�+�+�+�#�#�#�#�#�#�H<�H<�H<�H<�H<�s�w�H<�H<�H<�V7�7�7�7�7�#;�7�7�7�*'B�'B�'B�'B�'B�!9�'B�'B�'B�'B�'Br
Memory