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

Method encode_value

couchbase/transcoder.py:219–228  ·  view source on GitHub ↗
(self,
                     value  # type: Union[bytes,bytearray]
                     )

Source from the content-addressed store, hash-verified

217
218class RawBinaryTranscoder(Transcoder):
219 def encode_value(self,
220 value # type: Union[bytes,bytearray]
221 ) -> Tuple[bytes, int]:
222
223 if isinstance(value, (bytes, bytearray)):
224 if isinstance(value, bytearray):
225 value = bytes(value)
226 return value, FMT_BYTES
227 else:
228 raise ValueFormatException("Only binary data supported by RawBinaryTranscoder")
229
230 def decode_value(self,
231 value, # type: bytes

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected