Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /opt/hc_python/lib/python3.12/site-packages/mysqlx/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/hc_python/lib/python3.12/site-packages/mysqlx/__pycache__/dbdoc.cpython-312.pyc
�

���gx��:�dZddlZddlZddlmZGd�de�Zy)zImplementation of the DbDoc.�N�)�STRING_TYPESc�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�DbDocz�Represents a generic document in JSON format.

    Args:
        value (object): The value can be a JSON string or a dict.

    Raises:
        ValueError: If ``value`` type is not a basestring or dict.
    c���t|t�r||_yt|t�rt	j
|�|_yt
djt|����)NzUnable to handle type: {0})	�
isinstance�dict�__dict__r�json�loads�
ValueError�format�type)�self�values  �c/opt/hc_python/lib64/python3.12/site-packages/../../../lib/python3.12/site-packages/mysqlx/dbdoc.py�__init__zDbDoc.__init__)sH���e�T�"�!�D�M�
��|�
,� �J�J�u�-�D�M��9�@�@��e��M�N�N�c� �|j|S�N)r
)r�indexs  r�__getitem__zDbDoc.__getitem__2s���}�}�U�#�#rc�6�|jj�Sr)r
�keys�rs rrz
DbDoc.keys5s���}�}�!�!�#�#rc��d|jvr+tj�j|jd<|jdS)N�_id)r
�uuid�uuid4�hexrs r�	ensure_idzDbDoc.ensure_id8s7����
�
�%�#'�:�:�<�#3�#3�D�M�M�%� ��}�}�U�#�#rc�@�tj|j�Sr)r�dumpsr
rs r�__str__z
DbDoc.__str__=s���z�z�$�-�-�(�(rN)	�__name__�
__module__�__qualname__�__doc__rrrr!r$�rrrr s!���O�$�$�$�
)rr)r(rr�compatr�objectrr)rr�<module>r,s��0#��� �)�F�)r

ZeroDay Forums Mini