Loading...
Searching...
No Matches
mongocxx::v1::bulk_write::update_many Class Reference

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

## Description

A single "Update Many" write operation.

Supported fields include:

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

See also
  - Bulk Write Operations (MongoDB Manual)

## Public Member Functions

| update_many (bsoncxx::v1::document::value filter, bsoncxx::v1::document::value update)
| Initialize with the given "filter" and "update" documents.
| update_many (bsoncxx::v1::document::value filter, v1::pipeline const &update)
| Initialize with the given "filter" document and "update" aggregation pipeline.
| update_many (update_many &&other) noexcept
| Move constructor.
| update_many (update_many const &other)
| Copy construction.
| ~update_many ()
| Destroy this object.
bsoncxx::v1::stdx::optional< bsoncxx::v1::array::view > | array_filters () const
| Return the current "arrayFilters" field.
update_many & | 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_many & | collation (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::hint > | hint () const
| Return the current "hint" field.
update_many & | hint (v1::hint v)
| Set the "hint" field.
update_many & | operator= (update_many &&other) noexcept
| Move assignment.
update_many & | operator= (update_many const &other)
| Copy assignment.
bsoncxx::v1::document::view | update () const
| Return the current "update" field.
bsoncxx::v1::stdx::optional< bool > | upsert () const
| Return the current "upsert" field.
update_many & | upsert (bool v)
| Set the "upsert" field.

## Constructor & Destructor Documentation

## ~update_many()

mongocxx::v1::bulk_write::update_many::~update_many | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## update_many() [1/4]

mongocxx::v1::bulk_write::update_many::update_many | ( | update_many && | other | ) |

noexcept

Move constructor.

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

## update_many() [2/4]

mongocxx::v1::bulk_write::update_many::update_many | ( | update_many const & | other | ) |

Copy construction.

## update_many() [3/4]

mongocxx::v1::bulk_write::update_many::update_many | ( | 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_many() [4/4]

mongocxx::v1::bulk_write::update_many::update_many | ( | bsoncxx::v1::document::value | filter,
|  | v1::pipeline const & | update )

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

## Member Function Documentation

## array_filters() [1/2]

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

Return the current "arrayFilters" field.

## array_filters() [2/2]

update_many & mongocxx::v1::bulk_write::update_many::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_many::collation | ( |  | ) | const

Return the current "collation" field.

## collation() [2/2]

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

Set the "collation" field.

## filter()

bsoncxx::v1::document::view mongocxx::v1::bulk_write::update_many::filter | ( |  | ) | const

Return the current "filter" field.

## hint() [1/2]

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

Return the current "hint" field.

## hint() [2/2]

update_many & mongocxx::v1::bulk_write::update_many::hint | ( | v1::hint | v | ) |

Set the "hint" field.

## operator=() [1/2]

update_many & mongocxx::v1::bulk_write::update_many::operator= | ( | update_many && | other | ) |

noexcept

Move assignment.

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

## operator=() [2/2]

update_many & mongocxx::v1::bulk_write::update_many::operator= | ( | update_many const & | other | ) |

Copy assignment.

## update()

bsoncxx::v1::document::view mongocxx::v1::bulk_write::update_many::update | ( |  | ) | const

Return the current "update" field.

## upsert() [1/2]

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

Return the current "upsert" field.

## upsert() [2/2]

update_many & mongocxx::v1::bulk_write::update_many::upsert | ( | bool | v | ) |

Set the "upsert" field.

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

- mongocxx/v1/bulk_write.hpp