MongoDB C++ Driver 4.3.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
31
33
36
37#include <chrono>
38#include <cstdint>
39
40namespace mongocxx {
41namespace v1 {
42
75 private:
76 class impl;
77 void* _impl;
78
79 public:
86
94
102
107
112
120
125
129 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) allow_disk_use() const;
130
135
140
145
149 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int32_t>) batch_size() const;
150
155
159 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) collation() const;
160
165
169 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::types::view>) comment() const;
170
175
179 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<cursor::type>) cursor_type() const;
180
185
189 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::hint>) hint() const;
190
195
199 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view> const) let() const;
200
205
209 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int64_t>) limit() const;
210
215
219 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) max() const;
220
225
229 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::chrono::milliseconds>) max_await_time() const;
230
235
239 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::chrono::milliseconds>) max_time() const;
240
245
249 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) min() const;
250
255
259 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) no_cursor_timeout() const;
260
265
269 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) projection() const;
270
275
280
285
290
295
299 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) return_key() const;
300
305
309 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) show_record_id() const;
310
315
319 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int64_t>) skip() const;
320
324 MONGOCXX_ABI_EXPORT_CDECL(find_options&) sort(bsoncxx::v1::document::value ordering);
325
329 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) sort() const;
330
331 class internal;
332};
333
334} // namespace v1
335} // namespace mongocxx
336
337#include <mongocxx/v1/detail/postlude.hpp>
338
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 & read_concern(v1::read_concern rc)
Set the "readConcern" 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_concern.
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.