Couchbase C++ SDK 1.0.2 (rev. 51f4775)
Loading...
Searching...
No Matches
lookup_in_specs Class Reference

#include <couchbase/lookup_in_specs.hxx>

Public Member Functions

 lookup_in_specs ()=default
 
template<typename... Operation>
 lookup_in_specs (Operation... args)
 
template<typename Operation >
void push_back (const Operation &operation)
 Add subdocument operation to list of specs.
 
template<typename Operation , typename... Rest>
void push_back (const Operation &operation, Rest... args)
 Add subdocument operations to list of specs.
 
auto specs () const -> const std::vector< core::impl::subdoc::command > &
 Returns internal representation of the specs.
 

Static Public Member Functions

static auto get (std::string path) -> subdoc::get
 Fetches the content from a field (if present) at the given path.
 
static auto get (subdoc::lookup_in_macro macro) -> subdoc::get
 Fetches the content from a field represented by given virtual attribute (macro).
 
static auto exists (std::string path) -> subdoc::exists
 Checks if a value at the given path exists in the document.
 
static auto count (std::string path) -> subdoc::count
 Counts the number of values at a given path in the document.
 

Constructor & Destructor Documentation

◆ lookup_in_specs() [1/2]

lookup_in_specs ( )
default

◆ lookup_in_specs() [2/2]

template<typename... Operation>
lookup_in_specs ( Operation... args)
inlineexplicit

Member Function Documentation

◆ count()

static auto count ( std::string path) -> subdoc::count
inlinestatic

Counts the number of values at a given path in the document.

Parameters
paththe path identifying where to count the values.
Returns
the created spec
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ exists()

static auto exists ( std::string path) -> subdoc::exists
inlinestatic

Checks if a value at the given path exists in the document.

Parameters
paththe path to check if the field exists.
Returns
the created spec
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ get() [1/2]

static auto get ( std::string path) -> subdoc::get
inlinestatic

Fetches the content from a field (if present) at the given path.

Parameters
paththe path identifying where to get the value.
Returns
the created spec
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ get() [2/2]

static auto get ( subdoc::lookup_in_macro macro) -> subdoc::get
inlinestatic

Fetches the content from a field represented by given virtual attribute (macro).

Parameters
macrothe path identifying where to get the value.
Returns
the created spec
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ push_back() [1/2]

template<typename Operation >
void push_back ( const Operation & operation)
inline

Add subdocument operation to list of specs.

Template Parameters
Operationtype of the subdocument operation
Parameters
operationoperation to execute
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ push_back() [2/2]

template<typename Operation , typename... Rest>
void push_back ( const Operation & operation,
Rest... args )
inline

Add subdocument operations to list of specs.

Template Parameters
Operationtype of the subdocument operation
Resttypes of the rest of the operations
Parameters
operationoperation to execute
argsthe rest of the arguments
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ specs()

auto specs ( ) const -> const std::vector< core::impl::subdoc::command > &
nodiscard

Returns internal representation of the specs.

Returns
specs
Since
1.0.0
Internal
Internal interface

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