114 return std::move(_db);
128 explicit operator bool() const noexcept {
129 return _db.operator bool();
254 bsoncxx::
v_noabi::document::view_or_value collection_options = {},
283 bsoncxx::
v_noabi::document::view_or_value collection_options = {},
599 return {std::move(v)};
Provides mongocxx::v_noabi::options::aggregate.
A polyfill for std::optional<T>.
Definition optional.hpp:799
A polyfill for std::string_view.
Definition string_view.hpp:412
A read-only BSON document that owns its underlying buffer.
Definition value.hpp:48
database() noexcept
Default constructs a new database. The database is not valid for use and is equivalent to the state o...
Definition database.hpp:73
A MongoDB database.
Definition database.hpp:57
A MongoDB change stream.
Definition change_stream.hpp:44
Supports MongoDB client session operations.
Definition client_session.hpp:58
A MongoDB collection.
Definition collection.hpp:98
A cursor over the documents returned by a query to a MongoDB server.
Definition cursor.hpp:50
A MongoDB database.
Definition database.hpp:63
v_noabi::cursor aggregate(v_noabi::pipeline const &pipeline, v_noabi::options::aggregate const &options={})
Runs an aggregation framework pipeline against this database for pipeline stages that do not require ...
bsoncxx::v_noabi::document::value run_command(bsoncxx::v_noabi::document::view_or_value command)
Runs a command against this database.
v_noabi::collection create_collection(bsoncxx::v_noabi::stdx::string_view name, bsoncxx::v_noabi::document::view_or_value collection_options={}, bsoncxx::v_noabi::stdx::optional< v_noabi::write_concern > const &write_concern={})
Explicitly creates a collection in this database with the specified options.
v_noabi::read_preference read_preference() const
The current read preference for this database.
bsoncxx::v_noabi::stdx::string_view name() const
Get the name of this database.
v_noabi::gridfs::bucket gridfs_bucket(v_noabi::options::gridfs::bucket const &options={}) const
Access a GridFS bucket within this database.
database & operator=(database &&other) noexcept=default
Move assigns a database.
void drop(bsoncxx::v_noabi::stdx::optional< v_noabi::write_concern > const &write_concern={})
Drops the database and all its collections.
v_noabi::collection collection(bsoncxx::v_noabi::string::view_or_value name) const
Access a collection (logical grouping of documents) within this database.
std::vector< std::string > list_collection_names(bsoncxx::v_noabi::document::view_or_value filter={})
Enumerates the collection names in this database.
database(database &&other) noexcept=default
Move constructs a database.
database() noexcept
Default constructs a new database. The database is not valid for use and is equivalent to the state o...
Definition database.hpp:73
void read_preference(v_noabi::read_preference rp)
Sets the read_preference for this database.
v_noabi::cursor list_collections(bsoncxx::v_noabi::document::view_or_value filter={})
Enumerates the collections in this database.
void read_concern(v_noabi::read_concern rc)
Sets the read_concern for this database.
v_noabi::write_concern write_concern() const
The current write_concern for this database.
v_noabi::change_stream watch(v_noabi::options::change_stream const &options={})
Gets a change stream on this database with an empty pipeline. Change streams are only supported with ...
v_noabi::read_concern read_concern() const
The current read concern for this database.
void write_concern(v_noabi::write_concern wc)
Sets the write_concern for this database.
bool has_collection(bsoncxx::v_noabi::string::view_or_value name) const
Checks whether this database contains a collection having the given name.
A GridFS bucket.
Definition bucket.hpp:74
Used by change streams.
Definition change_stream.hpp:52
A MongoDB aggregation pipeline.
Definition pipeline.hpp:45
Controls the consistency and isolation properties of data read from replica sets and sharded clusters...
Definition read_concern.hpp:54
Describes how MongoDB clients route read operations to the members of a replica set or sharded cluste...
Definition read_preference.hpp:59
The level of acknowledgment requested for write operations to a MongoDB server.
Definition write_concern.hpp:54
Provides bsoncxx::v_noabi::document::view_or_value.
#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.
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities whose ABI stability is guaranteed for documented symbols.
Declares entities related to GridFS.
Declares entities representing options to use with various commands.
Declares entities whose ABI stability is NOT guaranteed.
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
The top-level namespace within which all mongocxx library entities are declared.
Provides bsoncxx::v_noabi::string::view_or_value.
Provides mongocxx::v1::database.
Provides bsoncxx::v_noabi::document::value.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.
Provides mongocxx::v_noabi::change_stream.
Declares mongocxx::v_noabi::client.
Declares mongocxx::v_noabi::client_encryption.
Provides mongocxx::v_noabi::client_session.
Declares mongocxx::v_noabi::collection.
Provides mongocxx::v_noabi::collection.
Provides mongocxx::v_noabi::cursor.
Declares mongocxx::v_noabi::database.
Provides mongocxx::v_noabi::gridfs::bucket.
Provides mongocxx::v_noabi::options::change_stream.
Provides mongocxx::v_noabi::options::gridfs::bucket.
Provides mongocxx::v_noabi::pipeline.
Provides mongocxx::v_noabi::read_concern.
Provides mongocxx::v_noabi::read_preference.
Provides mongocxx::v_noabi::write_concern.