91 pool& operator=(
pool const&) =
delete;
105 return _client.get();
122 explicit operator bool() const noexcept {
123 return _client !=
nullptr;
129 return (*_client)[name];
Declares mongocxx::v_noabi::options::auto_encryption.
A polyfill for std::optional<T>.
Definition optional.hpp:799
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:51
A client connection to a MongoDB server.
Definition client.hpp:76
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:101
v_noabi::client * operator->() const &noexcept
Access a member of the client instance.
Definition pool.hpp:104
entry & operator=(std::nullptr_t) noexcept
Assign nullptr to this entry to release its client to the pool.
Definition pool.hpp:116
v_noabi::client & operator*() const &noexcept
Retrieve a reference to the client.
Definition pool.hpp:110
~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(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
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 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.