Couchbase Transactions C++ Client
1.0.0
Transactions client for couchbase
|
The result of an operation on a cluster. More...
#include <result.hxx>
Public Member Functions | |
CB_NODISCARD std::string | strerror () const |
CB_NODISCARD bool | is_not_found () const |
CB_NODISCARD bool | is_success () const |
CB_NODISCARD bool | is_value_too_large () const |
CB_NODISCARD bool | is_timeout () const |
CB_NODISCARD uint32_t | error () const |
Public Attributes | |
uint32_t | rc |
return code for operation | |
uint64_t | cas |
CAS for document, if any. | |
uint8_t | datatype |
datatype flag for content | |
uint32_t | flags |
std::string | key |
document key | |
boost::optional< nlohmann::json > | value |
content of document | |
std::vector< subdoc_result > | values |
results of subdoc spec operations | |
bool | is_deleted |
bool | ignore_subdoc_errors |
Friends | |
template<typename OStream > | |
OStream & | operator<< (OStream &os, const result &res) |
The result of an operation on a cluster.
This encapsulates the server response to an operation. For example:
If the operation returns multiple results, like a lookup_in, then result::values is used instead:
If you define a to_json and from_json on an object, you can serialize/deserialize into it directly:
CB_NODISCARD uint32_t couchbase::result::error | ( | ) | const |
Get error code. This is either the rc_, or if that is LCB_SUCCESS, then the first error in the values (if any) see subdoc_results
CB_NODISCARD std::string couchbase::result::strerror | ( | ) | const |
Get description of error