MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::v1::bulk_write::update_one Class Reference

#include <mongocxx/v1/bulk_write.hpp>

Description

A single "Update One" write operation.

Supported fields include:

See also
Attention
This feature is experimental! It is not ready for use!

Public Member Functions

 update_one (bsoncxx::v1::document::value filter, bsoncxx::v1::document::value update)
 Initialize with the given "filter" and "update" documents.
 update_one (bsoncxx::v1::document::value filter, v1::pipeline update)
 Initialize with the given "filter" document and "update" aggregation pipeline.
 update_one (update_one &&other) noexcept
 Move constructor.
 update_one (update_one const &other)
 Copy construction.
 ~update_one ()
 Destroy this object.
bsoncxx::v1::stdx::optional< bsoncxx::v1::array::viewarray_filters () const
 Return the current "arrayFilters" field.
update_onearray_filters (bsoncxx::v1::array::value v)
 Set the "arrayFilters" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewcollation () const
 Return the current "collation" field.
update_onecollation (bsoncxx::v1::document::value v)
 Set the "collation" field.
bsoncxx::v1::document::view filter () const
 Return the current "filter" field.
bsoncxx::v1::stdx::optional< v1::hinthint () const
 Return the current "hint" field.
update_onehint (v1::hint v)
 Set the "hint" field.
update_oneoperator= (update_one &&other) noexcept
 Move assignment.
update_oneoperator= (update_one const &other)
 Copy assignment.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewsort () const
 Return the current "sort" field.
update_onesort (bsoncxx::v1::document::value v)
 Set the "sort" field.
bsoncxx::v1::document::view update () const
 Return the current "update" field.
bsoncxx::v1::stdx::optional< bool > upsert () const
 Return the current "upsert" field.
update_oneupsert (bool v)
 Set the "upsert" field.

Constructor & Destructor Documentation

◆ ~update_one()

mongocxx::v1::bulk_write::update_one::~update_one ( )

Destroy this object.

Warning
Invalidates all associated views.

◆ update_one() [1/4]

mongocxx::v1::bulk_write::update_one::update_one ( update_one && other)
noexcept

Move constructor.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ update_one() [2/4]

mongocxx::v1::bulk_write::update_one::update_one ( update_one const & other)

Copy construction.

◆ update_one() [3/4]

mongocxx::v1::bulk_write::update_one::update_one ( bsoncxx::v1::document::value filter,
bsoncxx::v1::document::value update )

Initialize with the given "filter" and "update" documents.

Postconditions:
  • All other supported fields are "unset" or zero-initialized.

◆ update_one() [4/4]

mongocxx::v1::bulk_write::update_one::update_one ( bsoncxx::v1::document::value filter,
v1::pipeline update )

Initialize with the given "filter" document and "update" aggregation pipeline.

Postconditions:
  • All other supported fields are "unset" or zero-initialized.

Member Function Documentation

◆ array_filters() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::array::view > mongocxx::v1::bulk_write::update_one::array_filters ( ) const

Return the current "arrayFilters" field.

◆ array_filters() [2/2]

update_one & mongocxx::v1::bulk_write::update_one::array_filters ( bsoncxx::v1::array::value v)

Set the "arrayFilters" field.

◆ collation() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::bulk_write::update_one::collation ( ) const

Return the current "collation" field.

◆ collation() [2/2]

update_one & mongocxx::v1::bulk_write::update_one::collation ( bsoncxx::v1::document::value v)

Set the "collation" field.

◆ filter()

bsoncxx::v1::document::view mongocxx::v1::bulk_write::update_one::filter ( ) const

Return the current "filter" field.

◆ hint() [1/2]

bsoncxx::v1::stdx::optional< v1::hint > mongocxx::v1::bulk_write::update_one::hint ( ) const

Return the current "hint" field.

◆ hint() [2/2]

update_one & mongocxx::v1::bulk_write::update_one::hint ( v1::hint v)

Set the "hint" field.

◆ operator=() [1/2]

update_one & mongocxx::v1::bulk_write::update_one::operator= ( update_one && other)
noexcept

Move assignment.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ operator=() [2/2]

update_one & mongocxx::v1::bulk_write::update_one::operator= ( update_one const & other)

Copy assignment.

◆ sort() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::bulk_write::update_one::sort ( ) const

Return the current "sort" field.

◆ sort() [2/2]

update_one & mongocxx::v1::bulk_write::update_one::sort ( bsoncxx::v1::document::value v)

Set the "sort" field.

◆ update()

bsoncxx::v1::document::view mongocxx::v1::bulk_write::update_one::update ( ) const

Return the current "update" field.

◆ upsert() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::bulk_write::update_one::upsert ( ) const

Return the current "upsert" field.

◆ upsert() [2/2]

update_one & mongocxx::v1::bulk_write::update_one::upsert ( bool v)

Set the "upsert" field.


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