MongoDB C++ Driver  mongocxx-3.7.0
Public Member Functions | List of all members
mongocxx::model::write Class Reference

Models a single write operation within a mongocxx::bulk_write. More...

#include <write.hpp>

Public Member Functions

 write (insert_one value)
 Constructs a write from a model::insert_one.
 
 write (update_one value)
 Constructs a write from a model::update_one.
 
 write (update_many value)
 Constructs a write from a model::update_many.
 
 write (delete_one value)
 Constructs a write from a model::delete_one.
 
 write (delete_many value)
 Constructs a write from a model::delete_many.
 
 write (replace_one value)
 Constructs a write from a model::replace_one.
 
 write (write &&rhs) noexcept
 Move constructs a write.
 
writeoperator= (write &&rhs) noexcept
 Move assigns a write.
 
 ~write ()
 Destroys a write.
 
write_type type () const
 Returns the current type of this write. More...
 
const insert_oneget_insert_one () const
 Accesses the write as a model::insert_one. More...
 
const update_oneget_update_one () const
 Accesses the write as an model::update_one. More...
 
const update_manyget_update_many () const
 Accesses the write as an model::update_many. More...
 
const delete_oneget_delete_one () const
 Accesses the write as a model::delete_one. More...
 
const delete_manyget_delete_many () const
 Accesses the write as a model::delete_many. More...
 
const replace_oneget_replace_one () const
 Accesses the write as a model::replace_one. More...
 

Detailed Description

Models a single write operation within a mongocxx::bulk_write.

Member Function Documentation

◆ get_delete_many()

const delete_many& mongocxx::model::write::get_delete_many ( ) const

Accesses the write as a model::delete_many.

It is illegal to call this method if the return of type() does not indicate that this object currently contains the applicable type.

◆ get_delete_one()

const delete_one& mongocxx::model::write::get_delete_one ( ) const

Accesses the write as a model::delete_one.

It is illegal to call this method if the return of type() does not indicate that this object currently contains the applicable type.

◆ get_insert_one()

const insert_one& mongocxx::model::write::get_insert_one ( ) const

Accesses the write as a model::insert_one.

It is illegal to call this method if the return of type() does not indicate that this object currently contains the applicable type.

◆ get_replace_one()

const replace_one& mongocxx::model::write::get_replace_one ( ) const

Accesses the write as a model::replace_one.

It is illegal to call this method if the return of type() does not indicate that this object currently contains the applicable type.

◆ get_update_many()

const update_many& mongocxx::model::write::get_update_many ( ) const

Accesses the write as an model::update_many.

It is illegal to call this method if the return of type() does not indicate that this object currently contains the applicable type.

◆ get_update_one()

const update_one& mongocxx::model::write::get_update_one ( ) const

Accesses the write as an model::update_one.

It is illegal to call this method if the return of type() does not indicate that this object currently contains the applicable type.

◆ type()

write_type mongocxx::model::write::type ( ) const

Returns the current type of this write.

You must call this method before calling any of the get methods below.


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