Loading...
Searching...
No Matches
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/index_model-fwd.hpp> // IWYU pragma: export
#include <bsoncxx/document/value.hpp>
#include <bsoncxx/document/view_or_value.hpp>
#include <mongocxx/options/index.hpp> // IWYU pragma: keep: backward compatibility, to be removed.
#include <mongocxx/config/prelude.hpp>
namespace mongocxx {
namespace v_noabi {
class index_model {
public:
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE()
index_model(
bsoncxx::v_noabi::document::view_or_value const& keys,
bsoncxx::v_noabi::document::view_or_value const& options = {});
index_model() = delete;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE() index_model(index_model&&) noexcept;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(index_model&) operator=(index_model&&) noexcept;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE() index_model(index_model const&);
index_model& operator=(index_model const&) = default;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE() ~index_model();
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(bsoncxx::v_noabi::document::view) keys() const;
MONGOCXX_ABI_EXPORT_CDECL_UNSTABLE(bsoncxx::v_noabi::document::view) options() const;
private:
bsoncxx::v_noabi::document::value _keys;
bsoncxx::v_noabi::document::value _options;
};
} // namespace v_noabi
} // namespace mongocxx
#include <mongocxx/config/postlude.hpp>
mongocxx::index_model::index_model
index_model(bsoncxx::v_noabi::document::view_or_value const &keys, bsoncxx::v_noabi::document::view_or_value const &options={})
Initializes a new index_model over a mongocxx::v_noabi::collection.
mongocxx::v_noabi::index_model::index_model
index_model(bsoncxx::v_noabi::document::view_or_value const &keys, bsoncxx::v_noabi::document::view_or_value const &options={})
Initializes a new index_model over a mongocxx::v_noabi::collection.
mongocxx::v_noabi::index_model::options
bsoncxx::v_noabi::document::view options() const
Retrieves options of an index_model.
mongocxx::v_noabi::index_model::keys
bsoncxx::v_noabi::document::view keys() const
Retrieves keys of an index_model.
view_or_value.hpp
Provides bsoncxx::v_noabi::document::view_or_value.
index.hpp
Provides mongocxx::v_noabi::options::index.
index_model-fwd.hpp
Declares mongocxx::v_noabi::index_model.
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
prelude.hpp
The mongocxx v_noabi macro guard prelude header.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
mongocxx::v_noabi
Declares entities whose ABI stability is NOT guaranteed.
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
value.hpp
Provides bsoncxx::v_noabi::document::value.