MongoDB C++ Driver mongocxx-3.10.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongocxx::v_noabi::options::count Class Reference

Class representing the optional arguments to mongocxx::v_noabi::collection::count_documents. More...

#include <count.hpp>

Public Member Functions

countcollation (bsoncxx::v_noabi::document::view_or_value collation)
 Sets the collation for this operation.
 
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & collation () const
 Retrieves the current collation for this operation.
 
counthint (mongocxx::v_noabi::hint index_hint)
 Sets the index to use for this operation.
 
const stdx::optional< mongocxx::v_noabi::hint > & hint () const
 Gets the current hint.
 
countcomment (bsoncxx::v_noabi::types::bson_value::view_or_value comment)
 Set the value of the comment option.
 
const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & comment () const
 Gets the current value of the comment option.
 
countlimit (std::int64_t limit)
 Sets the maximum number of documents to count.
 
const stdx::optional< std::int64_t > & limit () const
 Gets the current limit.
 
countmax_time (std::chrono::milliseconds max_time)
 Sets the maximum amount of time for this operation to run (server-side) in milliseconds.
 
const stdx::optional< std::chrono::milliseconds > & max_time () const
 The current max_time setting.
 
countskip (std::int64_t skip)
 Sets the number of documents to skip before counting documents.
 
const stdx::optional< std::int64_t > & skip () const
 Gets the current number of documents to skip.
 
countread_preference (mongocxx::v_noabi::read_preference rp)
 Sets the read_preference for this operation.
 
const stdx::optional< mongocxx::v_noabi::read_preference > & read_preference () const
 The current read_preference for this operation.
 

Detailed Description

Class representing the optional arguments to mongocxx::v_noabi::collection::count_documents.

Member Function Documentation

◆ collation() [1/2]

const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & mongocxx::v_noabi::options::count::collation ( ) const

Retrieves the current collation for this operation.

Returns
The current collation.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ collation() [2/2]

count & mongocxx::v_noabi::options::count::collation ( bsoncxx::v_noabi::document::view_or_value  collation)

Sets the collation for this operation.

Parameters
collationThe new collation.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ comment() [1/2]

const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & mongocxx::v_noabi::options::count::comment ( ) const

Gets the current value of the comment option.

Returns
The current comment option.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ comment() [2/2]

count & mongocxx::v_noabi::options::count::comment ( bsoncxx::v_noabi::types::bson_value::view_or_value  comment)

Set the value of the comment option.

Parameters
commentThe new comment option.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ hint() [1/2]

const stdx::optional< mongocxx::v_noabi::hint > & mongocxx::v_noabi::options::count::hint ( ) const

Gets the current hint.

Returns
The current hint, if one is set.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ hint() [2/2]

count & mongocxx::v_noabi::options::count::hint ( mongocxx::v_noabi::hint  index_hint)

Sets the index to use for this operation.

Parameters
index_hintObject representing the index to use.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ limit() [1/2]

const stdx::optional< std::int64_t > & mongocxx::v_noabi::options::count::limit ( ) const

Gets the current limit.

Returns
The current limit.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ limit() [2/2]

count & mongocxx::v_noabi::options::count::limit ( std::int64_t  limit)

Sets the maximum number of documents to count.

Parameters
limitThe max number of documents to count.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ max_time() [1/2]

const stdx::optional< std::chrono::milliseconds > & mongocxx::v_noabi::options::count::max_time ( ) const

The current max_time setting.

Returns
The current max time (in milliseconds).
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ max_time() [2/2]

count & mongocxx::v_noabi::options::count::max_time ( std::chrono::milliseconds  max_time)

Sets the maximum amount of time for this operation to run (server-side) in milliseconds.

Parameters
max_timeThe max amount of time (in milliseconds).
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ read_preference() [1/2]

const stdx::optional< mongocxx::v_noabi::read_preference > & mongocxx::v_noabi::options::count::read_preference ( ) const

The current read_preference for this operation.

Returns
the current read_preference
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ read_preference() [2/2]

count & mongocxx::v_noabi::options::count::read_preference ( mongocxx::v_noabi::read_preference  rp)

Sets the read_preference for this operation.

Parameters
rpThe new read_preference.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ skip() [1/2]

const stdx::optional< std::int64_t > & mongocxx::v_noabi::options::count::skip ( ) const

Gets the current number of documents to skip.

Returns
The number of documents to skip.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

◆ skip() [2/2]

count & mongocxx::v_noabi::options::count::skip ( std::int64_t  skip)

Sets the number of documents to skip before counting documents.

Parameters
skipThe number of documents to skip.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://www.mongodb.com/docs/manual/reference/command/aggregate/

The documentation for this class was generated from the following file: