65 std::optional<std::chrono::system_clock::time_point>
expiry_time)
67 , id_{ std::move(
id) }
69 , value_{ std::move(value) }
83 : id_{ std::move(
id) }
90 return id_ == other.id_ &&
cas() == other.
cas();
101 [[nodiscard]]
auto id() const -> const std::
string&
135 template<
typename Document,
137 std::enable_if_t<!codec::is_transcoder_v<Document>,
bool> =
true,
138 std::enable_if_t<codec::is_transcoder_v<Transcoder>,
bool> =
true>
144 return Transcoder::template decode<Document>(value_);
161 -> const std::optional<std::chrono::system_clock::time_point>&
169 codec::encoded_value value_{};
170 std::optional<std::chrono::system_clock::time_point> expiry_time_{};
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
Definition scan_result_item.hxx:41
scan_result_item()=default
Constructs an empty scan_result_item.
auto id() const -> const std::string &
Returns the ID of the document.
Definition scan_result_item.hxx:101
scan_result_item(std::string id, couchbase::cas cas, codec::encoded_value value, std::optional< std::chrono::system_clock::time_point > expiry_time)
Constructs an instance representing a single item from the result of a scan operation.
Definition scan_result_item.hxx:62
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:82
bool operator==(const scan_result_item &other) const
Definition scan_result_item.hxx:88
auto id_only() const -> bool
Returns whether this scan result item only contains the document ID.
Definition scan_result_item.hxx:115
auto content_as() const -> Document
Decodes the content of the document using given codec.
Definition scan_result_item.hxx:139
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:160
json_transcoder< tao_json_serializer > default_json_transcoder
Definition default_json_transcoder.hxx:28
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28
Definition encoded_value.hxx:27