MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
read_concern.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 <mongocxx/v1/read_concern-fwd.hpp> // IWYU pragma: export
18
19//
20
22
24
26
28
29namespace mongocxx {
30namespace v1 {
31
45 private:
46 void* _impl; // mongoc_read_concern_t
47
48 public:
100
107
115
123
128
133
141
154
159
166
173
181
186 friend MONGOCXX_ABI_EXPORT_CDECL(bool) operator==(read_concern const& lhs, read_concern const& rhs);
187
188 friend bool operator!=(read_concern const& lhs, read_concern const& rhs) {
189 return !(lhs == rhs);
190 }
191
193
194 class internal;
195
196 private:
197 /* explicit(false) */ read_concern(void* impl);
198};
199
200} // namespace v1
201} // namespace mongocxx
202
204
read_concern()
Default initialization.
bsoncxx::v1::document::value to_document() const
Return this read concern option as a document.
~read_concern()
Destroy this object.
read_concern & acknowledge_level(level v)
Set the read concern level.
read_concern(read_concern &&other) noexcept
Move constructor.
level
The read concern level.
Definition read_concern.hpp:57
@ k_unknown
An unknown (unsupported) read concern level.
Definition read_concern.hpp:86
@ k_linearizable
Read Concern "linearizable" (MongoDB Manual)
Definition read_concern.hpp:73
@ k_server_default
Default MongoDB Read Concerns/Write Concerns (MongoDB Manual)
Definition read_concern.hpp:79
@ k_local
Read Concern "local" (MongoDB Manual)
Definition read_concern.hpp:61
@ k_snapshot
Read Concern "snapshot" (MongoDB Manual)
Definition read_concern.hpp:98
@ k_available
Read Concern "available" (MongoDB Manual)
Definition read_concern.hpp:92
@ k_majority
Read Concern "majority" (MongoDB Manual)
Definition read_concern.hpp:67
read_concern & acknowledge_string(bsoncxx::v1::stdx::string_view v)
Set the read concern level to an arbitrary string.
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 macro guard postlude header.
The mongocxx v1 macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities whose ABI stability is guaranteed for documented symbols.
The top-level namespace within which all mongocxx library entities are declared.
Declares bsoncxx::v1::document::value.
Declares mongocxx::v1::read_concern.
Provides std::string_view-related polyfills for library API usage.