MongoDB C++ Driver mongocxx-3.11.0
Loading...
Searching...
No Matches
bulk_write.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <cstdint>
18#include <map>
19#include <vector>
20
22
25#include <bsoncxx/types.hpp>
26
28
29namespace mongocxx {
30namespace v_noabi {
31namespace result {
32
37 public:
38 using id_map = std::map<std::size_t, bsoncxx::v_noabi::document::element>;
39
40 // This constructor is public for testing purposes only
42
49
56
65
72
79
87
88 friend MONGOCXX_ABI_EXPORT_CDECL(bool) operator==(const bulk_write&, const bulk_write&);
89 friend MONGOCXX_ABI_EXPORT_CDECL(bool) operator!=(const bulk_write&, const bulk_write&);
90
91 private:
93
95};
96
97} // namespace result
98} // namespace v_noabi
99} // namespace mongocxx
100
102
A read-only BSON document that owns its underlying buffer. When a document::value goes out of scope,...
Definition value.hpp:38
A read-only, non-owning view of a BSON document.
Definition view.hpp:35
Class representing the result of a MongoDB bulk write operation.
Definition bulk_write.hpp:36
std::int32_t modified_count() const
Gets the number of documents that were modified during this operation.
std::int32_t upserted_count() const
Gets the number of documents that were upserted during this operation.
std::int32_t inserted_count() const
Gets the number of documents that were inserted during this operation.
std::int32_t matched_count() const
Gets the number of documents that were matched during this operation.
std::int32_t deleted_count() const
Gets the number of documents that were deleted during this operation.
id_map upserted_ids() const
Gets the ids of the upserted documents.
Provides bsoncxx::v_noabi::document::value.
Provides bsoncxx::v_noabi::document::view.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition fwd.hpp:222
The mongocxx macro guard postlude header.
The mongocxx macro guard prelude header.
The top-level namespace within which all mongocxx library entities are declared.
Declares mongocxx::v_noabi::result::bulk_write.
Provides entities used to represent BSON types.