33#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
37to_binary(std::string_view value)
noexcept -> std::vector<std::byte>;
48 std::enable_if_t<std::is_same_v<Document, std::string> || std::is_same_v<Document, binary>,
52 if constexpr (std::is_same_v<Document, std::string>) {
61 std::enable_if_t<std::is_same_v<Document, std::string> || std::is_same_v<Document, binary>,
66 throw std::system_error(
68 "raw_json_transcoder expects document to have JSON common flags, flags=" +
69 std::to_string(encoded.flags));
71 if constexpr (std::is_same_v<Document, std::string>) {
72 return std::string{
reinterpret_cast<const char*
>(encoded.data.data()), encoded.data.size() };
79#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
81struct is_transcoder<raw_json_transcoder> :
public std::true_type {
Definition raw_json_transcoder.hxx:44
static auto decode(const encoded_value &encoded) -> Document
Definition raw_json_transcoder.hxx:63
static auto encode(const Document &document) -> encoded_value
Definition raw_json_transcoder.hxx:50
constexpr auto has_common_flags(std::uint32_t flags) -> bool
Checks whether the upper 8 bits are set, indicating common flags presence.
Definition codec_flags.hxx:95
constexpr std::uint32_t json_common_flags
Definition codec_flags.hxx:145
@ decoding_failure
Returned when decoding of the data into the user object failed.
auto to_binary(mutate_in_macro value) -> std::vector< std::byte >
Converts macro into binary array suitable for sending to the server.
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28
Definition encoded_value.hxx:27