20 #include <mongocxx/collection-fwd.hpp>
21 #include <mongocxx/index_view-fwd.hpp>
23 #include <bsoncxx/document/value.hpp>
24 #include <bsoncxx/stdx/optional.hpp>
25 #include <mongocxx/client_session.hpp>
26 #include <mongocxx/cursor.hpp>
27 #include <mongocxx/index_model.hpp>
28 #include <mongocxx/options/index_view.hpp>
30 #include <mongocxx/config/prelude.hpp>
198 const std::vector<index_model>& indexes,
223 const std::vector<index_model>& indexes,
270 stdx::string_view name,
431 friend ::mongocxx::v_noabi::collection;
432 class MONGOCXX_PRIVATE impl;
436 MONGOCXX_PRIVATE impl& _get_impl();
439 std::unique_ptr<impl> _impl;
445 #include <mongocxx/config/postlude.hpp>
A read-only BSON document that owns its underlying buffer.
Definition: value.hpp:38
Use a session for a sequence of operations, optionally with either causal consistency or snapshots.
Definition: client_session.hpp:47
Class representing a client connection to MongoDB.
Definition: client.hpp:61
Class representing a pointer to the result set of a query on a MongoDB server.
Definition: cursor.hpp:42
Class representing an index on a MongoDB server.
Definition: index_model.hpp:31
Class representing a MongoDB index view.
Definition: index_view.hpp:38
void drop_one(const client_session &session, const index_model &index, const options::index_view &options=options::index_view{})
Attempts to drop a single index from the collection given an index model.
cursor list()
Returns a cursor over all the indexes.
void drop_one(stdx::string_view name, const options::index_view &options=options::index_view{})
Drops a single index by name.
void drop_one(const bsoncxx::v_noabi::document::view_or_value &keys, const bsoncxx::v_noabi::document::view_or_value &index_options={}, const options::index_view &options=options::index_view{})
Attempts to drop a single index from the collection given the keys and options.
stdx::optional< std::string > create_one(const client_session &session, const index_model &index, const options::index_view &options=options::index_view{})
Creates an index.
stdx::optional< std::string > create_one(const bsoncxx::v_noabi::document::view_or_value &keys, const bsoncxx::v_noabi::document::view_or_value &index_options={}, const options::index_view &options=options::index_view{})
Creates an index.
void drop_all(const client_session &session, const options::index_view &options=options::index_view{})
Drops all indexes in the collection.
void drop_all(const options::index_view &options=options::index_view{})
Drops all indexes in the collection.
bsoncxx::v_noabi::document::value create_many(const std::vector< index_model > &indexes, const options::index_view &options=options::index_view{})
Adds a container of indexes to the collection.
stdx::optional< std::string > create_one(const client_session &session, const bsoncxx::v_noabi::document::view_or_value &keys, const bsoncxx::v_noabi::document::view_or_value &index_options={}, const options::index_view &options=options::index_view{})
Creates an index.
stdx::optional< std::string > create_one(const index_model &index, const options::index_view &options=options::index_view{})
Creates an index.
bsoncxx::v_noabi::document::value create_many(const client_session &session, const std::vector< index_model > &indexes, const options::index_view &options=options::index_view{})
Adds a container of indexes to the collection.
void drop_one(const client_session &session, const bsoncxx::v_noabi::document::view_or_value &keys, const bsoncxx::v_noabi::document::view_or_value &index_options={}, const options::index_view &options=options::index_view{})
Attempts to drop a single index from the collection given the keys and options.
void drop_one(const index_model &index, const options::index_view &options=options::index_view{})
Attempts to drop a single index from the collection given an index model.
cursor list(const client_session &session)
Returns a cursor over all the indexes.
void drop_one(const client_session &session, stdx::string_view name, const options::index_view &options=options::index_view{})
Drops a single index by name.
Class representing optional arguments to IndexView operations.
Definition: index_view.hpp:33
The top-level namespace for mongocxx library entities.
Definition: bulk_write-fwd.hpp:19