Loading...
Searching...
No Matches
bulk_write.hpp
Go to the documentation of this file.
// Copyright 2009-present MongoDB, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <mongocxx/v1/bulk_write-fwd.hpp>
//
#include <mongocxx/v1/detail/prelude.hpp>
#include <bsoncxx/v1/array/view-fwd.hpp>
#include <bsoncxx/v1/document/view-fwd.hpp>
#include <bsoncxx/v1/types/value-fwd.hpp>
#include <mongocxx/v1/hint-fwd.hpp>
#include <mongocxx/v1/pipeline-fwd.hpp>
#include <mongocxx/v1/read_concern-fwd.hpp>
#include <mongocxx/v1/write_concern-fwd.hpp>
#include <bsoncxx/v1/array/value.hpp>
#include <bsoncxx/v1/document/value.hpp>
#include <bsoncxx/v1/stdx/optional.hpp>
#include <bsoncxx/v1/types/view.hpp>
#include <mongocxx/v1/config/export.hpp>
#include <cstdint>
#include <map>
#include <utility>
namespace mongocxx {
namespace v1 {
class bulk_write {
private:
class impl;
void* _impl;
public:
enum class type {
k_insert_one,
k_delete_one,
k_delete_many,
k_update_one,
k_update_many,
k_replace_one,
};
class insert_one;
class update_one;
class update_many;
class replace_one;
class delete_one;
class delete_many;
class single;
class options;
class result;
MONGOCXX_ABI_EXPORT_CDECL() ~bulk_write();
MONGOCXX_ABI_EXPORT_CDECL() bulk_write(bulk_write&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(bulk_write&) operator=(bulk_write&& other) noexcept;
bulk_write(bulk_write const& other) = delete;
bulk_write& operator=(bulk_write const& other) = delete;
MONGOCXX_ABI_EXPORT_CDECL(bool) empty() const;
MONGOCXX_ABI_EXPORT_CDECL(bulk_write&) append(single const& op);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<result>) execute();
class internal;
private:
/* explicit(false) */ bulk_write(void* bulk);
};
class bulk_write::insert_one {
public:
bsoncxx::v1::document::value value;
/* explicit(false) */ insert_one(bsoncxx::v1::document::value doc) : value{std::move(doc)} {}
bsoncxx::v1::document::value const& document() const {
return value;
}
};
class bulk_write::update_one {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~update_one();
MONGOCXX_ABI_EXPORT_CDECL() update_one(update_one&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(update_one&) operator=(update_one&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() update_one(update_one const& other);
MONGOCXX_ABI_EXPORT_CDECL(update_one&) operator=(update_one const& other);
MONGOCXX_ABI_EXPORT_CDECL() update_one(bsoncxx::v1::document::value filter, bsoncxx::v1::document::value update);
MONGOCXX_ABI_EXPORT_CDECL() update_one(bsoncxx::v1::document::value filter, v1::pipeline update);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::document::view) filter() const;
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::document::view) update() const;
MONGOCXX_ABI_EXPORT_CDECL(update_one&) collation(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) collation() const;
MONGOCXX_ABI_EXPORT_CDECL(update_one&) hint(v1::hint v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::hint>) hint() const;
MONGOCXX_ABI_EXPORT_CDECL(update_one&) sort(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) sort() const;
MONGOCXX_ABI_EXPORT_CDECL(update_one&) upsert(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) upsert() const;
MONGOCXX_ABI_EXPORT_CDECL(update_one&) array_filters(bsoncxx::v1::array::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::array::view>) array_filters() const;
class internal;
};
class bulk_write::update_many {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~update_many();
MONGOCXX_ABI_EXPORT_CDECL() update_many(update_many&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(update_many&) operator=(update_many&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() update_many(update_many const& other);
MONGOCXX_ABI_EXPORT_CDECL(update_many&) operator=(update_many const& other);
MONGOCXX_ABI_EXPORT_CDECL() update_many(bsoncxx::v1::document::value filter, bsoncxx::v1::document::value update);
MONGOCXX_ABI_EXPORT_CDECL() update_many(bsoncxx::v1::document::value filter, v1::pipeline const& update);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::document::view) filter() const;
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::document::view) update() const;
MONGOCXX_ABI_EXPORT_CDECL(update_many&) collation(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) collation() const;
MONGOCXX_ABI_EXPORT_CDECL(update_many&) hint(v1::hint v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::hint>) hint() const;
MONGOCXX_ABI_EXPORT_CDECL(update_many&) upsert(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) upsert() const;
MONGOCXX_ABI_EXPORT_CDECL(update_many&) array_filters(bsoncxx::v1::array::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::array::view>) array_filters() const;
class internal;
private:
/* explicit(false) */ update_many(void* impl);
};
class bulk_write::replace_one {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~replace_one();
MONGOCXX_ABI_EXPORT_CDECL() replace_one(replace_one&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(replace_one&) operator=(replace_one&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() replace_one(replace_one const& other);
MONGOCXX_ABI_EXPORT_CDECL(replace_one&) operator=(replace_one const& other);
MONGOCXX_ABI_EXPORT_CDECL() replace_one(
bsoncxx::v1::document::value filter,
bsoncxx::v1::document::value replacement);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::document::view) filter() const;
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::document::view) replacement() const;
MONGOCXX_ABI_EXPORT_CDECL(replace_one&) collation(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) collation() const;
MONGOCXX_ABI_EXPORT_CDECL(replace_one&) hint(v1::hint v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::hint>) hint() const;
MONGOCXX_ABI_EXPORT_CDECL(replace_one&) sort(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) sort() const;
MONGOCXX_ABI_EXPORT_CDECL(replace_one&) upsert(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) upsert() const;
class internal;
private:
/* explicit(false) */ replace_one(void* impl);
};
class bulk_write::delete_one {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~delete_one();
MONGOCXX_ABI_EXPORT_CDECL() delete_one(delete_one&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(delete_one&) operator=(delete_one&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() delete_one(delete_one const& other);
MONGOCXX_ABI_EXPORT_CDECL(delete_one&) operator=(delete_one const& other);
explicit MONGOCXX_ABI_EXPORT_CDECL() delete_one(bsoncxx::v1::document::value filter);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::document::view) filter() const;
MONGOCXX_ABI_EXPORT_CDECL(delete_one&) collation(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) collation() const;
MONGOCXX_ABI_EXPORT_CDECL(delete_one&) hint(v1::hint v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::hint>) hint() const;
class internal;
private:
/* explicit(false) */ delete_one(void* impl);
};
class bulk_write::delete_many {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~delete_many();
MONGOCXX_ABI_EXPORT_CDECL() delete_many(delete_many&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(delete_many&) operator=(delete_many&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() delete_many(delete_many const& other);
MONGOCXX_ABI_EXPORT_CDECL(delete_many&) operator=(delete_many const& other);
explicit MONGOCXX_ABI_EXPORT_CDECL() delete_many(bsoncxx::v1::document::value filter);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::document::view) filter() const;
MONGOCXX_ABI_EXPORT_CDECL(delete_many&) collation(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) collation() const;
MONGOCXX_ABI_EXPORT_CDECL(delete_many&) hint(v1::hint v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::hint>) hint() const;
class internal;
private:
/* explicit(false) */ delete_many(void* impl);
};
class bulk_write::single {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~single();
MONGOCXX_ABI_EXPORT_CDECL() single(single&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(single&) operator=(single&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() single(single const& other);
MONGOCXX_ABI_EXPORT_CDECL(single&) operator=(single const& other);
/* explicit(false) */ MONGOCXX_ABI_EXPORT_CDECL() single(insert_one op);
/* explicit(false) */ MONGOCXX_ABI_EXPORT_CDECL() single(update_one op);
/* explicit(false) */ MONGOCXX_ABI_EXPORT_CDECL() single(update_many op);
/* explicit(false) */ MONGOCXX_ABI_EXPORT_CDECL() single(delete_one op);
/* explicit(false) */ MONGOCXX_ABI_EXPORT_CDECL() single(delete_many op);
/* explicit(false) */ MONGOCXX_ABI_EXPORT_CDECL() single(replace_one op);
MONGOCXX_ABI_EXPORT_CDECL(v1::bulk_write::type) type() const;
MONGOCXX_ABI_EXPORT_CDECL(insert_one const&) get_insert_one() const&;
MONGOCXX_ABI_EXPORT_CDECL(insert_one&&) get_insert_one() &&;
MONGOCXX_ABI_EXPORT_CDECL(update_one const&) get_update_one() const&;
MONGOCXX_ABI_EXPORT_CDECL(update_one&&) get_update_one() &&;
MONGOCXX_ABI_EXPORT_CDECL(update_many const&) get_update_many() const&;
MONGOCXX_ABI_EXPORT_CDECL(update_many&&) get_update_many() &&;
MONGOCXX_ABI_EXPORT_CDECL(delete_one const&) get_delete_one() const&;
MONGOCXX_ABI_EXPORT_CDECL(delete_one&&) get_delete_one() &&;
MONGOCXX_ABI_EXPORT_CDECL(delete_many const&) get_delete_many() const&;
MONGOCXX_ABI_EXPORT_CDECL(delete_many&&) get_delete_many() &&;
MONGOCXX_ABI_EXPORT_CDECL(replace_one const&) get_replace_one() const&;
MONGOCXX_ABI_EXPORT_CDECL(replace_one&&) get_replace_one() &&;
class internal;
};
class bulk_write::options {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~options();
MONGOCXX_ABI_EXPORT_CDECL() options(options&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(options&) operator=(options&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() options(options const& other);
MONGOCXX_ABI_EXPORT_CDECL(options&) operator=(options const& other);
MONGOCXX_ABI_EXPORT_CDECL() options();
MONGOCXX_ABI_EXPORT_CDECL(options&) bypass_document_validation(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) bypass_document_validation() const;
MONGOCXX_ABI_EXPORT_CDECL(options&) comment(bsoncxx::v1::types::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::types::view>) comment() const;
MONGOCXX_ABI_EXPORT_CDECL(options&) let(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) let() const;
MONGOCXX_ABI_EXPORT_CDECL(options&) ordered(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bool) ordered() const;
MONGOCXX_ABI_EXPORT_CDECL(options&) read_concern(v1::read_concern v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::read_concern>) read_concern() const;
MONGOCXX_ABI_EXPORT_CDECL(options&) write_concern(v1::write_concern v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::write_concern>) write_concern() const;
class internal;
private:
/* explicit(false) */ options(void* impl);
};
class bulk_write::result {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~result();
MONGOCXX_ABI_EXPORT_CDECL() result(result&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(result&) operator=(result&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() result(result const& other);
MONGOCXX_ABI_EXPORT_CDECL(result&) operator=(result const& other);
MONGOCXX_ABI_EXPORT_CDECL(std::int64_t) inserted_count() const;
MONGOCXX_ABI_EXPORT_CDECL(std::int64_t) matched_count() const;
MONGOCXX_ABI_EXPORT_CDECL(std::int64_t) modified_count() const;
MONGOCXX_ABI_EXPORT_CDECL(std::int64_t) deleted_count() const;
MONGOCXX_ABI_EXPORT_CDECL(std::int64_t) upserted_count() const;
using id_map = std::map<std::int64_t, bsoncxx::v1::types::view>;
MONGOCXX_ABI_EXPORT_CDECL(id_map) upserted_ids() const;
friend MONGOCXX_ABI_EXPORT_CDECL(bool) operator==(result const& lhs, result const& rhs);
friend bool operator!=(result const& lhs, result const& rhs) {
return !(lhs == rhs);
}
class internal;
private:
/* explicit(false) */ result(void* impl);
};
} // namespace v1
} // namespace mongocxx
#include <mongocxx/v1/detail/postlude.hpp>
bsoncxx::v1::document::value
A BSON document.
Definition value.hpp:44
mongocxx::v1::bulk_write::delete_many
A single "Delete Many" write operation.
Definition bulk_write.hpp:661
mongocxx::v1::bulk_write::delete_many::filter
bsoncxx::v1::document::view filter() const
Return the current "filter" field.
mongocxx::v1::bulk_write::delete_many::collation
delete_many & collation(bsoncxx::v1::document::value v)
Set the "collation" field.
mongocxx::v1::bulk_write::delete_many::~delete_many
~delete_many()
Destroy this object.
mongocxx::v1::bulk_write::delete_many::delete_many
delete_many(delete_many &&other) noexcept
Move constructor.
mongocxx::v1::bulk_write::delete_many::hint
delete_many & hint(v1::hint v)
Set the "hint" field.
mongocxx::v1::bulk_write::delete_one
A single "Delete One" write operation.
Definition bulk_write.hpp:572
mongocxx::v1::bulk_write::delete_one::filter
bsoncxx::v1::document::view filter() const
Return the current "filter" field.
mongocxx::v1::bulk_write::delete_one::hint
delete_one & hint(v1::hint v)
Set the "hint" field.
mongocxx::v1::bulk_write::delete_one::~delete_one
~delete_one()
Destroy this object.
mongocxx::v1::bulk_write::delete_one::collation
delete_one & collation(bsoncxx::v1::document::value v)
Set the "collation" field.
mongocxx::v1::bulk_write::delete_one::delete_one
delete_one(delete_one &&other) noexcept
Move constructor.
mongocxx::v1::bulk_write::insert_one
A single "Insert One" write operation.
Definition bulk_write.hpp:169
mongocxx::v1::bulk_write::insert_one::insert_one
insert_one(bsoncxx::v1::document::value doc)
Initialize with doc.
Definition bulk_write.hpp:179
mongocxx::v1::bulk_write::insert_one::document
bsoncxx::v1::document::value const & document() const
Equivalent to this->value.
Definition bulk_write.hpp:184
mongocxx::v1::bulk_write::insert_one::value
bsoncxx::v1::document::value value
The document to be inserted.
Definition bulk_write.hpp:174
mongocxx::v1::bulk_write::options::write_concern
options & write_concern(v1::write_concern v)
Set the "writeConcern" field.
mongocxx::v1::bulk_write::options::bypass_document_validation
options & bypass_document_validation(bool v)
Set the "bypassDocumentValidation" field.
mongocxx::v1::bulk_write::options::comment
options & comment(bsoncxx::v1::types::value v)
Set the "comment" field.
mongocxx::v1::bulk_write::options::options
options(options &&other) noexcept
Move constructor.
mongocxx::v1::bulk_write::options::~options
~options()
Destroy this object.
mongocxx::v1::bulk_write::options::let
options & let(bsoncxx::v1::document::value v)
Set the "let" field.
mongocxx::v1::bulk_write::options::read_concern
options & read_concern(v1::read_concern v)
Set the "readConcern" field.
mongocxx::v1::bulk_write::options::ordered
options & ordered(bool v)
Set the "ordered" field.
mongocxx::v1::bulk_write::replace_one
A single "Replace One" write operation.
Definition bulk_write.hpp:456
mongocxx::v1::bulk_write::replace_one::~replace_one
~replace_one()
Destroy this object.
mongocxx::v1::bulk_write::replace_one::filter
bsoncxx::v1::document::view filter() const
Return the current "filter" field.
mongocxx::v1::bulk_write::replace_one::collation
replace_one & collation(bsoncxx::v1::document::value v)
Set the "collation" field.
mongocxx::v1::bulk_write::replace_one::sort
replace_one & sort(bsoncxx::v1::document::value v)
Set the "sort" field.
mongocxx::v1::bulk_write::replace_one::replace_one
replace_one(replace_one &&other) noexcept
Move constructor.
mongocxx::v1::bulk_write::replace_one::upsert
replace_one & upsert(bool v)
Set the "upsert" field.
mongocxx::v1::bulk_write::replace_one::replacement
bsoncxx::v1::document::view replacement() const
Return the current "replacement" field.
mongocxx::v1::bulk_write::replace_one::hint
replace_one & hint(v1::hint v)
Set the "hint" field.
mongocxx::v1::bulk_write::result
The result of a write operation.
Definition bulk_write.hpp:1023
mongocxx::v1::bulk_write::result::matched_count
std::int64_t matched_count() const
Return the value of the "matchedCount" field.
mongocxx::v1::bulk_write::result::id_map
std::map< std::int64_t, bsoncxx::v1::types::view > id_map
A map from the operation index to the upserted document ID.
Definition bulk_write.hpp:1090
mongocxx::v1::bulk_write::result::upserted_count
std::int64_t upserted_count() const
Return the value of the "upsertedCount" field.
mongocxx::v1::bulk_write::result::result
result(result &&other) noexcept
Move constructor.
mongocxx::v1::bulk_write::result::upserted_ids
id_map upserted_ids() const
Return the "upsertedIds" field as a a map from the operation index to the upserted document ID.
mongocxx::v1::bulk_write::result::modified_count
std::int64_t modified_count() const
Return the value of the "modifiedCount" field.
mongocxx::v1::bulk_write::result::deleted_count
std::int64_t deleted_count() const
Return the value of the "deletedCount" field.
mongocxx::v1::bulk_write::result::inserted_count
std::int64_t inserted_count() const
Return the value of the "insertedCount" field.
mongocxx::v1::bulk_write::result::~result
~result()
Destroy this object.
mongocxx::v1::bulk_write::single
A single write operation.
Definition bulk_write.hpp:746
mongocxx::v1::bulk_write::single::single
single(single &&other) noexcept
Move constructor.
mongocxx::v1::bulk_write::single::get_replace_one
replace_one const & get_replace_one() const &
Return this write operation as an mongocxx::v1::bulk_write::replace_one.
mongocxx::v1::bulk_write::single::get_update_one
update_one const & get_update_one() const &
Return this write operation as an mongocxx::v1::bulk_write::update_one.
mongocxx::v1::bulk_write::single::type
v1::bulk_write::type type() const
Return the type of this write operation.
mongocxx::v1::bulk_write::single::~single
~single()
Destroy this object.
mongocxx::v1::bulk_write::single::get_update_many
update_many const & get_update_many() const &
Return this write operation as an mongocxx::v1::bulk_write::update_many.
mongocxx::v1::bulk_write::single::get_delete_one
delete_one const & get_delete_one() const &
Return this write operation as an mongocxx::v1::bulk_write::delete_one.
mongocxx::v1::bulk_write::single::get_delete_many
delete_many const & get_delete_many() const &
Return this write operation as an mongocxx::v1::bulk_write::delete_many.
mongocxx::v1::bulk_write::single::get_insert_one
insert_one const & get_insert_one() const &
Return this write operation as an mongocxx::v1::bulk_write::insert_one.
mongocxx::v1::bulk_write::update_many
A single "Update Many" write operation.
Definition bulk_write.hpp:334
mongocxx::v1::bulk_write::update_many::update
bsoncxx::v1::document::view update() const
Return the current "update" field.
mongocxx::v1::bulk_write::update_many::filter
bsoncxx::v1::document::view filter() const
Return the current "filter" field.
mongocxx::v1::bulk_write::update_many::upsert
update_many & upsert(bool v)
Set the "upsert" field.
mongocxx::v1::bulk_write::update_many::array_filters
update_many & array_filters(bsoncxx::v1::array::value v)
Set the "arrayFilters" field.
mongocxx::v1::bulk_write::update_many::hint
update_many & hint(v1::hint v)
Set the "hint" field.
mongocxx::v1::bulk_write::update_many::~update_many
~update_many()
Destroy this object.
mongocxx::v1::bulk_write::update_many::update_many
update_many(update_many &&other) noexcept
Move constructor.
mongocxx::v1::bulk_write::update_many::collation
update_many & collation(bsoncxx::v1::document::value v)
Set the "collation" field.
mongocxx::v1::bulk_write::update_one
A single "Update One" write operation.
Definition bulk_write.hpp:204
mongocxx::v1::bulk_write::update_one::update_one
update_one(update_one &&other) noexcept
Move constructor.
mongocxx::v1::bulk_write::update_one::array_filters
update_one & array_filters(bsoncxx::v1::array::value v)
Set the "arrayFilters" field.
mongocxx::v1::bulk_write::update_one::upsert
update_one & upsert(bool v)
Set the "upsert" field.
mongocxx::v1::bulk_write::update_one::sort
update_one & sort(bsoncxx::v1::document::value v)
Set the "sort" field.
mongocxx::v1::bulk_write::update_one::collation
update_one & collation(bsoncxx::v1::document::value v)
Set the "collation" field.
mongocxx::v1::bulk_write::update_one::update
bsoncxx::v1::document::view update() const
Return the current "update" field.
mongocxx::v1::bulk_write::update_one::~update_one
~update_one()
Destroy this object.
mongocxx::v1::bulk_write::update_one::hint
update_one & hint(v1::hint v)
Set the "hint" field.
mongocxx::v1::bulk_write::update_one::filter
bsoncxx::v1::document::view filter() const
Return the current "filter" field.
mongocxx::v1::bulk_write::type
type
Enumeration identifying the type of a write operation.
Definition bulk_write.hpp:62
mongocxx::v1::bulk_write::type::k_delete_one
@ k_delete_one
A "Delete One" operation.
Definition bulk_write.hpp:71
mongocxx::v1::bulk_write::type::k_insert_one
@ k_insert_one
An "Insert One" operation.
Definition bulk_write.hpp:66
mongocxx::v1::bulk_write::type::k_update_many
@ k_update_many
An "Update Many" operation.
Definition bulk_write.hpp:86
mongocxx::v1::bulk_write::type::k_update_one
@ k_update_one
An "Update One" operation.
Definition bulk_write.hpp:81
mongocxx::v1::bulk_write::type::k_delete_many
@ k_delete_many
A "Delete Many" operation.
Definition bulk_write.hpp:76
mongocxx::v1::bulk_write::type::k_replace_one
@ k_replace_one
A "Replace One" operation.
Definition bulk_write.hpp:91
mongocxx::v1::bulk_write::append
bulk_write & append(single const &op)
Append a single write operation.
mongocxx::v1::bulk_write::~bulk_write
~bulk_write()
Destroy this object.
mongocxx::v1::bulk_write::execute
bsoncxx::v1::stdx::optional< result > execute()
Execute the appended operations.
mongocxx::v1::bulk_write::bulk_write
bulk_write(bulk_write &&other) noexcept
Move constructor.
mongocxx::v1::bulk_write::empty
bool empty() const
Return true when there are no appended operations.
mongocxx::v1::pipeline
A MongoDB aggregation pipeline.
Definition pipeline.hpp:41
export.hpp
Provides macros to control the set of symbols exported in the ABI.
MONGOCXX_ABI_EXPORT_CDECL
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
postlude.hpp
The mongocxx v1 macro guard postlude header.
prelude.hpp
The mongocxx v1 macro guard prelude header.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
mongocxx::options
Declares entities representing options to use with various commands.
mongocxx::result
Declares entities representing the result of various commands.
mongocxx::v1
Declares entities whose ABI stability is guaranteed for documented symbols.
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
value.hpp
Provides bsoncxx::v1::array::value.
view-fwd.hpp
Declares bsoncxx::v1::array::view.
bulk_write-fwd.hpp
Declares entities related to bulk write operations.
value.hpp
Provides bsoncxx::v1::document::value.
view-fwd.hpp
Declares bsoncxx::v1::document::view.
hint-fwd.hpp
Declares mongocxx::v1::hint.
pipeline-fwd.hpp
Declares mongocxx::v1::pipeline.
read_concern-fwd.hpp
Declares mongocxx::v1::read_concern.
optional.hpp
Provides std::optional-related polyfills for library API usage.
value-fwd.hpp
Declares bsoncxx::v1::types::value.
view.hpp
Provides non-owning, read-only entities representing a BSON type value.
write_concern-fwd.hpp
Declares mongocxx::v1::write_concern.