Represents result of lookup_in operations.
More...
#include <couchbase/lookup_in_result.hxx>
|
| | lookup_in_result ()=default |
| | lookup_in_result (couchbase::cas cas, std::vector< entry > entries, bool is_deleted) |
| | Constructs result for lookup_in_result operation.
|
| template<typename Document, typename Serializer = codec::tao_json_serializer, std::enable_if_t< codec::is_serializer_v< Serializer >, bool > = true> |
| auto | content_as (std::size_t index) const -> Document |
| | Decodes field of the document into type.
|
| template<typename Document, typename Serializer = codec::tao_json_serializer, std::enable_if_t< codec::is_serializer_v< Serializer >, bool > = true> |
| auto | content_as (const std::string &path) const -> Document |
| | Decodes field of the document into type.
|
| template<typename Document, typename Serializer = codec::tao_json_serializer, std::enable_if_t< codec::is_serializer_v< Serializer >, bool > = true> |
| auto | content_as (subdoc::lookup_in_macro macro) const -> Document |
| | Decodes field of the document into type.
|
| auto | exists (std::size_t index) const -> bool |
| | Allows to check if a value at the given index exists.
|
| auto | exists (subdoc::lookup_in_macro macro) const -> bool |
| | Allows to check if a value at the given index exists.
|
| auto | exists (const std::string &path) const -> bool |
| | Allows to check if a value at the given index exists.
|
| auto | is_deleted () const -> bool |
| | Returns whether this document was deleted (a tombstone).
|
| auto | has_value (std::size_t index) const -> bool |
| | Returns whether the field has value.
|
| auto | has_value (const std::string &path) const -> bool |
| | Returns whether the field has value.
|
| | result ()=default |
| | result (couchbase::cas cas) |
| auto | cas () const -> couchbase::cas |
Represents result of lookup_in operations.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ lookup_in_result() [1/2]
◆ lookup_in_result() [2/2]
Constructs result for lookup_in_result operation.
- Parameters
-
| cas | |
| entries | list of the fields returned by the server |
| is_deleted | |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ content_as() [1/3]
template<typename Document, typename Serializer = codec::tao_json_serializer, std::enable_if_t<
codec::is_serializer_v< Serializer >, bool > = true>
| auto content_as |
( |
const std::string & | path | ) |
const -> Document
|
|
inlinenodiscard |
Decodes field of the document into type.
- Template Parameters
-
- Parameters
-
| path | the path of the result field |
- Returns
- decoded document content
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ content_as() [2/3]
template<typename Document, typename Serializer = codec::tao_json_serializer, std::enable_if_t<
codec::is_serializer_v< Serializer >, bool > = true>
| auto content_as |
( |
std::size_t | index | ) |
const -> Document
|
|
inlinenodiscard |
Decodes field of the document into type.
- Template Parameters
-
- Parameters
-
| index | the index of the result field |
- Returns
- decoded document content
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ content_as() [3/3]
template<typename Document, typename Serializer = codec::tao_json_serializer, std::enable_if_t<
codec::is_serializer_v< Serializer >, bool > = true>
Decodes field of the document into type.
- Template Parameters
-
- Parameters
-
| macro | the path of the result field |
- Returns
- decoded document content
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ exists() [1/3]
| auto exists |
( |
const std::string & | path | ) |
const -> bool
|
|
inlinenodiscard |
Allows to check if a value at the given index exists.
- Parameters
-
| path | the path of the result field |
- Returns
- true if a value is present at the index, false otherwise.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ exists() [2/3]
| auto exists |
( |
std::size_t | index | ) |
const -> bool
|
|
inlinenodiscard |
Allows to check if a value at the given index exists.
- Parameters
-
| index | the index at which to check. |
- Returns
- true if a value is present at the index, false otherwise.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ exists() [3/3]
Allows to check if a value at the given index exists.
- Parameters
-
| macro | the path of the result field |
- Returns
- true if a value is present at the index, false otherwise.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ has_value() [1/2]
| auto has_value |
( |
const std::string & | path | ) |
const -> bool
|
|
inlinenodiscard |
Returns whether the field has value.
- Parameters
-
| path | the path of the result field |
- Returns
- true if the server returned value for the field
- Since
- 1.0.0
- Internal
- Internal interface
◆ has_value() [2/2]
| auto has_value |
( |
std::size_t | index | ) |
const -> bool
|
|
inlinenodiscard |
Returns whether the field has value.
- Parameters
-
| index | the index of the result field |
- Returns
- true if the server returned value for the field
- Since
- 1.0.0
- Internal
- Internal interface
◆ is_deleted()
| auto is_deleted |
( |
| ) |
const -> bool
|
|
inlinenodiscard |
Returns whether this document was deleted (a tombstone).
Will always be false unless lookup_in_options#access_deleted() has been set.
For internal use only: applications should not require it.
- Returns
- whether this document was a tombstone
- Since
- 1.0.0
- Internal
- Internal interface
The documentation for this class was generated from the following file: