Loading...
Searching...
No Matches
mongocxx::options::find_one_and_delete Class Reference

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

## Description

Used by mongocxx::v_noabi::collection.

## Public Member Functions

| find_one_and_delete ()=default
| Default initialization.
| find_one_and_delete (v1::find_one_and_delete_options opts)
| Construct with the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & | collation () const
| Retrieves the current collation for this operation.
find_one_and_delete & | collation (bsoncxx::v_noabi::document::view_or_value collation)
| Sets the collation 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.
find_one_and_delete & | comment (bsoncxx::v_noabi::types::bson_value::view_or_value comment)
| Set the value of the comment option.
bsoncxx::v_noabi::stdx::optional< v_noabi::hint > const & | hint () const
| Gets the current hint.
find_one_and_delete & | hint (v_noabi::hint index_hint)
| Sets the index to use for this operation.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const | let () const
| Gets the current value of the let option.
find_one_and_delete & | let (bsoncxx::v_noabi::document::view_or_value let)
| Set the value of the let option.
bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > const & | max_time () const
| The current max_time setting.
find_one_and_delete & | max_time (std::chrono::milliseconds max_time)
| Sets the maximum amount of time for this operation to run (server-side) in milliseconds.
| operator v1::find_one_and_delete_options () const
| Convert to the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & | projection () const
| Gets the current projection set on this operation.
find_one_and_delete & | projection (bsoncxx::v_noabi::document::view_or_value projection)
| Sets a projection that limits the fields to return.
bsoncxx::v_noabi::stdx::optional< v_noabi::read_concern > const & | read_concern () const
| Gets the current read concern.
find_one_and_delete & | read_concern (v_noabi::read_concern read_concern)
| Sets the read concern for this operation.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & | sort () const
| Gets the current sort ordering.
find_one_and_delete & | sort (bsoncxx::v_noabi::document::view_or_value ordering)
| Sets the order to search for a matching document.
bsoncxx::v_noabi::stdx::optional< v_noabi::write_concern > const & | write_concern () const
| Gets the current write concern.
find_one_and_delete & | write_concern (v_noabi::write_concern write_concern)
| Sets the write concern for this operation.

## Constructor & Destructor Documentation

## find_one_and_delete() [1/2]

mongocxx::v_noabi::options::find_one_and_delete::find_one_and_delete | ( |  | ) |

default

Default initialization.

## find_one_and_delete() [2/2]

mongocxx::v_noabi::options::find_one_and_delete::find_one_and_delete | ( | v1::find_one_and_delete_options | opts | ) |

Construct with the mongocxx::v1 equivalent.

## Member Function Documentation

## collation() [1/2]

bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & mongocxx::v_noabi::options::find_one_and_delete::collation | ( |  | ) | const

inline

Retrieves the current collation for this operation.

Returns
  The current collation.

See also
  - https://www.mongodb.com/docs/manual/reference/command/findAndModify/

## collation() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::collation | ( | bsoncxx::v_noabi::document::view_or_value | collation | ) |

inline

Sets the collation for this operation.

Parameters

  collation | The new collation.

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/command/findAndModify/

## comment() [1/2]

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

inline

Gets the current value of the comment option.

Returns
  The current comment option.

## comment() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::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.

## hint() [1/2]

bsoncxx::v_noabi::stdx::optional< v_noabi::hint > const & mongocxx::v_noabi::options::find_one_and_delete::hint | ( |  | ) | const

inline

Gets the current hint.

Returns
  The current hint, if one is set.

## hint() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::hint | ( | v_noabi::hint | index_hint | ) |

inline

Sets the index to use for this operation.

Note
  if the server already has a cached shape for this query, it may ignore a hint.

Parameters

  index_hint | Object representing the index to use.

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::find_one_and_delete::let | ( |  | ) | const

inline

Gets the current value of the let option.

Returns
  The current let option.

## let() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::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.

## max_time() [1/2]

bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > const & mongocxx::v_noabi::options::find_one_and_delete::max_time | ( |  | ) | const

inline

The current max_time setting.

Returns
  the current max time (in milliseconds).

See also
  - https://www.mongodb.com/docs/manual/reference/command/findAndModify/

## max_time() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::max_time | ( | std::chrono::milliseconds | max_time | ) |

inline

Sets the maximum amount of time for this operation to run (server-side) in milliseconds.

Parameters

  max_time | The max amount of running time (in milliseconds).

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/command/findAndModify/

## operator v1::find_one_and_delete_options()

mongocxx::v_noabi::options::find_one_and_delete::operator v1::find_one_and_delete_options | ( |  | ) | const

inline explicit

Convert to the mongocxx::v1 equivalent.

## projection() [1/2]

bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & mongocxx::v_noabi::options::find_one_and_delete::projection | ( |  | ) | const

inline

Gets the current projection set on this operation.

Returns
  The current projection.

See also
  - https://www.mongodb.com/docs/manual/reference/command/findAndModify/

## projection() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::projection | ( | bsoncxx::v_noabi::document::view_or_value | projection | ) |

inline

Sets a projection that limits the fields to return.

Parameters

  projection | The projection document.

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/command/findAndModify/

## read_concern() [1/2]

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

inline

Gets the current read concern.

Returns
  The current read concern.

See also
  - https://www.mongodb.com/docs/manual/reference/command/findAndModify/

## read_concern() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::read_concern | ( | v_noabi::read_concern | read_concern | ) |

inline

Sets the read concern for this operation.

Parameters

  read_concern | Object representing the 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/command/findAndModify/

## sort() [1/2]

bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & mongocxx::v_noabi::options::find_one_and_delete::sort | ( |  | ) | const

inline

Gets the current sort ordering.

Returns
  The current sort ordering.

See also
  - https://www.mongodb.com/docs/manual/reference/command/findAndModify/

## sort() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::sort | ( | bsoncxx::v_noabi::document::view_or_value | ordering | ) |

inline

Sets the order to search for a matching document.

Warning
  This can influence which document the operation modifies if the provided filter selects multiple documents.

Parameters

  ordering | Document describing the order of the documents to be returned.

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/command/findAndModify/

## write_concern() [1/2]

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

inline

Gets the current write concern.

Returns
  The current write concern.

See also
  - https://www.mongodb.com/docs/manual/reference/command/findAndModify/

## write_concern() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::write_concern | ( | v_noabi::write_concern | write_concern | ) |

inline

Sets the write concern for this operation.

Parameters

  write_concern | Object representing the 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/reference/command/findAndModify/

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

- mongocxx/v_noabi/mongocxx/options/find_one_and_delete.hpp