76 if (_allow_disk_use) {
80 if (_allow_partial_results) {
104 if (_comment_option) {
106 }
else if (_comment) {
118 if (_max_await_time) {
130 if (_no_cursor_timeout) {
138 if (_read_preference) {
150 if (_show_record_id) {
196 return _allow_disk_use;
214 _allow_partial_results = allow_partial;
227 return _allow_partial_results;
373 _hint = std::move(index_hint);
403 _let = std::move(
let);
436 _comment_option = std::move(
comment);
452 return _comment_option;
498 _max = std::move(
max);
547 return _max_await_time;
594 _min = std::move(
min);
638 return _no_cursor_timeout;
685 _read_preference = std::move(rp);
699 return _read_preference;
716 _read_concern = std::move(rc);
730 return _read_concern;
797 return _show_record_id;
845 _ordering = std::move(ordering);
897 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:74
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 & read_concern(v1::read_concern rc)
Set the "readConcern" 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:52
find & read_concern(v_noabi::read_concern rc)
Sets the read_concern for this operation.
Definition find.hpp:715
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:287
bsoncxx::v_noabi::stdx::optional< cursor::type > const & cursor_type() const
Gets the current cursor type.
Definition find.hpp:352
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:606
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:844
find & let(bsoncxx::v_noabi::document::view_or_value let)
Set the value of the let option.
Definition find.hpp:402
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:532
bsoncxx::v_noabi::stdx::optional< v_noabi::hint > const & hint() const
Gets the current hint.
Definition find.hpp:385
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:748
find & comment_option(bsoncxx::v_noabi::types::bson_value::view_or_value comment)
Set the value of the comment option.
Definition find.hpp:435
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:857
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:624
find & hint(v_noabi::hint index_hint)
Sets the index to use for this operation.
Definition find.hpp:372
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:213
bsoncxx::v_noabi::stdx::optional< bool > const & allow_partial_results() const
Gets the current setting for allowing partial results from mongos.
Definition find.hpp:226
find()=default
Default initialization.
bsoncxx::v_noabi::stdx::optional< std::int64_t > const & limit() const
Gets the current limit.
Definition find.hpp:480
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:183
find & limit(std::int64_t limit)
Sets maximum number of documents to return.
Definition find.hpp:467
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:416
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:796
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:563
bsoncxx::v_noabi::stdx::optional< std::int32_t > const & batch_size() const
The current batch size setting.
Definition find.hpp:256
find & cursor_type(cursor::type cursor_type)
Indicates the type of cursor to use for this query.
Definition find.hpp:339
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:781
find & min(bsoncxx::v_noabi::document::view_or_value min)
Gets the current inclusive lower bound for a specific index.
Definition find.hpp:593
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:195
bsoncxx::v_noabi::stdx::optional< bool > const & no_cursor_timeout() const
Gets the current no_cursor_timeout setting.
Definition find.hpp:637
operator v1::find_options() const
Convert to the mongocxx::v1 equivalent.
Definition find.hpp:70
find & skip(std::int64_t skip)
Sets the number of documents to skip before returning results.
Definition find.hpp:813
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:451
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:307
bsoncxx::v_noabi::stdx::optional< std::int64_t > const & skip() const
Gets the current number of documents to skip.
Definition find.hpp:826
find & read_preference(v_noabi::read_preference rp)
Sets the read_preference for this operation.
Definition find.hpp:684
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:654
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:546
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:510
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:322
find & max(bsoncxx::v_noabi::document::view_or_value max)
Gets the current exclusive upper bound for a specific index.
Definition find.hpp:497
bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > const & max_time() const
The current max_time_ms setting.
Definition find.hpp:576
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:667
find & batch_size(std::int32_t batch_size)
Sets the number of documents to return per batch.
Definition find.hpp:243
bsoncxx::v_noabi::stdx::optional< v_noabi::read_preference > const & read_preference() const
The current read_preference for this operation.
Definition find.hpp:698
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:764
bsoncxx::v_noabi::stdx::optional< v_noabi::read_concern > const & read_concern() const
The current read_concern for this operation.
Definition find.hpp:729
find & collation(bsoncxx::v_noabi::document::view_or_value collation)
Sets the collation for this operation.
Definition find.hpp:273
Controls the consistency and isolation properties of data read from replica sets and sharded clusters...
Definition read_concern.hpp:54
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_concern.
Provides mongocxx::v_noabi::read_preference.