MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
find_options.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/v1/find_options-fwd.hpp> // IWYU pragma: export
18
19//
20
22
27
30
32
35
36#include <chrono>
37#include <cstdint>
38
39namespace mongocxx {
40namespace v1 {
41
73 private:
74 class impl;
75 void* _impl;
76
77 public:
84
92
100
105
110
118
123
127 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) allow_disk_use() const;
128
133
138
143
147 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int32_t>) batch_size() const;
148
153
157 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) collation() const;
158
163
167 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::types::view>) comment() const;
168
173
177 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<cursor::type>) cursor_type() const;
178
183
187 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::hint>) hint() const;
188
193
197 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view> const) let() const;
198
203
207 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int64_t>) limit() const;
208
213
217 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) max() const;
218
223
227 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::chrono::milliseconds>) max_await_time() const;
228
233
237 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::chrono::milliseconds>) max_time() const;
238
243
247 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) min() const;
248
253
257 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) no_cursor_timeout() const;
258
263
267 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) projection() const;
268
273
278
283
287 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) return_key() const;
288
293
297 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) show_record_id() const;
298
303
307 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int64_t>) skip() const;
308
312 MONGOCXX_ABI_EXPORT_CDECL(find_options&) sort(bsoncxx::v1::document::value ordering);
313
317 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) sort() const;
318
319 class internal;
320};
321
322} // namespace v1
323} // namespace mongocxx
324
325#include <mongocxx/v1/detail/postlude.hpp>
326
A MongoDB cursor.
Definition cursor.hpp:41
find_options & collation(bsoncxx::v1::document::value collation)
Set the "collation" field.
find_options(find_options &&other) noexcept
Move constructor.
find_options & read_preference(v1::read_preference rp)
Set the "readPreference" field.
find_options & allow_partial_results(bool allow_partial)
Set the "allowPartialResults" field.
find_options & return_key(bool return_key)
Set the "returnKey" field.
find_options & batch_size(std::int32_t batch_size)
Set the "batchSize" field.
find_options & skip(std::int64_t skip)
Set the "skip" field.
find_options & comment(bsoncxx::v1::types::value comment)
Set the "comment" field.
find_options & min(bsoncxx::v1::document::value min)
Set the "min" field.
~find_options()
Destroy this object.
find_options & no_cursor_timeout(bool no_cursor_timeout)
Set the "noCursorTimeout" field.
find_options & allow_disk_use(bool allow_disk_use)
Set the "allowDiskUse" field.
find_options & show_record_id(bool show_record_id)
Set the "showRecordId" field.
find_options & cursor_type(v1::cursor::type cursor_type)
Set the "cursorType" field.
find_options & sort(bsoncxx::v1::document::value ordering)
Set the "sort" field.
find_options & limit(std::int64_t limit)
Set the "limit" field.
find_options & let(bsoncxx::v1::document::value let)
Set the "let" field.
find_options & max_await_time(std::chrono::milliseconds max_await_time)
Set the "maxAwaitTimeMS" field.
find_options & max_time(std::chrono::milliseconds max_time)
Set the "maxTimeMS" field.
find_options & max(bsoncxx::v1::document::value max)
Set the "max" field.
find_options & projection(bsoncxx::v1::document::value projection)
Set the "projection" field.
find_options & hint(v1::hint index_hint)
Set the "hint" field.
Declares mongocxx::v1::find_options.
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 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.
The top-level namespace within which all mongocxx library entities are declared.
Provides mongocxx::v1::cursor.
Declares bsoncxx::v1::document::value.
Declares bsoncxx::v1::document::view.
Declares mongocxx::v1::hint.
Declares mongocxx::v1::read_preference.
Provides std::optional-related polyfills for library API usage.
Declares bsoncxx::v1::types::value.
Declares non-owning, read-only entities representing a BSON type value.