MongoDB C++ Driver mongocxx-4.0.0
Loading...
Searching...
No Matches
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
18
21
23
25
26namespace mongocxx {
27namespace v_noabi {
28
33 public:
38 index_model(const bsoncxx::v_noabi::document::view_or_value& keys,
39 const bsoncxx::v_noabi::document::view_or_value& options = {});
40
41 index_model() = delete;
42
47
52
57
61 index_model& operator=(const index_model&) = default;
62
67
71 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::document::view) keys() const;
72
76 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::document::view) options() const;
77
78 private:
79 bsoncxx::v_noabi::document::value _keys;
80 bsoncxx::v_noabi::document::value _options;
81};
82
83} // namespace v_noabi
84} // namespace mongocxx
85
86#include <mongocxx/config/postlude.hpp>
87
Class representing an index on a MongoDB server.
Definition index_model.hpp:32
bsoncxx::v_noabi::document::view options() const
Retrieves options of an index_model.
bsoncxx::v_noabi::document::view keys() const
Retrieves keys of an index_model.
Provides bsoncxx::v_noabi::document::value.
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
Provides mongocxx::v_noabi::options::index.
Declares mongocxx::v_noabi::index_model.
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.