94 pool& operator=(
pool const&) =
delete;
108 return _client.get();
125 explicit operator bool() const noexcept {
126 return _client !=
nullptr;
132 return (*_client)[name];
Declares mongocxx::v_noabi::options::auto_encryption.
A polyfill for std::optional<T>.
Definition optional.hpp:799
A polyfill for std::string_view.
Definition string_view.hpp:412
A view-or-value variant type for strings.
Definition view_or_value.hpp:41
pool(v_noabi::uri const &mongodb_uri={}, v_noabi::options::pool const &options={})
Creates a pool associated with a connection string.
A thread-safe pool of client objects.
Definition pool.hpp:49
A client connection to a MongoDB server.
Definition client.hpp:80
A MongoDB database.
Definition database.hpp:63
Used by mongocxx::v_noabi::pool.
Definition pool.hpp:36
An owning handle to a client obtained from a pool.
Definition pool.hpp:104
v_noabi::client * operator->() const &noexcept
Access a member of the client instance.
Definition pool.hpp:107
entry & operator=(std::nullptr_t) noexcept
Assign nullptr to this entry to release its client to the pool.
Definition pool.hpp:119
v_noabi::client & operator*() const &noexcept
Retrieve a reference to the client.
Definition pool.hpp:113
void append_metadata(bsoncxx::v1::stdx::string_view name, bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > version={}, bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > platform={})
Append client metadata to the handshake command sent as part of the initial connection handshake.
~pool()=default
Destroys a pool.
pool(v_noabi::uri const &mongodb_uri={}, v_noabi::options::pool const &options={})
Creates a pool associated with a connection string.
entry acquire()
Acquires a client from the pool. The calling thread will block until a connection is available.
A MongoDB connection string URI.
Definition uri.hpp:55
#define MONGOCXX_ABI_CDECL
Expands to __cdecl when built with MSVC on Windows.
Definition export.hpp:49
#define MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(...)
Equivalent to MONGOCXX_ABI_EXPORT_UNSTABLE with MONGOCXX_ABI_CDECL.
Definition config.hpp:28
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
Declares entities representing options to use with various commands.
Declares entities whose ABI stability is NOT guaranteed.
The top-level namespace within which all mongocxx library entities are declared.
Provides bsoncxx::v_noabi::string::view_or_value.
Provides mongocxx::v1::pool.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.
Provides std::optional-related polyfills for library API usage.
Provides mongocxx::v_noabi::client.
Provides mongocxx::v_noabi::database.
Provides mongocxx::v_noabi::options::pool.
Declares mongocxx::v_noabi::pool.
Provides mongocxx::v_noabi::uri.