40#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
72 std::optional<std::chrono::system_clock::time_point>
expiry_time,
73 std::shared_ptr<crypto::manager> crypto_manager = {})
75 , id_{ std::move(
id) }
77 , value_{ std::move(value) }
79 , crypto_manager_{ std::move(crypto_manager) }
92 : id_{ std::move(
id) }
99 return id_ == other.id_ &&
cas() == other.
cas();
110 [[nodiscard]]
auto id() const -> const std::
string&
144 template<
typename Document,
146 std::enable_if_t<!codec::is_transcoder_v<Document>,
bool> =
true,
147 std::enable_if_t<codec::is_transcoder_v<Transcoder>,
bool> =
true>
154 return Transcoder::template decode<Document>(value_, crypto_manager_);
156 return Transcoder::template decode<Document>(value_);
174 -> const std::optional<std::chrono::system_clock::time_point>&
182 codec::encoded_value value_{};
183 std::optional<std::chrono::system_clock::time_point> expiry_time_{};
184 std::shared_ptr<crypto::manager> crypto_manager_{};
CAS is a special type that represented in protocol using unsigned 64-bit integer, but only equality c...
Definition cas.hxx:34
Base class for operations of data service.
Definition result.hxx:32
auto cas() const -> couchbase::cas
Definition result.hxx:57
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.
Definition scan_result_item.hxx:69
auto id() const -> const std::string &
Returns the ID of the document.
Definition scan_result_item.hxx:110
scan_result_item(std::string id)
Constructs an instance representing a single item from the result of an id-only scan operation.
Definition scan_result_item.hxx:91
bool operator==(const scan_result_item &other) const
Definition scan_result_item.hxx:97
auto id_only() const -> bool
Returns whether this scan result item only contains the document ID.
Definition scan_result_item.hxx:124
auto content_as() const -> Document
Decodes the content of the document using given codec.
Definition scan_result_item.hxx:148
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.
Definition scan_result_item.hxx:173
constexpr bool is_crypto_transcoder_v
Definition transcoder_traits.hxx:36
json_transcoder< tao_json_serializer > default_json_transcoder
Definition default_json_transcoder.hxx:28
Definition internal.hxx:27
Represents a single item from the result of scan()
Definition allow_querying_search_index_options.hxx:28
Definition encoded_value.hxx:27