20 #include <bsoncxx/document/view_or_value.hpp>
21 #include <bsoncxx/string/view_or_value.hpp>
22 #include <mongocxx/collection.hpp>
23 #include <mongocxx/options/modify_collection.hpp>
24 #include <mongocxx/options/create_collection.hpp>
25 #include <mongocxx/options/create_view.hpp>
26 #include <mongocxx/write_concern.hpp>
27 #include <mongocxx/read_preference.hpp>
29 #include <mongocxx/config/prelude.hpp>
32 MONGOCXX_INLINE_NAMESPACE_BEGIN
82 explicit operator bool()
const noexcept;
112 bsoncxx::string::view_or_value name,
134 class
collection create_view(bsoncxx::string::view_or_value name,
135 bsoncxx::string::view_or_value view_on,
136 const options::create_view& options = options::create_view());
153 stdx::string_view name,
154 const options::modify_collection& options = options::modify_collection());
180 bool has_collection(bsoncxx::string::view_or_value name) const;
195 cursor list_collections(bsoncxx::document::view_or_value filter = {});
202 stdx::string_view name() const;
283 MONGOCXX_INLINE class
collection operator[](bsoncxx::string::view_or_value name) const;
289 MONGOCXX_PRIVATE
database(const class client& client, bsoncxx::string::view_or_value name);
291 class MONGOCXX_PRIVATE impl;
293 MONGOCXX_PRIVATE impl& _get_impl();
294 MONGOCXX_PRIVATE const impl& _get_impl() const;
296 std::unique_ptr<impl> _impl;
299 MONGOCXX_INLINE
collection database::operator[](bsoncxx::string::view_or_value name) const {
303 MONGOCXX_INLINE_NAMESPACE_END
306 #include <mongocxx/config/postlude.hpp>
Class representing the optional arguments to a MongoDB createCollection command.
Definition: create_collection.hpp:31
Definition: bulk_write.hpp:22
A read-only BSON document that owns its underlying buffer.
Definition: value.hpp:33
Class representing a pointer to the result set of a query on a MongoDB server.
Definition: cursor.hpp:35
Class representing a client connection to MongoDB.
Definition: client.hpp:49
Class representing a MongoDB database.
Definition: database.hpp:44
Class representing a preference for how the driver routes read operations to members of a replica set...
Definition: read_preference.hpp:57
A class to represent the read concern.
Definition: read_concern.hpp:52
Class representing the server-side requirement for reporting the success of a write operation...
Definition: write_concern.hpp:54
Class representing server side document groupings within a MongoDB database.
Definition: collection.hpp:74