|
Couchbase C++ SDK 1.4.0 (rev. 59aa900)
|
#include <couchbase/scan_result_item.hxx>

Public Member Functions | |
| scan_result_item ()=default | |
| Constructs an empty scan_result_item. | |
| scan_result_item (std::string id, couchbase::cas cas, codec::encoded_value value, std::optional< std::chrono::system_clock::time_point > expiry_time, std::shared_ptr< crypto::manager > crypto_manager={}) | |
| Constructs an instance representing a single item from the result of a scan operation. | |
| scan_result_item (std::string id) | |
| Constructs an instance representing a single item from the result of an id-only scan operation. | |
| bool | operator== (const scan_result_item &other) const |
| auto | id () const -> const std::string & |
| Returns the ID of the document. | |
| auto | id_only () const -> bool |
| Returns whether this scan result item only contains the document ID. | |
| template<typename Document, typename Transcoder = codec::default_json_transcoder, std::enable_if_t<!codec::is_transcoder_v< Document >, bool > = true, std::enable_if_t< codec::is_transcoder_v< Transcoder >, bool > = true> | |
| auto | content_as () const -> Document |
| Decodes the content of the document using given codec. | |
| auto | expiry_time () const -> const std::optional< std::chrono::system_clock::time_point > & |
| If the document has an expiry, returns the point in time when the loaded document expires. | |
| Public Member Functions inherited from result | |
| 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. | |
|
default |
|
inline |
Constructs an instance representing a single item from the result of a scan operation.
| id | the document ID |
| cas | |
| value | raw document contents along with flags describing its structure |
| expiry_time | optional point in time when the document will expire |
| crypto_manager | manager handed to the transcoder to decrypt encrypted fields |
|
inlineexplicit |
Constructs an instance representing a single item from the result of an id-only scan operation.
| id | the document ID |
|
inlinenodiscard |
Decodes the content of the document using given codec.
collection#scan() request was made using scan_options#ids_only() set to false.| Document | custom type that Transcoder returns |
| Transcoder | type that has static function decode that takes codec::encoded_value and returns Document |
|
inlinenodiscard |
If the document has an expiry, returns the point in time when the loaded document expires.
collection#scan() request was made using scan_options#ids_only() set to false.
|
inlinenodiscard |
Returns the ID of the document.
|
inlinenodiscard |
Returns whether this scan result item only contains the document ID.
If true, accessing the content or CAS will return the default values.
|
inline |