158 std::uint32_t server_id);
Provides mongocxx::v1::aggregate_options.
A BSON document.
Definition value.hpp:46
A non-owning, read-only BSON document.
Definition view.hpp:54
A polyfill for std::optional<T>.
Definition optional.hpp:799
A polyfill for std::string_view.
Definition string_view.hpp:412
Options for an "aggregate" command.
Definition aggregate_options.hpp:64
Options for mongocxx::v1::change_stream.
Definition change_stream.hpp:174
A MongoDB change stream.
Definition change_stream.hpp:50
A MongoDB client session.
Definition client_session.hpp:48
A MongoDB collection.
Definition collection.hpp:83
A MongoDB cursor.
Definition cursor.hpp:41
~database()
Destroy this object.
v1::collection create_collection(v1::client_session const &session, bsoncxx::v1::stdx::string_view name, bsoncxx::v1::document::view opts={}, bsoncxx::v1::stdx::optional< v1::write_concern > const &wc={})
Explicitly create a new collection or view in this database.
v1::collection collection(bsoncxx::v1::stdx::string_view name) const
Access the collection with the given name.
v1::change_stream watch(v1::pipeline const &pipeline, v1::change_stream::options const &opts={})
Return a change stream subscribed to this collection with events filtered/modified by pipeline.
v1::change_stream watch(v1::client_session const &session, v1::change_stream::options const &opts={})
Return a change stream subscribed to this database.
v1::change_stream watch(v1::change_stream::options const &opts={})
Return a change stream subscribed to this database.
std::vector< std::string > list_collection_names(bsoncxx::v1::document::view filter={})
Return an unsorted list of the names of all the collections and views in this database.
v1::write_concern write_concern() const
Return the current default "writeConcern" to use for operations on this database.
v1::cursor list_collections(bsoncxx::v1::document::view filter={})
Return an unsorted list of all collections and views in this database.
bsoncxx::v1::document::value run_command(v1::client_session const &session, bsoncxx::v1::document::view command)
Run an arbitrary database command.
v1::read_concern read_concern() const
Return the current default "readConcern" to use for operations on this database.
bsoncxx::v1::document::value run_command(bsoncxx::v1::document::view command, std::uint32_t server_id)
Run an arbitrary database command against the requested specific server.
database()
Default initialization.
bsoncxx::v1::stdx::string_view name() const
Return the name of this database.
v1::cursor aggregate(v1::pipeline const &pipeline, v1::aggregate_options const &opts={})
Run an aggregation framework pipeline.
void write_concern(v1::write_concern const &wc)
Set the default "writeConcern" to use for operations on this database.
void read_preference(v1::read_preference const &rp)
Set the default "readPreference" to use for operations on this database.
bsoncxx::v1::document::value run_command(bsoncxx::v1::document::view command)
Run an arbitrary database command.
v1::gridfs::bucket gridfs_bucket(v1::gridfs::bucket::options const &opts={}) const
Return a GridFS bucket for this database.
void read_concern(v1::read_concern const &rc)
Set the default "readConcern" to use for operations on this database.
void drop(v1::client_session const &session, bsoncxx::v1::stdx::optional< v1::write_concern > const &wc={})
Drop this database and all associated data files.
std::vector< std::string > list_collection_names(v1::client_session const &session, bsoncxx::v1::document::view filter={})
Return an unsorted list of the names of all the collections and views in this database.
database(database &&other) noexcept
Move constructor.
v1::cursor list_collections(v1::client_session const &session, bsoncxx::v1::document::view filter={})
Return an unsorted list of all collections and views in this database.
bool has_collection(bsoncxx::v1::stdx::string_view name)
Return true when this database contains a collection with the given name.
v1::read_preference read_preference() const
Return the current default "readPreference" to use for operations on this database.
v1::collection create_collection(bsoncxx::v1::stdx::string_view name, bsoncxx::v1::document::view opts={}, bsoncxx::v1::stdx::optional< v1::write_concern > const &wc={})
Explicitly create a new collection or view in this database.
void drop(bsoncxx::v1::stdx::optional< v1::write_concern > const &wc={})
Drop this database and all associated data files.
v1::collection operator[](bsoncxx::v1::stdx::string_view name) const
Equivalent to this->collection(name).
Options for mongocxx::v1::gridfs::bucket.
Definition bucket.hpp:345
A GridFS bucket.
Definition bucket.hpp:62
A MongoDB aggregation pipeline.
Definition pipeline.hpp:43
Options related to a MongoDB Read Concern.
Definition read_concern.hpp:44
Options related to a MongoDB Read Preference.
Definition read_preference.hpp:49
Options related to a MongoDB Write Concern.
Definition write_concern.hpp:49
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 macro guard postlude header.
The mongocxx v1 macro guard prelude header.
Declares entities representing options to use with various commands.
Declares entities whose ABI stability is guaranteed for documented symbols.
The top-level namespace within which all mongocxx library entities are declared.
Provides mongocxx::v1::change_stream.
Declares mongocxx::v1::client_session.
Declares mongocxx::v1::collection.
Declares mongocxx::v1::cursor.
Declares mongocxx::v1::database.
Declares bsoncxx::v1::document::value.
Provides bsoncxx::v1::document::view.
Provides mongocxx::v1::gridfs::bucket.
Declares mongocxx::v1::pipeline.
Declares mongocxx::v1::read_concern.
Declares mongocxx::v1::read_preference.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.
Provides mongocxx::v1::write_concern.