MongoDB C++ Driver mongocxx-4.0.0
Loading...
Searching...
No Matches
search_index_view.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
8
11
12#include <mongocxx/cursor.hpp>
15
17
18namespace mongocxx {
19namespace v_noabi {
20
25 public:
28
31
33
43 list(const options::aggregate& options = options::aggregate());
44
56 list(const client_session& session, const options::aggregate& options = options::aggregate());
57
69 list(bsoncxx::v_noabi::string::view_or_value name,
70 const options::aggregate& options = options::aggregate());
71
85 list(const client_session& session,
86 bsoncxx::v_noabi::string::view_or_value name,
87 const options::aggregate& options = options::aggregate());
88
98 create_one(bsoncxx::v_noabi::document::view_or_value definition);
99
111 create_one(const client_session& session, bsoncxx::v_noabi::document::view_or_value definition);
112
124 create_one(bsoncxx::v_noabi::string::view_or_value name,
125 bsoncxx::v_noabi::document::view_or_value definition);
126
141 bsoncxx::v_noabi::string::view_or_value name,
142 bsoncxx::v_noabi::document::view_or_value definition);
143
153
165 create_one(const client_session& session, const search_index_model& model);
166
175 MONGOCXX_ABI_EXPORT_CDECL(std::vector<std::string>)
176 create_many(const std::vector<search_index_model>& models);
177
188 MONGOCXX_ABI_EXPORT_CDECL(std::vector<std::string>)
189 create_many(const client_session& session, const std::vector<search_index_model>& models);
190
197 MONGOCXX_ABI_EXPORT_CDECL(void) drop_one(bsoncxx::v_noabi::string::view_or_value name);
198
208 drop_one(const client_session& session, bsoncxx::v_noabi::string::view_or_value name);
209
219 update_one(bsoncxx::v_noabi::string::view_or_value name,
220 bsoncxx::v_noabi::document::view_or_value definition);
221
234 bsoncxx::v_noabi::string::view_or_value name,
235 bsoncxx::v_noabi::document::view_or_value definition);
236
237 private:
238 friend ::mongocxx::v_noabi::collection;
239
240 class impl;
241
242 search_index_view(void* coll, void* client);
243
244 std::vector<std::string> _create_many_helper(bsoncxx::v_noabi::array::view created_indexes);
245
246 const impl& _get_impl() const;
247
248 impl& _get_impl();
249
250 private:
251 std::unique_ptr<impl> _impl;
252};
253
254} // namespace v_noabi
255} // namespace mongocxx
256
257#include <mongocxx/config/postlude.hpp>
258
Provides mongocxx::v_noabi::options::aggregate.
Use a session for a sequence of operations, optionally with either causal consistency or snapshots.
Definition client_session.hpp:48
Class representing a client connection to MongoDB.
Definition client.hpp:61
Class representing server side document groupings within a MongoDB database.
Definition collection.hpp:87
Class representing a pointer to the result set of a query on a MongoDB server.
Definition cursor.hpp:42
Class representing a search index on a MongoDB server.
Definition search_index_model.hpp:20
Class representing a MongoDB search index view.
Definition search_index_view.hpp:24
void drop_one(bsoncxx::v_noabi::string::view_or_value name)
Drops a single search index from the collection by the index name.
cursor list(const options::aggregate &options=options::aggregate())
Returns a cursor over all the search indexes.
std::string create_one(bsoncxx::v_noabi::document::view_or_value definition)
This is a convenience method for creating a single search index with a default name.
std::vector< std::string > create_many(const std::vector< search_index_model > &models)
Creates multiple search indexes in the collection.
void update_one(bsoncxx::v_noabi::string::view_or_value name, bsoncxx::v_noabi::document::view_or_value definition)
Updates a single search index from the collection by the search index name.
Declares mongocxx::v_noabi::collection.
Provides mongocxx::v_noabi::cursor.
Provides bsoncxx::v_noabi::document::view_or_value.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition fwd.hpp:204
The mongocxx macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
The top-level namespace within which all mongocxx library entities are declared.
The top-level namespace reserved for the C++ standard library.
Provides std::optional-related polyfills for library API usage.
Provides mongocxx::v_noabi::search_index_model.
Declares mongocxx::v_noabi::search_index_view.