Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.138.37.123
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : dbdoc.cpython-312.pyc
�

%fx��:�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/usr/local/python-3.12/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
© 2025 GrazzMean