Loading...
Searching...
No Matches
search_index_model.hpp
Go to the documentation of this file.
// Copyright 2009-present MongoDB, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <mongocxx/search_index_model-fwd.hpp> // IWYU pragma: export
//
#include <mongocxx/v1/search_indexes.hpp> // IWYU pragma: export
#include <memory>
#include <string> // IWYU pragma: keep: backward compatibility, to be removed.
#include <utility>
#include <bsoncxx/document/value.hpp> // IWYU pragma: keep: backward compatibility, to be removed.
#include <bsoncxx/document/view.hpp>
#include <bsoncxx/document/view_or_value.hpp>
#include <bsoncxx/stdx/optional.hpp>
#include <bsoncxx/string/view_or_value.hpp>
#include <mongocxx/config/prelude.hpp>
namespace mongocxx {
namespace v_noabi {
class search_index_model {
public:
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE()
search_index_model(bsoncxx::v_noabi::document::view_or_value definition);
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE()
search_index_model(
bsoncxx::v_noabi::string::view_or_value name,
bsoncxx::v_noabi::document::view_or_value definition);
search_index_model() = delete;
/* explicit(false) */ MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE() search_index_model(v1::search_indexes::model opts);
explicit MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE() operator v1::search_indexes::model() const;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE() search_index_model(search_index_model&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(search_index_model&) operator=(search_index_model&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE() search_index_model(search_index_model const& other);
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(search_index_model&) operator=(search_index_model const& other);
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE() ~search_index_model();
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value>)
name() const;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(bsoncxx::v_noabi::document::view) definition() const;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value>)
type() const;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(search_index_model&)
type(bsoncxx::v_noabi::string::view_or_value type);
class internal;
private:
class impl;
std::unique_ptr<impl> _impl;
};
} // namespace v_noabi
} // namespace mongocxx
namespace mongocxx {
namespace v_noabi {
inline v_noabi::search_index_model from_v1(v1::search_indexes::model v) {
return {std::move(v)};
}
inline v1::search_indexes::model to_v1(v_noabi::search_index_model v) {
return v1::search_indexes::model{std::move(v)};
}
} // namespace v_noabi
} // namespace mongocxx
#include <mongocxx/config/postlude.hpp>
mongocxx::search_index_model::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.
mongocxx::v1::search_indexes::model
A description of a MongoDB Atlas Search index.
Definition search_indexes.hpp:311
mongocxx::v_noabi::search_index_model
Used by mongocxx::v_noabi::search_index_view.
Definition search_index_model.hpp:41
mongocxx::v_noabi::search_index_model::definition
bsoncxx::v_noabi::document::view definition() const
Retrieves definition of a search_index_model.
mongocxx::v_noabi::search_index_model::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.
mongocxx::v_noabi::search_index_model::name
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > name() const
Retrieves name of a search_index_model.
mongocxx::v_noabi::search_index_model::model
operator v1::search_indexes::model() const
Convert to the mongocxx::v1 equivalent.
mongocxx::v_noabi::search_index_model::type
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > type() const
Retrieves type of a search_index_model.
view_or_value.hpp
Provides bsoncxx::v_noabi::document::view_or_value.
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE
#define MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(...)
Equivalent to MONGOCXX_ABI_EXPORT_UNSTABLE with MONGOCXX_ABI_CDECL.
Definition config.hpp:28
postlude.hpp
The mongocxx v_noabi macro guard postlude header.
prelude.hpp
The mongocxx v_noabi macro guard prelude header.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
mongocxx::v1
Declares entities whose ABI stability is guaranteed for documented symbols.
mongocxx::v_noabi
Declares entities whose ABI stability is NOT guaranteed.
mongocxx::v_noabi::to_v1
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
mongocxx::v_noabi::from_v1
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
search_index_model-fwd.hpp
Declares mongocxx::v_noabi::search_index_model.
search_indexes.hpp
Provides mongocxx::v1::search_indexes.
view_or_value.hpp
Provides bsoncxx::v_noabi::string::view_or_value.
value.hpp
Provides bsoncxx::v_noabi::document::value.
view.hpp
Provides bsoncxx::v_noabi::document::view.
optional.hpp
Provides std::optional-related polyfills for library API usage.