84 template<
typename Document>
87 for (
const entry&
e : entries_) {
88 if (
e.original_index == index) {
89 return codec::tao_json_serializer::deserialize<Document>(
e.value);
93 "invalid index for mutate_in result: " + std::to_string(index));
106 template<
typename Document>
109 for (
const entry&
e : entries_) {
110 if (
e.path == path) {
111 return codec::tao_json_serializer::deserialize<Document>(
e.value);
115 "invalid path for mutate_in result: " + path);
146 for (
const entry&
e : entries_) {
147 if (
e.original_index == index) {
148 return !
e.value.empty();
152 "invalid index for mutate_in result: " + std::to_string(index));
166 for (
const entry&
e : entries_) {
167 if (
e.path == path) {
168 return !
e.value.empty();
172 "invalid path for mutate_in result: " + path);
176 std::vector<entry> entries_{};
177 bool is_deleted_{
false };
CAS is a special type that represented in protocol using unsigned 64-bit integer, but only equality c...
Definition cas.hxx:34
Represents result of mutate_in operations.
Definition mutate_in_result.hxx:35
mutate_in_result(couchbase::cas cas, couchbase::mutation_token token, std::vector< entry > entries, bool is_deleted)
Constructs result for mutate_in_result operation.
Definition mutate_in_result.hxx:64
auto has_value(const std::string &path) const -> bool
Returns whether the field has value.
Definition mutate_in_result.hxx:164
auto content_as(const std::string &path) const -> Document
Decodes field of the document into type.
Definition mutate_in_result.hxx:107
auto has_value(std::size_t index) const -> bool
Returns whether the field has value.
Definition mutate_in_result.hxx:144
auto content_as(std::size_t index) const -> Document
Decodes field of the document into type.
Definition mutate_in_result.hxx:85
mutate_in_result()=default
auto is_deleted() const -> bool
Returns whether this document was deleted (a tombstone).
Definition mutate_in_result.hxx:130
Represents result of mutation operations.
Definition mutation_result.hxx:35
Value object to contain partition details and sequence number.
Definition mutation_token.hxx:32
std::vector< std::byte > binary
Definition encoded_value.hxx:25
@ path_invalid
The path provided for a sub-document operation was not syntactically correct.
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28
Definition mutate_in_result.hxx:41
std::string path
Definition mutate_in_result.hxx:42
codec::binary value
Definition mutate_in_result.hxx:43
std::size_t original_index
Definition mutate_in_result.hxx:44