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

Method keys

couchbase/datastructures.py:562–572  ·  view source on GitHub ↗

Returns a list of all the keys which exist in the map. Returns: List[str]: A list of all the keys that exist in the map.

(self)

Source from the content-addressed store, hash-verified

560 return sd_res.exists(0)
561
562 def keys(self) -> List[str]:
563 """Returns a list of all the keys which exist in the map.
564
565 Returns:
566 List[str]: A list of all the keys that exist in the map.
567 """
568 op_type = DatastructureOperationType.MapKeys
569 with ObservableRequestHandler(op_type, self._impl.observability_instruments) as ds_obs_handler:
570 ds_obs_handler.create_kv_span(self._impl._request_builder._collection_dtls.get_details_as_dict())
571 map_ = self._get(parent_span=ds_obs_handler.wrapped_span)
572 return list(map_.content_as[dict].keys())
573
574 def values(self) -> List[Any]:
575 """Returns a list of all the values which exist in the map.

Callers

nothing calls this directly

Calls 4

_getMethod · 0.95
get_details_as_dictMethod · 0.80
create_kv_spanMethod · 0.45

Tested by

no test coverage detected