Couchbase C++ SDK 1.4.0 (rev. 59aa900)
Loading...
Searching...
No Matches
result Class Reference

Base class for operations of data service. More...

#include <couchbase/result.hxx>

Inheritance diagram for result:
Inheritance graph

Public Member Functions

 result ()=default
 result (couchbase::cas cas)
 result (couchbase::cas cas, couchbase::node_id node_id)
auto cas () const -> couchbase::cas
auto node_id () const -> const couchbase::node_id &
 Returns the identity of the cluster node that served this request.
void set_node_id_internal (couchbase::node_id id)
 Implementation-only setter used by core::impl::invoke_with_node_id to propagate the node identity from a KV error context onto the result.

Detailed Description

Base class for operations of data service.

Since
1.0.0
Committed
Generally available API and should be preferred in production

Constructor & Destructor Documentation

◆ result() [1/3]

result ( )
default
Since
1.0.0
Internal
Internal interface

◆ result() [2/3]

result ( couchbase::cas cas)
inlineexplicit
Parameters
cas
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ result() [3/3]

result ( couchbase::cas cas,
couchbase::node_id node_id )
inline
Parameters
cas
node_ididentity of the node that served the request
Since
1.3.2
Internal
Internal interface

Member Function Documentation

◆ cas()

auto cas ( ) const -> couchbase::cas
inlinenodiscard
Returns
CAS value associated with the operation result.
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ node_id()

auto node_id ( ) const -> const couchbase::node_id &
inlinenodiscard

Returns the identity of the cluster node that served this request.

The returned node_id is default-constructed (falsy) when the node could not be determined.

Returns
identity of the serving node
Since
1.3.2
Uncommitted
Might be changed in the future, and eventually promoted to committed

◆ set_node_id_internal()

void set_node_id_internal ( couchbase::node_id id)
inline

Implementation-only setter used by core::impl::invoke_with_node_id to propagate the node identity from a KV error context onto the result.

Despite living in the public header (it is needed to set the field on the public-facing result-derived types from a template instantiation in the impl layer), this is not part of the user-facing API. The name is deliberately noisy —

Internal
Internal interface alone is documentation-only and does not stop a user discovering result.node_id(...) via autocomplete; set_node_id_internal is harder to mistake for a documented mutator.
Since
1.3.2
Internal
Internal interface

The documentation for this class was generated from the following file: