MongoDB C++ Driver mongocxx-4.0.0
Loading...
Searching...
No Matches
transaction.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 <chrono>
18#include <memory>
19
25
27
29
30namespace mongocxx {
31namespace v_noabi {
32namespace options {
33
38 public:
40
45
50
55
60
65
77
84 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::read_concern>)
85 read_concern() const;
86
98 write_concern(const mongocxx::v_noabi::write_concern& wc);
99
108 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::write_concern>)
110
123
130 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::read_preference>)
132
143
151 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<std::chrono::milliseconds>)
153
154 private:
155 friend ::mongocxx::v_noabi::client_session;
156
157 class impl;
158
159 impl& _get_impl();
160 const impl& _get_impl() const;
161 std::unique_ptr<impl> _impl;
162};
163
164} // namespace options
165} // namespace v_noabi
166} // namespace mongocxx
167
168#include <mongocxx/config/postlude.hpp>
169
Class representing the optional arguments to mongocxx::v_noabi::client::start_session.
Definition client_session.hpp:33
Class representing the optional arguments for a transaction.
Definition transaction.hpp:37
bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > max_commit_time_ms() const
Gets the current transaction commit time, in milliseconds.
A class to represent the read concern. Read concern can be set at the client, database,...
Definition read_concern.hpp:57
Class representing a preference for how the driver routes read operations to members of a replica set...
Definition read_preference.hpp:64
Class representing the server-side requirement for reporting the success of a write operation....
Definition write_concern.hpp:60
Declares mongocxx::v_noabi::client_session.
#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.
Declares mongocxx::v_noabi::read_preference.
Declares mongocxx::v_noabi::options::transaction.
Declares mongocxx::v_noabi::write_concern.