#include <userver/storages/mongo/bulk.hpp>
Efficiently executes a number of operations over a single collection.
Public Types | |
enum class | Mode { kOrdered , kUnordered } |
Public Member Functions | |
Bulk (Mode) | |
Bulk (const Bulk &)=delete | |
Bulk (Bulk &&) noexcept | |
Bulk & | operator= (const Bulk &)=delete |
Bulk & | operator= (Bulk &&) noexcept |
bool | IsEmpty () const |
void | SetOption (options::WriteConcern::Level) |
void | SetOption (const options::WriteConcern &) |
void | SetOption (options::SuppressServerExceptions) |
template<typename... Options> | |
void | InsertOne (formats::bson::Document document, Options &&... options) |
Inserts a single document. | |
template<typename... Options> | |
void | ReplaceOne (formats::bson::Document selector, formats::bson::Document replacement, Options &&... options) |
Replaces a single matching document. | |
template<typename... Options> | |
void | UpdateOne (formats::bson::Document selector, formats::bson::Document update, Options &&... options) |
Updates a single matching document. | |
template<typename... Options> | |
void | UpdateMany (formats::bson::Document selector, formats::bson::Document update, Options &&... options) |
Updates all matching documents. | |
template<typename... Options> | |
void | DeleteOne (formats::bson::Document selector, Options &&... options) |
Deletes a single matching document. | |
template<typename... Options> | |
void | DeleteMany (formats::bson::Document selector, Options &&... options) |
Deletes all matching documents. | |
Prepared sub-operation inserters | |
void | Append (const bulk_ops::InsertOne &) |
void | Append (const bulk_ops::ReplaceOne &) |
void | Append (const bulk_ops::Update &) |
void | Append (const bulk_ops::Delete &) |
void storages::mongo::operations::Bulk::DeleteMany | ( | formats::bson::Document | selector, |
Options &&... | options ) |
void storages::mongo::operations::Bulk::DeleteOne | ( | formats::bson::Document | selector, |
Options &&... | options ) |
void storages::mongo::operations::Bulk::InsertOne | ( | formats::bson::Document | document, |
Options &&... | options ) |
void storages::mongo::operations::Bulk::ReplaceOne | ( | formats::bson::Document | selector, |
formats::bson::Document | replacement, | ||
Options &&... | options ) |
Replaces a single matching document.
void storages::mongo::operations::Bulk::UpdateMany | ( | formats::bson::Document | selector, |
formats::bson::Document | update, | ||
Options &&... | options ) |
void storages::mongo::operations::Bulk::UpdateOne | ( | formats::bson::Document | selector, |
formats::bson::Document | update, | ||
Options &&... | options ) |