MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
search_index_model.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <mongocxx/search_index_model-fwd.hpp> // IWYU pragma: export
18
19//
20
21#include <mongocxx/v1/search_indexes.hpp> // IWYU pragma: export
22
23#include <memory>
24#include <string> // IWYU pragma: keep: backward compatibility, to be removed.
25#include <utility>
26
27#include <bsoncxx/document/value.hpp> // IWYU pragma: keep: backward compatibility, to be removed.
32
34
35namespace mongocxx {
36namespace v_noabi {
37
42 public:
47 search_index_model(bsoncxx::v_noabi::document::view_or_value definition);
48
51 bsoncxx::v_noabi::string::view_or_value name,
52 bsoncxx::v_noabi::document::view_or_value definition);
53
54 search_index_model() = delete;
55
59 /* explicit(false) */ MONGOCXX_ABI_EXPORT_CDECL() search_index_model(v1::search_indexes::model opts);
60
64 explicit MONGOCXX_ABI_EXPORT_CDECL() operator v1::search_indexes::model() const;
65
70
75
80
85
90
94 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value>)
95 name() const;
96
101
105 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value>)
106 type() const;
107
115 type(bsoncxx::v_noabi::string::view_or_value type);
116
117 class internal;
118
119 private:
120 class impl;
121 std::unique_ptr<impl> _impl;
122};
123
124} // namespace v_noabi
125} // namespace mongocxx
126
127namespace mongocxx {
128namespace v_noabi {
129
134 return {std::move(v)};
135}
136
143
144} // namespace v_noabi
145} // namespace mongocxx
146
148
search_index_model(bsoncxx::v_noabi::document::view_or_value definition)
Initializes a new search_index_model over a mongocxx::v_noabi::collection.
A description of a MongoDB Atlas Search index.
Definition search_indexes.hpp:315
Used by mongocxx::v_noabi::search_index_view.
Definition search_index_model.hpp:41
bsoncxx::v_noabi::document::view definition() const
Retrieves definition of a search_index_model.
search_index_model(bsoncxx::v_noabi::document::view_or_value definition)
Initializes a new search_index_model over a mongocxx::v_noabi::collection.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > name() const
Retrieves name of a search_index_model.
operator v1::search_indexes::model() const
Convert to the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > type() const
Retrieves type of a search_index_model.
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 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.
Declares mongocxx::v_noabi::search_index_model.
Provides mongocxx::v1::search_indexes.
Provides bsoncxx::v_noabi::string::view_or_value.
Provides bsoncxx::v_noabi::document::value.
Provides bsoncxx::v_noabi::document::view.
Provides std::optional-related polyfills for library API usage.