75 if (_allow_disk_use) {
79 if (_allow_partial_results) {
103 if (_comment_option) {
105 }
else if (_comment) {
117 if (_max_await_time) {
129 if (_no_cursor_timeout) {
137 if (_read_preference) {
145 if (_show_record_id) {
191 return _allow_disk_use;
209 _allow_partial_results = allow_partial;
222 return _allow_partial_results;
368 _hint = std::move(index_hint);
398 _let = std::move(
let);
431 _comment_option = std::move(
comment);
447 return _comment_option;
493 _max = std::move(
max);
542 return _max_await_time;
589 _min = std::move(
min);
633 return _no_cursor_timeout;
680 _read_preference = std::move(rp);
694 return _read_preference;
761 return _show_record_id;
809 _ordering = std::move(ordering);
860 return {std::move(v)};
A BSON document.
Definition value.hpp:46
A polyfill for std::optional<T>.
Definition optional.hpp:799
A union of BSON type values.
Definition value.hpp:54
A view-or-value variant type for strings.
Definition view_or_value.hpp:41
find()=default
Default initialization.
type
Enumeration identifying the type of the cursor.
Definition cursor.hpp:50
Options for a "find" command.
Definition find_options.hpp:72
find_options & collation(bsoncxx::v1::document::value collation)
Set the "collation" field.
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 & 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.
The index to "hint" or force a MongoDB server to use when performing a query.
Definition hint.hpp:42
Used by MongoDB find operations.
Definition find.hpp:51
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & collation() const
Retrieves the current collation for this operation.
Definition find.hpp:282
bsoncxx::v_noabi::stdx::optional< cursor::type > const & cursor_type() const
Gets the current cursor type.
Definition find.hpp:347
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & min() const
Sets the current inclusive lower bound for a specific index.
Definition find.hpp:601
find & sort(bsoncxx::v_noabi::document::view_or_value ordering)
The order in which to return matching documents. If $orderby also exists in the modifiers document,...
Definition find.hpp:808
find & let(bsoncxx::v_noabi::document::view_or_value let)
Set the value of the let option.
Definition find.hpp:397
find & max_await_time(std::chrono::milliseconds max_await_time)
The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query...
Definition find.hpp:527
bsoncxx::v_noabi::stdx::optional< v_noabi::hint > const & hint() const
Gets the current hint.
Definition find.hpp:380
find & return_key(bool return_key)
Sets whether to return the index keys associated with the query results, instead of the actual query ...
Definition find.hpp:712
find & comment_option(bsoncxx::v_noabi::types::bson_value::view_or_value comment)
Set the value of the comment option.
Definition find.hpp:430
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & sort() const
Gets the current sort ordering for this query.
Definition find.hpp:821
find & no_cursor_timeout(bool no_cursor_timeout)
Sets the cursor flag to prevent cursor from timing out server-side due to a period of inactivity.
Definition find.hpp:619
find & hint(v_noabi::hint index_hint)
Sets the index to use for this operation.
Definition find.hpp:367
find & allow_partial_results(bool allow_partial)
Sets whether to allow partial results from a mongos if some shards are down (instead of throwing an e...
Definition find.hpp:208
bsoncxx::v_noabi::stdx::optional< bool > const & allow_partial_results() const
Gets the current setting for allowing partial results from mongos.
Definition find.hpp:221
find()=default
Default initialization.
bsoncxx::v_noabi::stdx::optional< std::int64_t > const & limit() const
Gets the current limit.
Definition find.hpp:475
find & allow_disk_use(bool allow_disk_use)
Enables writing to temporary files on the server. When set to true, the server can write temporary da...
Definition find.hpp:178
find & limit(std::int64_t limit)
Sets maximum number of documents to return.
Definition find.hpp:462
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const let() const
Gets the current value of the let option.
Definition find.hpp:411
bsoncxx::v_noabi::stdx::optional< bool > const & show_record_id() const
Gets the current setting for whether the record identifier is returned for each document in the query...
Definition find.hpp:760
find & max_time(std::chrono::milliseconds max_time)
Sets the maximum amount of time for this operation to run (server-side) in milliseconds.
Definition find.hpp:558
bsoncxx::v_noabi::stdx::optional< std::int32_t > const & batch_size() const
The current batch size setting.
Definition find.hpp:251
find & cursor_type(cursor::type cursor_type)
Indicates the type of cursor to use for this query.
Definition find.hpp:334
find & show_record_id(bool show_record_id)
Sets whether to include the record identifier for each document in the query results.
Definition find.hpp:745
find & min(bsoncxx::v_noabi::document::view_or_value min)
Gets the current inclusive lower bound for a specific index.
Definition find.hpp:588
bsoncxx::v_noabi::stdx::optional< bool > const & allow_disk_use() const
Gets the current setting for allowing disk use on the server.
Definition find.hpp:190
bsoncxx::v_noabi::stdx::optional< bool > const & no_cursor_timeout() const
Gets the current no_cursor_timeout setting.
Definition find.hpp:632
operator v1::find_options() const
Convert to the mongocxx::v1 equivalent.
Definition find.hpp:69
find & skip(std::int64_t skip)
Sets the number of documents to skip before returning results.
Definition find.hpp:777
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const & comment_option() const
Gets the current value of the comment option.
Definition find.hpp:446
find & comment(bsoncxx::v_noabi::string::view_or_value comment)
Attaches a comment to the query. If $comment also exists in the modifiers document then the comment f...
Definition find.hpp:302
bsoncxx::v_noabi::stdx::optional< std::int64_t > const & skip() const
Gets the current number of documents to skip.
Definition find.hpp:790
find & read_preference(v_noabi::read_preference rp)
Sets the read_preference for this operation.
Definition find.hpp:679
find & projection(bsoncxx::v_noabi::document::view_or_value projection)
Sets a projection which limits the returned fields for all matching documents.
Definition find.hpp:649
bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > const & max_await_time() const
The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query...
Definition find.hpp:541
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & max() const
Sets the current exclusive upper bound for a specific index.
Definition find.hpp:505
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > const & comment() const
Gets the current comment attached to this query.
Definition find.hpp:317
find & max(bsoncxx::v_noabi::document::view_or_value max)
Gets the current exclusive upper bound for a specific index.
Definition find.hpp:492
bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > const & max_time() const
The current max_time_ms setting.
Definition find.hpp:571
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & projection() const
Gets the current projection set on this query.
Definition find.hpp:662
find & batch_size(std::int32_t batch_size)
Sets the number of documents to return per batch.
Definition find.hpp:238
bsoncxx::v_noabi::stdx::optional< v_noabi::read_preference > const & read_preference() const
The current read_preference for this operation.
Definition find.hpp:693
bsoncxx::v_noabi::stdx::optional< bool > const & return_key() const
Gets the current setting for returning the index keys associated with the query results,...
Definition find.hpp:728
find & collation(bsoncxx::v_noabi::document::view_or_value collation)
Sets the collation for this operation.
Definition find.hpp:268
Describes how MongoDB clients route read operations to the members of a replica set or sharded cluste...
Definition read_preference.hpp:59
Provides bsoncxx::v_noabi::document::view_or_value.
Declares mongocxx::v_noabi::options::find.
Provides mongocxx::v1::find_options.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
v_noabi::view_or_value< v_noabi::document::view, v_noabi::document::value > view_or_value
Equivalent to v_noabi::view_or_value<v_noabi::document::view, v_noabi::document::value>.
Definition view_or_value.hpp:30
v_noabi::view_or_value< view, value > view_or_value
Equivalent to v_noabi::view_or_value<view, value>.
Definition view_or_value.hpp:31
v1::element::view to_v1(v_noabi::array::element const &v)
Convert to the bsoncxx::v1 equivalent of v.
Definition element.hpp:132
Declares entities whose ABI stability is guaranteed for documented symbols.
Declares entities representing options to use with various commands.
Declares entities whose ABI stability is NOT guaranteed.
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
The top-level namespace within which all mongocxx library entities are declared.
Provides bsoncxx::v_noabi::string::view_or_value.
Provides bsoncxx::v_noabi::types::bson_value::view_or_value.
Provides mongocxx::v1::cursor.
Provides bsoncxx::v1::document::value.
Provides bsoncxx::v_noabi::document::view.
Provides std::optional-related polyfills for library API usage.
Provides bsoncxx::v_noabi::types::bson_value::value.
Provides bsoncxx::v_noabi::types::bson_value::view.
Provides mongocxx::v_noabi::cursor.
Provides mongocxx::v_noabi::hint.
Provides mongocxx::v_noabi::read_preference.