MCPcopy Index your code
hub / github.com/couchbase/couchbase-python-client / remove

Function remove

couchbase/subdocument.py:466–482  ·  view source on GitHub ↗

Creates a :class:`.Spec` for removing a field from a document. Args: path (str): The path to the field. xattr (bool, optional): Whether this operation should reference the document body or the extended attributes data for the document. Returns: :class:`.

(path,                     # type: str
           xattr=False,              # type: Optional[bool]
           )

Source from the content-addressed store, hash-verified

464
465
466def remove(path, # type: str
467 xattr=False, # type: Optional[bool]
468 ) -> Spec:
469 """Creates a :class:`.Spec` for removing a field from a document.
470
471 Args:
472 path (str): The path to the field.
473 xattr (bool, optional): Whether this operation should reference the document body or the
474 extended attributes data for the document.
475
476 Returns:
477 :class:`.Spec`: An instance of :class:`.Spec`.
478
479 """
480 if not path:
481 return Spec(SubDocOp.REMOVE_DOC, '', False, xattr, False)
482 return Spec(SubDocOp.REMOVE, path, False, xattr, False)
483
484
485def array_append(path, # type: str

Callers 8

remove_atMethod · 0.90
removeMethod · 0.90
removeMethod · 0.90
popMethod · 0.90
remove_atMethod · 0.90
removeMethod · 0.90
removeMethod · 0.90
popMethod · 0.90

Calls 1

SpecClass · 0.85

Tested by

no test coverage detected