MongoDB C++ Driver  mongocxx-3.3.2
All Classes Namespaces Functions Enumerations Enumerator Friends Pages
index_view.hpp
1 // Copyright 2017 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 <chrono>
18 
19 #include <bsoncxx/stdx/optional.hpp>
20 #include <mongocxx/write_concern.hpp>
21 
22 #include <mongocxx/config/prelude.hpp>
23 
24 namespace mongocxx {
25 MONGOCXX_INLINE_NAMESPACE_BEGIN
26 namespace options {
27 
31 class MONGOCXX_API index_view {
32  public:
33  index_view();
34 
48  index_view& max_time(std::chrono::milliseconds max_time);
49 
59  const bsoncxx::stdx::optional<std::chrono::milliseconds>& max_time() const;
60 
75 
85  const bsoncxx::stdx::optional<mongocxx::write_concern>& write_concern() const;
86 
87  private:
88  bsoncxx::stdx::optional<std::chrono::milliseconds> _max_time;
89  bsoncxx::stdx::optional<mongocxx::write_concern> _write_concern;
90 };
91 
92 } // namespace options
93 MONGOCXX_INLINE_NAMESPACE_END
94 } // namespace mongocxx
95 
96 #include <mongocxx/config/postlude.hpp>
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24
Class representing optional arguments to IndexView operations.
Definition: index_view.hpp:31
Class representing the server-side requirement for reporting the success of a write operation...
Definition: write_concern.hpp:55