Loading...
Searching...
No Matches
mongocxx::v_noabi::options::bulk_write Class Reference

`#include <mongocxx/v_noabi/mongocxx/options/bulk_write.hpp>`

## Description

Used by mongocxx::v_noabi::collection.

## Public Member Functions

| bulk_write ()=default
| Constructs a new bulk_write object. By default, bulk writes are considered ordered as this is the only safe choice. If you want an unordered update, you must call ordered(false) to switch to unordered mode.
| bulk_write (v1::bulk_write::options opts)
| Construct with the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< bool > const | bypass_document_validation () const
| The current setting for bypassing document validation for this operation.
bulk_write & | bypass_document_validation (bool bypass_document_validation)
| Set whether or not to bypass document validation for this operation.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const | comment () const
| Gets the current value of the comment option.
bulk_write & | comment (bsoncxx::v_noabi::types::bson_value::view_or_value comment)
| Set the value of the comment option.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const | let () const
| Gets the current value of the let option.
bulk_write & | let (bsoncxx::v_noabi::document::view_or_value let)
| Set the value of the let option.
| operator v1::bulk_write::options () const
| Convert to the mongocxx::v1 equivalent.
bool | ordered () const
| Gets the current value of the ordered option.
bulk_write & | ordered (bool ordered)
| Sets whether the writes must be executed in order by the server.
bsoncxx::v_noabi::stdx::optional< v_noabi::read_concern > const & | read_concern () const
| The current read_concern for this operation.
bulk_write & | read_concern (v_noabi::read_concern rc)
| Sets the read_concern for this operation.
bsoncxx::v_noabi::stdx::optional< v_noabi::write_concern > const & | write_concern () const
| The current write_concern for this operation.
bulk_write & | write_concern (v_noabi::write_concern wc)
| Sets the write_concern for this operation.

## Constructor & Destructor Documentation

## bulk_write() [1/2]

mongocxx::v_noabi::options::bulk_write::bulk_write | ( |  | ) |

default

Constructs a new bulk_write object. By default, bulk writes are considered ordered as this is the only safe choice. If you want an unordered update, you must call ordered(false) to switch to unordered mode.

## bulk_write() [2/2]

mongocxx::v_noabi::options::bulk_write::bulk_write | ( | v1::bulk_write::options | opts | ) |

Construct with the mongocxx::v1 equivalent.

## Member Function Documentation

## bypass_document_validation() [1/2]

bsoncxx::v_noabi::stdx::optional< bool > const mongocxx::v_noabi::options::bulk_write::bypass_document_validation | ( |  | ) | const

inline

The current setting for bypassing document validation for this operation.

Returns
  The current document validation bypass setting.

## bypass_document_validation() [2/2]

bulk_write & mongocxx::v_noabi::options::bulk_write::bypass_document_validation | ( | bool | bypass_document_validation | ) |

inline

Set whether or not to bypass document validation for this operation.

Parameters

  bypass_document_validation | Whether or not to bypass document validation.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## comment() [1/2]

bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const mongocxx::v_noabi::options::bulk_write::comment | ( |  | ) | const

inline

Gets the current value of the comment option.

Returns
  The current comment option.

## comment() [2/2]

bulk_write & mongocxx::v_noabi::options::bulk_write::comment | ( | bsoncxx::v_noabi::types::bson_value::view_or_value | comment | ) |

inline

Set the value of the comment option.

Parameters

  comment | The new comment option.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## let() [1/2]

bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const mongocxx::v_noabi::options::bulk_write::let | ( |  | ) | const

inline

Gets the current value of the let option.

Returns
  The current let option.

## let() [2/2]

bulk_write & mongocxx::v_noabi::options::bulk_write::let | ( | bsoncxx::v_noabi::document::view_or_value | let | ) |

inline

Set the value of the let option.

Parameters

  let | The new let option.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## operator v1::bulk_write::options()

mongocxx::v_noabi::options::bulk_write::operator v1::bulk_write::options | ( |  | ) | const

inline explicit

Convert to the mongocxx::v1 equivalent.

## ordered() [1/2]

bool mongocxx::v_noabi::options::bulk_write::ordered | ( |  | ) | const

inline

Gets the current value of the ordered option.

Returns
  The value of the ordered option.

## ordered() [2/2]

bulk_write & mongocxx::v_noabi::options::bulk_write::ordered | ( | bool | ordered | ) |

inline

Sets whether the writes must be executed in order by the server.

The server-side default is `true`.

Parameters

  ordered | If `true` all write operations will be executed serially in the order they were appended, and the entire bulk operation will abort on the first error. If `false` operations will be executed in arbitrary order (possibly in parallel on the server) and any errors will be reported after attempting all operations.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## read_concern() [1/2]

bsoncxx::v_noabi::stdx::optional< v_noabi::read_concern > const & mongocxx::v_noabi::options::bulk_write::read_concern | ( |  | ) | const

inline

The current read_concern for this operation.

Returns
  The current read_concern.

See also
  - https://www.mongodb.com/docs/manual/reference/read-concern/

## read_concern() [2/2]

bulk_write & mongocxx::v_noabi::options::bulk_write::read_concern | ( | v_noabi::read_concern | rc | ) |

inline

Sets the read_concern for this operation.

Parameters

  rc | The new read_concern.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

See also
  - https://www.mongodb.com/docs/manual/reference/read-concern/

## write_concern() [1/2]

bsoncxx::v_noabi::stdx::optional< v_noabi::write_concern > const & mongocxx::v_noabi::options::bulk_write::write_concern | ( |  | ) | const

inline

The current write_concern for this operation.

Returns
  The current write_concern.

See also
  - https://www.mongodb.com/docs/manual/core/write-concern/

## write_concern() [2/2]

bulk_write & mongocxx::v_noabi::options::bulk_write::write_concern | ( | v_noabi::write_concern | wc | ) |

inline

Sets the write_concern for this operation.

Parameters

  wc | The new write_concern.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

See also
  - https://www.mongodb.com/docs/manual/core/write-concern/

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

- mongocxx/v_noabi/mongocxx/options/bulk_write.hpp