MongoDB C++ Driver mongocxx-3.11.0
Loading...
Searching...
No Matches
mongocxx::v_noabi::hint Class Reference

#include <mongocxx/v_noabi/mongocxx/hint.hpp>

Description

Class representing a hint to be passed to a database operation.

Public Member Functions

 hint (bsoncxx::v_noabi::document::view_or_value index)
 Constructs a new hint.
 
 hint (bsoncxx::v_noabi::string::view_or_value index)
 Constructs a new hint.
 
 operator bsoncxx::v_noabi::types::bson_value::view () const
 Returns a types::bson_value::view representing this hint.
 
bsoncxx::v_noabi::types::bson_value::view to_value () const
 Returns a types::bson_value::view representing this hint.
 

Related Symbols

(Note that these are not member symbols.)

bool operator== (const hint &index_hint, bsoncxx::v_noabi::document::view index)
 Convenience methods to compare for equality against an index document.
 
bool operator== (const hint &index_hint, std::string index)
 Convenience methods to compare for equality against an index name.
 
bool operator== (std::string index, const hint &index_hint)
 Convenience methods to compare against an index name.
 
bool operator!= (const hint &index_hint, std::string index)
 Convenience methods to compare against an index name.
 
bool operator!= (std::string index, const hint &index_index)
 Convenience methods to compare against an index name.
 
bool operator== (bsoncxx::v_noabi::document::view index, const hint &index_hint)
 Convenience methods to compare for equality against an index document.
 
bool operator!= (const hint &index_hint, bsoncxx::v_noabi::document::view index)
 Convenience methods to compare for equality against an index document.
 
bool operator!= (bsoncxx::v_noabi::document::view index, const hint &index_hint)
 Convenience methods to compare for equality against an index document.
 

Constructor & Destructor Documentation

◆ hint() [1/2]

mongocxx::v_noabi::hint::hint ( bsoncxx::v_noabi::document::view_or_value index)

Constructs a new hint.

Note: this constructor is purposefully not explicit, to allow conversion from either document::view or document::value to view_or_value.

Parameters
indexDocument view or value representing the index to be used.

◆ hint() [2/2]

mongocxx::v_noabi::hint::hint ( bsoncxx::v_noabi::string::view_or_value index)
explicit

Constructs a new hint.

Parameters
indexString representing the name of the index to be used.

Member Function Documentation

◆ operator bsoncxx::v_noabi::types::bson_value::view()

mongocxx::v_noabi::hint::operator bsoncxx::v_noabi::types::bson_value::view ( ) const
inline

Returns a types::bson_value::view representing this hint.

Returns
Hint, as a types::bson_value::view. The caller must ensure that the returned object not outlive the hint object that it was created from.

◆ to_value()

bsoncxx::v_noabi::types::bson_value::view mongocxx::v_noabi::hint::to_value ( ) const

Returns a types::bson_value::view representing this hint.

Returns
Hint, as a types::bson_value::view. The caller must ensure that the returned object not outlive the hint object that it was created from.

Friends And Related Symbol Documentation

◆ operator!=() [1/4]

bool operator!= ( bsoncxx::v_noabi::document::view index,
const hint & index_hint )
related

Convenience methods to compare for equality against an index document.

Compares equal if the hint contains a matching index document. Otherwise, compares unequal.

◆ operator!=() [2/4]

bool operator!= ( const hint & index_hint,
bsoncxx::v_noabi::document::view index )
related

Convenience methods to compare for equality against an index document.

Compares equal if the hint contains a matching index document. Otherwise, compares unequal.

◆ operator!=() [3/4]

bool operator!= ( const hint & index_hint,
std::string index )
related

Convenience methods to compare against an index name.

Compares equal if the hint contains a matching index name. Otherwise, compares unequal.

◆ operator!=() [4/4]

bool operator!= ( std::string index,
const hint & index_index )
related

Convenience methods to compare against an index name.

Compares equal if the hint contains a matching index name. Otherwise, compares unequal.

◆ operator==() [1/4]

bool operator== ( bsoncxx::v_noabi::document::view index,
const hint & index_hint )
related

Convenience methods to compare for equality against an index document.

Compares equal if the hint contains a matching index document. Otherwise, compares unequal.

◆ operator== [2/4]

bool operator== ( const hint & index_hint,
bsoncxx::v_noabi::document::view index )
friend

Convenience methods to compare for equality against an index document.

Compares equal if the hint contains a matching index document. Otherwise, compares unequal.

◆ operator== [3/4]

bool operator== ( const hint & index_hint,
std::string index )
friend

Convenience methods to compare for equality against an index name.

Compares equal if the hint contains a matching index name. Otherwise, compares unequal.

◆ operator==() [4/4]

bool operator== ( std::string index,
const hint & index_hint )
related

Convenience methods to compare against an index name.

Compares equal if the hint contains a matching index name. Otherwise, compares unequal.


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