19 #include <boost/optional.hpp> 20 #include <couchbase/internal/nlohmann/json.hpp> 21 #include <couchbase/support.hxx> 37 boost::optional<nlohmann::json> value;
124 boost::optional<nlohmann::json>
value;
128 bool ignore_subdoc_errors;
136 , ignore_subdoc_errors(0)
144 CB_NODISCARD std::string
strerror()
const;
145 CB_NODISCARD
bool is_not_found()
const;
146 CB_NODISCARD
bool is_success()
const;
147 CB_NODISCARD
bool is_value_too_large()
const;
148 CB_NODISCARD
bool is_timeout()
const;
153 CB_NODISCARD uint32_t
error()
const;
154 template<
typename OStream>
155 friend OStream& operator<<(OStream& os,
const result& res)
158 os <<
"rc:" << res.
rc <<
",";
159 os <<
"strerror:" << res.
strerror() <<
",";
160 os <<
"cas:" << res.
cas <<
",";
161 os <<
"is_deleted:" << res.is_deleted <<
",";
162 os <<
"datatype:" << res.
datatype <<
",";
163 os <<
"flags:" << res.flags;
166 os << res.
value->dump();
168 if (!res.
values.empty()) {
170 for (
auto& v : res.
values) {
171 os <<
"{" << (v.value ? v.value->dump() :
"") <<
"," << v.status <<
"},";
CB_NODISCARD std::string strerror() const
Definition: bucket.hxx:33
CB_NODISCARD uint32_t error() const
The result of an operation on a cluster.
Definition: result.hxx:113
uint8_t datatype
datatype flag for content
Definition: result.hxx:119
std::string key
document key
Definition: result.hxx:122
uint32_t rc
return code for operation
Definition: result.hxx:115
boost::optional< nlohmann::json > value
content of document
Definition: result.hxx:124
uint64_t cas
CAS for document, if any.
Definition: result.hxx:117
std::vector< subdoc_result > values
results of subdoc spec operations
Definition: result.hxx:126
Result of a subdoc operation.
Definition: result.hxx:36