Loading...
Searching...
No Matches
mongocxx::v1::insert_many_options Class Reference

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

## Description

Options for an "insertMany" operation.

Supported fields include:

- bypass_document_validation ("bypassDocumentValidation")
- comment
- ordered
- read_concern ("readConcern")
- write_concern ("writeConcern")

See also
  - Insert Methods (MongoDB Manual)

## Public Member Functions

| insert_many_options ()
| Default initialization.
| insert_many_options (insert_many_options &&other) noexcept
| Move constructor.
| insert_many_options (insert_many_options const &other)
| Copy construction.
| ~insert_many_options ()
| Destroy this object.
bsoncxx::v1::stdx::optional< bool > | bypass_document_validation () const
| Return the current "bypassDocumentValidation" field.
insert_many_options & | bypass_document_validation (bool v)
| Set the "bypassDocumentValidation" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > | comment () const
| Return the current "comment" field.
insert_many_options & | comment (bsoncxx::v1::types::value v)
| Set the "comment" field.
insert_many_options & | operator= (insert_many_options &&other) noexcept
| Move assignment.
insert_many_options & | operator= (insert_many_options const &other)
| Copy assignment.
bsoncxx::v1::stdx::optional< bool > | ordered () const
| Return the current "ordered" field.
insert_many_options & | ordered (bool v)
| Set the "ordered" field.
bsoncxx::v1::stdx::optional< v1::read_concern > | read_concern () const
| Return the current "readConcern" field.
insert_many_options & | read_concern (v1::read_concern v)
| Set the "readConcern" field.
bsoncxx::v1::stdx::optional< v1::write_concern > | write_concern () const
| Return the current "writeConcern" field.
insert_many_options & | write_concern (v1::write_concern v)
| Set the "writeConcern" field.

## Constructor & Destructor Documentation

## ~insert_many_options()

mongocxx::v1::insert_many_options::~insert_many_options | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## insert_many_options() [1/3]

mongocxx::v1::insert_many_options::insert_many_options | ( | insert_many_options && | other | ) |

noexcept

Move constructor.

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

## insert_many_options() [2/3]

mongocxx::v1::insert_many_options::insert_many_options | ( | insert_many_options const & | other | ) |

Copy construction.

## insert_many_options() [3/3]

mongocxx::v1::insert_many_options::insert_many_options | ( |  | ) |

Default initialization.

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

## Member Function Documentation

## bypass_document_validation() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::insert_many_options::bypass_document_validation | ( |  | ) | const

Return the current "bypassDocumentValidation" field.

## bypass_document_validation() [2/2]

insert_many_options & mongocxx::v1::insert_many_options::bypass_document_validation | ( | bool | v | ) |

Set the "bypassDocumentValidation" field.

## comment() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > mongocxx::v1::insert_many_options::comment | ( |  | ) | const

Return the current "comment" field.

## comment() [2/2]

insert_many_options & mongocxx::v1::insert_many_options::comment | ( | bsoncxx::v1::types::value | v | ) |

Set the "comment" field.

## operator=() [1/2]

insert_many_options & mongocxx::v1::insert_many_options::operator= | ( | insert_many_options && | other | ) |

noexcept

Move assignment.

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

## operator=() [2/2]

insert_many_options & mongocxx::v1::insert_many_options::operator= | ( | insert_many_options const & | other | ) |

Copy assignment.

## ordered() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::insert_many_options::ordered | ( |  | ) | const

Return the current "ordered" field.

## ordered() [2/2]

insert_many_options & mongocxx::v1::insert_many_options::ordered | ( | bool | v | ) |

Set the "ordered" field.

## read_concern() [1/2]

bsoncxx::v1::stdx::optional< v1::read_concern > mongocxx::v1::insert_many_options::read_concern | ( |  | ) | const

Return the current "readConcern" field.

## read_concern() [2/2]

insert_many_options & mongocxx::v1::insert_many_options::read_concern | ( | v1::read_concern | v | ) |

Set the "readConcern" field.

## write_concern() [1/2]

bsoncxx::v1::stdx::optional< v1::write_concern > mongocxx::v1::insert_many_options::write_concern | ( |  | ) | const

Return the current "writeConcern" field.

## write_concern() [2/2]

insert_many_options & mongocxx::v1::insert_many_options::write_concern | ( | v1::write_concern | v | ) |

Set the "writeConcern" field.

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

- mongocxx/v1/insert_many_options.hpp