Couchbase Transactions C++ Client  1.0.0
Transactions client for couchbase
Public Member Functions | List of all members
couchbase::mutate_in_options Class Reference

Options for collection::mutate_in() More...

#include <options.hxx>

Inheritance diagram for couchbase::mutate_in_options:
couchbase::common_mutate_options< mutate_in_options > couchbase::common_options< mutate_in_options >

Public Member Functions

CB_NODISCARD boost::tribool create_as_deleted () const
 Get create_as_deleted flag. More...
 
mutate_in_optionscreate_as_deleted (boost::tribool create_as_deleted)
 Set create_as_deleted. More...
 
CB_NODISCARD boost::tribool access_deleted () const
 Get access deleted flag. More...
 
mutate_in_optionsaccess_deleted (boost::tribool access_deleted)
 Set access_deleted flag. More...
 
CB_NODISCARD boost::optional< subdoc_store_semanticsstore_semantics () const
 Get store semantics. More...
 
mutate_in_optionsstore_semantics (subdoc_store_semantics semantics)
 Set the store semantics. More...
 
- Public Member Functions inherited from couchbase::common_mutate_options< mutate_in_options >
CB_NODISCARD boost::optional< uint64_t > cas () const
 Get cas. More...
 
mutate_in_optionscas (uint64_t cas)
 Set current CAS. More...
 
CB_NODISCARD boost::optional< durability_leveldurability () const
 Get Durability. More...
 
mutate_in_optionsdurability (durability_level level)
 Set durability. More...
 
- Public Member Functions inherited from couchbase::common_options< mutate_in_options >
CB_NODISCARD boost::optional< std::chrono::microseconds > timeout () const
 get timeout More...
 
mutate_in_optionstimeout (R timeout)
 Set timeout. More...
 

Detailed Description

Options for collection::mutate_in()

`

Member Function Documentation

◆ access_deleted() [1/2]

CB_NODISCARD boost::tribool couchbase::mutate_in_options::access_deleted ( ) const
inline

Get access deleted flag.

When true, deleted documents can be read. Used internally in conjunction with lookup_in_options.create_deleted().

Returns
The access_deleted flag.

◆ access_deleted() [2/2]

mutate_in_options& couchbase::mutate_in_options::access_deleted ( boost::tribool  access_deleted)
inline

Set access_deleted flag.

All operations ignore deleted documents, unless this is set to true.

Parameters
access_deletedDesired state for access_deleted. *
Returns
Reference to this object, so calls can be chained.

◆ create_as_deleted() [1/2]

CB_NODISCARD boost::tribool couchbase::mutate_in_options::create_as_deleted ( ) const
inline

Get create_as_deleted flag.

Returns
The state of the create_as_deleted flag.

◆ create_as_deleted() [2/2]

mutate_in_options& couchbase::mutate_in_options::create_as_deleted ( boost::tribool  create_as_deleted)
inline

Set create_as_deleted.

When you specify create_as_deleted, the document will be created as if it was already deleted. Used in conjunction with the access_deleted flag internally.

Parameters
create_as_deletedDesired state of create_as_deleted flag.
Returns
Reference to this object, so calls can be chained.

◆ store_semantics() [1/2]

CB_NODISCARD boost::optional<subdoc_store_semantics> couchbase::mutate_in_options::store_semantics ( ) const
inline

Get store semantics.

When upsert, the mutation should create a new doc if one doesn't exist, otherwise just mutates existing doc. When insert, the mutation should create a new doc only if it doesn't exist, otherwise returns LCB_ERR_DOCUMENT_EXISTS. When replace, the mutation should mutate an existing doc, if the document doesn't exist, the operation will return LCB_ERR_DOCUMENT_NOT_FOUND.

Returns
The store semantics, if set.

◆ store_semantics() [2/2]

mutate_in_options& couchbase::mutate_in_options::store_semantics ( subdoc_store_semantics  semantics)
inline

Set the store semantics.

When upsert, the mutation should create a new doc if one doesn't exist, otherwise just mutates existing doc. When insert, the mutation should create a new doc only if it doesn't exist, otherwise returns LCB_ERR_DOCUMENT_EXISTS. When replace, the mutation should mutate an existing doc, if the document doesn't exist, the operation will return LCB_ERR_DOCUMENT_NOT_FOUND.

Parameters
_semanticsDesired state for the semantics. Note this overrides any implied semantics that may be inferred by the specs (mutate_in_spec::fulldoc_insert, mutate_in_spec::fulldoc_upsert for instance).
Returns
Reference to this object, so calls can be chained.

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