Loading...
Searching...
No Matches
mongocxx::v1::client_bulk_write::update_one_options Class Reference

`#include <mongocxx/v1/client_bulk_write.hpp>`

## Description

Options for an "Update One" operation in a client bulk write.

Supported fields include:

- array_filters ("arrayFilters")
- collation
- hint
- sort
- upsert

## Public Member Functions

| update_one_options ()
| Default initialization.
| update_one_options (update_one_options &&other) noexcept
| Move constructor.
| update_one_options (update_one_options const &other)
| Copy construction.
| ~update_one_options ()
| Destroy this object.
bsoncxx::v1::stdx::optional< bsoncxx::v1::array::view > | array_filters () const
| Return the current "arrayFilters" field.
update_one_options & | array_filters (bsoncxx::v1::array::value v)
| Set the "arrayFilters" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > | collation () const
| Return the current "collation" field.
update_one_options & | collation (bsoncxx::v1::document::value v)
| Set the "collation" field.
bsoncxx::v1::stdx::optional< v1::hint > | hint () const
| Return the current "hint" field.
update_one_options & | hint (v1::hint v)
| Set the "hint" field.
update_one_options & | operator= (update_one_options &&other) noexcept
| Move assignment.
update_one_options & | operator= (update_one_options const &other)
| Copy assignment.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > | sort () const
| Return the current "sort" field.
update_one_options & | sort (bsoncxx::v1::document::value v)
| Set the "sort" field.
bsoncxx::v1::stdx::optional< bool > | upsert () const
| Return the current "upsert" field.
update_one_options & | upsert (bool v)
| Set the "upsert" field.

## Constructor & Destructor Documentation

## ~update_one_options()

mongocxx::v1::client_bulk_write::update_one_options::~update_one_options | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## update_one_options() [1/3]

mongocxx::v1::client_bulk_write::update_one_options::update_one_options | ( | update_one_options && | other | ) |

noexcept

Move constructor.

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

## update_one_options() [2/3]

mongocxx::v1::client_bulk_write::update_one_options::update_one_options | ( | update_one_options const & | other | ) |

Copy construction.

## update_one_options() [3/3]

mongocxx::v1::client_bulk_write::update_one_options::update_one_options | ( |  | ) |

Default initialization.

## Member Function Documentation

## array_filters() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::array::view > mongocxx::v1::client_bulk_write::update_one_options::array_filters | ( |  | ) | const

Return the current "arrayFilters" field.

## array_filters() [2/2]

update_one_options & mongocxx::v1::client_bulk_write::update_one_options::array_filters | ( | bsoncxx::v1::array::value | v | ) |

Set the "arrayFilters" field.

## collation() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::client_bulk_write::update_one_options::collation | ( |  | ) | const

Return the current "collation" field.

## collation() [2/2]

update_one_options & mongocxx::v1::client_bulk_write::update_one_options::collation | ( | bsoncxx::v1::document::value | v | ) |

Set the "collation" field.

## hint() [1/2]

bsoncxx::v1::stdx::optional< v1::hint > mongocxx::v1::client_bulk_write::update_one_options::hint | ( |  | ) | const

Return the current "hint" field.

## hint() [2/2]

update_one_options & mongocxx::v1::client_bulk_write::update_one_options::hint | ( | v1::hint | v | ) |

Set the "hint" field.

## operator=() [1/2]

update_one_options & mongocxx::v1::client_bulk_write::update_one_options::operator= | ( | update_one_options && | other | ) |

noexcept

Move assignment.

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

## operator=() [2/2]

update_one_options & mongocxx::v1::client_bulk_write::update_one_options::operator= | ( | update_one_options const & | other | ) |

Copy assignment.

## sort() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::client_bulk_write::update_one_options::sort | ( |  | ) | const

Return the current "sort" field.

## sort() [2/2]

update_one_options & mongocxx::v1::client_bulk_write::update_one_options::sort | ( | bsoncxx::v1::document::value | v | ) |

Set the "sort" field.

## upsert() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::client_bulk_write::update_one_options::upsert | ( |  | ) | const

Return the current "upsert" field.

## upsert() [2/2]

update_one_options & mongocxx::v1::client_bulk_write::update_one_options::upsert | ( | bool | v | ) |

Set the "upsert" field.

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

- mongocxx/v1/client_bulk_write.hpp