MongoDB C++ Driver
mongocxx-3.7.0
|
20 #include <bsoncxx/document/view.hpp>
21 #include <bsoncxx/stdx/optional.hpp>
22 #include <mongocxx/options/client_session.hpp>
24 #include <mongocxx/config/prelude.hpp>
27 MONGOCXX_INLINE_NAMESPACE_BEGIN
42 enum class transaction_state {
44 k_transaction_starting,
45 k_transaction_in_progress,
46 k_transaction_committed,
47 k_transaction_aborted,
103 std::uint32_t server_id()
const noexcept;
108 transaction_state get_transaction_state()
const noexcept;
113 bool get_dirty()
const noexcept;
145 void start_transaction(
const stdx::optional<options::transaction>& transaction_opts = {});
154 void commit_transaction();
162 void abort_transaction();
195 class MONGOCXX_PRIVATE impl;
201 MONGOCXX_PRIVATE impl& _get_impl();
202 MONGOCXX_PRIVATE
const impl& _get_impl()
const;
204 std::unique_ptr<impl> _impl;
207 MONGOCXX_INLINE_NAMESPACE_END
210 #include <mongocxx/config/postlude.hpp>
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24
Class representing the optional arguments to mongocxx::client::start_session.
Definition: client_session.hpp:30
std::function< void(client_session *)> with_transaction_cb
Helper to run a user-provided callback within a transaction.
Definition: client_session.hpp:185
Class representing a client connection to MongoDB.
Definition: client.hpp:58
Class representing a MongoDB index view.
Definition: index_view.hpp:35
A BSON replication timestamp value.
Definition: types.hpp:577
Use a session for a sequence of operations, optionally with either causal consistency or snapshots.
Definition: client_session.hpp:40
Class representing a batch of write operations that can be sent to the server as a group.
Definition: bulk_write.hpp:43
Class representing a MongoDB database.
Definition: database.hpp:43
Class representing the optional arguments for a transaction.
Definition: transaction.hpp:38
Class representing server side document groupings within a MongoDB database.
Definition: collection.hpp:83
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33