관리-도구
편집 파일: dbdoc.cpython-38.pyc
U )�ex � @ s4 d Z ddlZddlZddlmZ G dd� de�ZdS )zImplementation of the DbDoc.� N� )�STRING_TYPESc @ s8 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� ZdS ) �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 C s@ t |t�r|| _n*t |t�r*t�|�| _ntd�t|����d S )NzUnable to handle type: {0}) � isinstance�dict�__dict__r �json�loads� ValueError�format�type)�self�value� r �a/opt/hc_python/lib64/python3.8/site-packages/../../../lib/python3.8/site-packages/mysqlx/dbdoc.py�__init__) s zDbDoc.__init__c C s | j | S �N)r )r �indexr r r �__getitem__2 s zDbDoc.__getitem__c C s | j �� S r )r �keys�r r r r r 5 s z DbDoc.keysc C s$ d| j krt�� j| j d<