Exemplo n.º 1
0
def index_to_rawjson(ix):
    """
    :param ix: dict or IndexInfo object
    :return: serialized JSON
    """
    if isinstance(ix, N1qlIndex):
        ix = ix.raw
    return _to_json(ix)
Exemplo n.º 2
0
 def encode(self):
     """
     Encodes this state object to a string. This string may be passed
     to the :meth:`decode` at a later time. The returned object is safe
     for sending over the network.
     :return: A serialized string representing the state
     """
     return _to_json(self._sv)
Exemplo n.º 3
0
 def __init__(self, body, parent, row_factory=lambda x: x):
     """
     :param str body: serialized JSON string
     :param Bucket parent:
     """
     self._body = _to_json(body)
     self._parent = parent
     self.row_factory = row_factory
     self.errors = []
     self._mres = None
     self._do_iter = True
     self.__raw = False
     self.__meta_received = False