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

Class CounterResult

couchbase/result.py:833–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

831
832
833class CounterResult(MutationResult):
834
835 # Uncomment and delete previous property when ready to remove cas CounterResult.
836 # cas = RemoveProperty('cas')
837
838 @property
839 def cas(self) -> int:
840 """
841 .. warning::
842 This property is deprecated and will be removed in a future version.
843
844 int: **DEPRECATED** The CAS of the document.
845 """
846 return self._orig.raw_result.get("cas", 0)
847
848 @property
849 def content(self) -> Optional[int]:
850 """
851 Optional[int]: The value of the document after the operation completed.
852 """
853 return self._orig.raw_result.get("content", None)
854
855 def __repr__(self):
856 # Uncomment and delete previous return when ready to remove cas from CounterResult. Or, ideally,
857 # remove cas from the cxx client's response.
858 # return "CounterResult:{}".format({k:v for k,v in self._orig.raw_result.items() if k != 'cas'})
859 return "CounterResult:{}".format(self._orig.raw_result)
860
861
862class MultiCounterResult:

Callers 5

decrementMethod · 0.90
incrementMethod · 0.90
decrementMethod · 0.90
incrementMethod · 0.90
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected