94 if (_read_preference) {
146 _hint = std::move(index_hint);
296 _read_preference = std::move(rp);
309 return _read_preference;
333 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
count()=default
Default initialization.
Options for a "countDocuments" operation.
Definition count_options.hpp:58
count_options & collation(bsoncxx::v1::document::value collation)
Set the "collation" field.
count_options & max_time(std::chrono::milliseconds max_time)
Set the "maxTimeMS" field.
count_options & limit(std::int64_t limit)
Set the "limit" field.
count_options & hint(v1::hint index_hint)
Set the "hint" field.
count_options & read_preference(v1::read_preference rp)
Set the "readPreference" field.
count_options & comment(bsoncxx::v1::types::value comment)
Set the "comment" field.
count_options & skip(std::int64_t skip)
Set the "skip" field.
The index to "hint" or force a MongoDB server to use when performing a query.
Definition hint.hpp:42
Used by mongocxx::v_noabi::collection::count_documents.
Definition count.hpp:49
bsoncxx::v_noabi::stdx::optional< v_noabi::read_preference > const & read_preference() const
The current read_preference for this operation.
Definition count.hpp:308
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & collation() const
Retrieves the current collation for this operation.
Definition count.hpp:128
count & read_preference(v_noabi::read_preference rp)
Sets the read_preference for this operation.
Definition count.hpp:295
count & skip(std::int64_t skip)
Sets the number of documents to skip before counting documents.
Definition count.hpp:265
count & max_time(std::chrono::milliseconds max_time)
Sets the maximum amount of time for this operation to run (server-side) in milliseconds.
Definition count.hpp:235
count & limit(std::int64_t limit)
Sets the maximum number of documents to count.
Definition count.hpp:205
bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > const & max_time() const
The current max_time setting.
Definition count.hpp:248
count()=default
Default initialization.
bsoncxx::v_noabi::stdx::optional< std::int64_t > const & limit() const
Gets the current limit.
Definition count.hpp:218
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const & comment() const
Gets the current value of the comment option.
Definition count.hpp:188
count & comment(bsoncxx::v_noabi::types::bson_value::view_or_value comment)
Set the value of the comment option.
Definition count.hpp:175
count & hint(v_noabi::hint index_hint)
Sets the index to use for this operation.
Definition count.hpp:145
bsoncxx::v_noabi::stdx::optional< v_noabi::hint > const & hint() const
Gets the current hint.
Definition count.hpp:158
operator v1::count_options() const
Convert to the mongocxx::v1 equivalent.
Definition count.hpp:64
bsoncxx::v_noabi::stdx::optional< std::int64_t > const & skip() const
Gets the current number of documents to skip.
Definition count.hpp:278
count & collation(bsoncxx::v_noabi::document::view_or_value collation)
Sets the collation for this operation.
Definition count.hpp:114
Describes how MongoDB clients route read operations to the members of a replica set or sharded cluste...
Definition read_preference.hpp:59
Declares mongocxx::v_noabi::options::count.
Provides mongocxx::v1::count_options.
Provides bsoncxx::v_noabi::document::view_or_value.
#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::types::bson_value::view_or_value.
Provides bsoncxx::v1::document::value.
Provides bsoncxx::v1::types::value.
Provides bsoncxx::v_noabi::document::view.
Provides std::optional-related polyfills for library API usage.
Provides bsoncxx::v_noabi::types::bson_value::view.
Provides mongocxx::v_noabi::hint.
Provides mongocxx::v_noabi::read_preference.