MongoDB C++ Driver
mongocxx-3.11.0
Loading...
Searching...
No Matches
mongocxx
v_noabi
mongocxx
result
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
21
#include <
mongocxx/result/bulk_write-fwd.hpp
>
22
23
#include <
bsoncxx/document/value.hpp
>
24
#include <
bsoncxx/document/view.hpp
>
25
#include <
bsoncxx/types.hpp
>
26
27
#include <
mongocxx/config/prelude.hpp
>
28
29
namespace
mongocxx
{
30
namespace
v_noabi {
31
namespace
result {
32
36
class
bulk_write
{
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
41
explicit
MONGOCXX_ABI_EXPORT_CDECL
()
bulk_write
(
bsoncxx::v_noabi::document::value
raw_response);
42
48
MONGOCXX_ABI_EXPORT_CDECL
(std::int32_t)
inserted_count
()
const
;
49
55
MONGOCXX_ABI_EXPORT_CDECL
(std::int32_t)
matched_count
()
const
;
56
64
MONGOCXX_ABI_EXPORT_CDECL
(std::int32_t)
modified_count
()
const
;
65
71
MONGOCXX_ABI_EXPORT_CDECL
(std::int32_t)
deleted_count
()
const
;
72
78
MONGOCXX_ABI_EXPORT_CDECL
(std::int32_t)
upserted_count
()
const
;
79
86
MONGOCXX_ABI_EXPORT_CDECL
(id_map)
upserted_ids
()
const
;
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
:
92
bsoncxx::v_noabi::document::view
view()
const
;
93
94
bsoncxx::v_noabi::document::value
_response;
95
};
96
97
}
// namespace result
98
}
// namespace v_noabi
99
}
// namespace mongocxx
100
101
#include <
mongocxx/config/postlude.hpp
>
102
bsoncxx::v_noabi::document::value
A read-only BSON document that owns its underlying buffer. When a document::value goes out of scope,...
Definition
value.hpp:38
bsoncxx::v_noabi::document::view
A read-only, non-owning view of a BSON document.
Definition
view.hpp:35
mongocxx::v_noabi::result::bulk_write
Class representing the result of a MongoDB bulk write operation.
Definition
bulk_write.hpp:36
mongocxx::v_noabi::result::bulk_write::modified_count
std::int32_t modified_count() const
Gets the number of documents that were modified during this operation.
mongocxx::v_noabi::result::bulk_write::upserted_count
std::int32_t upserted_count() const
Gets the number of documents that were upserted during this operation.
mongocxx::v_noabi::result::bulk_write::inserted_count
std::int32_t inserted_count() const
Gets the number of documents that were inserted during this operation.
mongocxx::v_noabi::result::bulk_write::matched_count
std::int32_t matched_count() const
Gets the number of documents that were matched during this operation.
mongocxx::v_noabi::result::bulk_write::deleted_count
std::int32_t deleted_count() const
Gets the number of documents that were deleted during this operation.
mongocxx::v_noabi::result::bulk_write::upserted_ids
id_map upserted_ids() const
Gets the ids of the upserted documents.
value.hpp
Provides bsoncxx::v_noabi::document::value.
view.hpp
Provides bsoncxx::v_noabi::document::view.
MONGOCXX_ABI_EXPORT_CDECL
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition
fwd.hpp:222
postlude.hpp
The mongocxx macro guard postlude header.
prelude.hpp
The mongocxx macro guard prelude header.
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
bulk_write-fwd.hpp
Declares mongocxx::v_noabi::result::bulk_write.
types.hpp
Provides entities used to represent BSON types.
Generated by
1.12.0