MongoDB C++ Driver mongocxx-4.0.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 <memory>
18
24#include <mongocxx/uri-fwd.hpp>
25
29
31
33
34namespace mongocxx {
35namespace v_noabi {
36
58 public:
75
84
89
94
99
104
109
121
131
142 acknowledge_string(bsoncxx::v_noabi::stdx::string_view rc_string);
143
152 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::string_view) acknowledge_string() const;
153
160 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::document::value) to_document() const;
161
168 friend MONGOCXX_ABI_EXPORT_CDECL(bool) operator==(const read_concern&, const read_concern&);
169 friend MONGOCXX_ABI_EXPORT_CDECL(bool) operator!=(const read_concern&, const read_concern&);
172
173 private:
174 friend ::mongocxx::v_noabi::client;
175 friend ::mongocxx::v_noabi::collection;
176 friend ::mongocxx::v_noabi::database;
177 friend ::mongocxx::v_noabi::options::transaction;
178 friend ::mongocxx::v_noabi::uri;
179
180 class impl;
181
182 read_concern(std::unique_ptr<impl>&& implementation);
183
184 std::unique_ptr<impl> _impl;
185};
186
187} // namespace v_noabi
188} // namespace mongocxx
189
190#include <mongocxx/config/postlude.hpp>
191
Class representing a client connection to MongoDB.
Definition client.hpp:61
Class representing server side document groupings within a MongoDB database.
Definition collection.hpp:87
Class representing a MongoDB database.
Definition database.hpp:46
A class to represent the read concern. Read concern can be set at the client, database,...
Definition read_concern.hpp:57
level acknowledge_level() const
Gets the current read concern level.
level
A class to represent the read concern level for read operations.
Definition read_concern.hpp:66
@ k_unknown
Represent an unknown read concern level.
@ k_linearizable
Represent read concern level "linearizable".
@ k_server_default
Represent the server's default read concern level.
@ k_local
Represent read concern level "local".
@ k_snapshot
Represent read concern level "snapshot".
@ k_available
Represent read concern level "available".
@ k_majority
Represent read concern level "majority".
bsoncxx::v_noabi::document::value to_document() const
Gets the document form of this read_concern.
bsoncxx::v_noabi::stdx::string_view acknowledge_string() const
Gets the current read concern string.
Class representing a MongoDB connection string URI.
Definition uri.hpp:43
Declares mongocxx::v_noabi::client.
Declares mongocxx::v_noabi::collection.
Declares mongocxx::v_noabi::database.
Provides bsoncxx::v_noabi::document::value.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition fwd.hpp:204
The mongocxx macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
The top-level namespace within which all mongocxx library entities are declared.
The top-level namespace reserved for the C++ standard library.
Provides std::optional-related polyfills for library API usage.
Declares mongocxx::v_noabi::read_concern.
Provides std::string_view-related polyfills for library API usage.
Declares mongocxx::v_noabi::options::transaction.
Provides mongocxx::v_noabi::options::transaction.
Declares mongocxx::v_noabi::uri.