Loading...
Searching...
No Matches
transaction_options.hpp
Go to the documentation of this file.
// Copyright 2009-present MongoDB, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <mongocxx/v1/transaction_options-fwd.hpp> // IWYU pragma: export
//
#include <mongocxx/v1/detail/prelude.hpp>
#include <mongocxx/v1/read_concern-fwd.hpp>
#include <mongocxx/v1/read_preference-fwd.hpp>
#include <mongocxx/v1/write_concern-fwd.hpp>
#include <bsoncxx/v1/stdx/optional.hpp>
#include <mongocxx/v1/config/export.hpp>
#include <chrono>
namespace mongocxx {
namespace v1 {
class transaction_options {
private:
void* _impl; // mongoc_transaction_opt_t
public:
MONGOCXX_ABI_EXPORT_CDECL() ~transaction_options();
MONGOCXX_ABI_EXPORT_CDECL() transaction_options(transaction_options&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(transaction_options&) operator=(transaction_options&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() transaction_options(transaction_options const& other);
MONGOCXX_ABI_EXPORT_CDECL(transaction_options&) operator=(transaction_options const& other);
MONGOCXX_ABI_EXPORT_CDECL() transaction_options();
MONGOCXX_ABI_EXPORT_CDECL(transaction_options&) max_commit_time_ms(std::chrono::milliseconds v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::chrono::milliseconds>) max_commit_time_ms() const;
MONGOCXX_ABI_EXPORT_CDECL(transaction_options&) read_concern(v1::read_concern const& v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::read_concern>) read_concern() const;
MONGOCXX_ABI_EXPORT_CDECL(transaction_options&) read_preference(v1::read_preference const& v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::read_preference>) read_preference() const;
MONGOCXX_ABI_EXPORT_CDECL(transaction_options&) write_concern(v1::write_concern const& v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::write_concern>) write_concern() const;
class internal;
private:
/* explicit(false) */ transaction_options(void* impl);
};
} // namespace v1
} // namespace mongocxx
#include <mongocxx/v1/detail/postlude.hpp>
mongocxx::v1::transaction_options::read_preference
transaction_options & read_preference(v1::read_preference const &v)
Set the "readPreference" field.
mongocxx::v1::transaction_options::max_commit_time_ms
transaction_options & max_commit_time_ms(std::chrono::milliseconds v)
Set the "maxCommitTimeMS" field.
mongocxx::v1::transaction_options::transaction_options
transaction_options(transaction_options &&other) noexcept
Move constructor.
mongocxx::v1::transaction_options::read_concern
transaction_options & read_concern(v1::read_concern const &v)
Set the "readConcern" field.
mongocxx::v1::transaction_options::write_concern
transaction_options & write_concern(v1::write_concern const &v)
Set the "writeConcern" field.
mongocxx::v1::transaction_options::~transaction_options
~transaction_options()
Destroy this object.
export.hpp
Provides macros to control the set of symbols exported in the ABI.
MONGOCXX_ABI_EXPORT_CDECL
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
prelude.hpp
The mongocxx v1 macro guard prelude header.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
mongocxx::v1
Declares entities whose ABI stability is guaranteed for documented symbols.
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
transaction_options-fwd.hpp
Declares mongocxx::v1::transaction_options.
read_concern-fwd.hpp
Declares mongocxx::v1::read_concern.
read_preference-fwd.hpp
Declares mongocxx::v1::read_preference.
optional.hpp
Provides std::optional-related polyfills for library API usage.
write_concern-fwd.hpp
Declares mongocxx::v1::write_concern.