MongoDB C++ Driver
mongocxx-3.10.2
|
Class representing a hint to be passed to a database operation. More...
#include <hint.hpp>
Public Member Functions | |
hint (bsoncxx::v_noabi::document::view_or_value index) | |
Constructs a new hint. More... | |
hint (bsoncxx::v_noabi::string::view_or_value index) | |
Constructs a new hint. More... | |
bsoncxx::v_noabi::types::bson_value::view | to_value () const |
Returns a types::bson_value::view representing this hint. More... | |
operator bsoncxx::v_noabi::types::bson_value::view () const | |
Returns a types::bson_value::view representing this hint. More... | |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (std::string index, const hint &index_hint) |
Convenience methods to compare for equality against an index name. More... | |
bool | operator== (bsoncxx::v_noabi::document::view index, const hint &index_hint) |
Convenience methods to compare for equality against an index document. More... | |
bool | operator!= (const hint &index_hint, std::string index) |
Convenience methods to compare for inequality against an index name. More... | |
bool | operator!= (const hint &index_hint, bsoncxx::v_noabi::document::view index) |
Convenience methods to compare for equality against an index document. More... | |
bool | operator== (const hint &index_hint, std::string index) |
Compare this hint to a string for (in)-equality. | |
bool | operator== (const hint &index_hint, bsoncxx::v_noabi::document::view index) |
Compare this hint to a string for (in)-equality. | |
Class representing a hint to be passed to a database operation.
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.
index | Document view or value representing the index to be used. |
|
explicit |
Constructs a new hint.
index | String representing the name of the index to be used. |
mongocxx::v_noabi::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 mongocxx::v_noabi::hint::to_value | ( | ) | const |
Returns a types::bson_value::view representing this hint.
|
related |
Convenience methods to compare for equality against an index document.
Return true if this hint contains an index document that matches.
|
related |
Convenience methods to compare for inequality against an index name.
Return true if this hint contains an index name that matches.
|
related |
Convenience methods to compare for equality against an index document.
Return true if this hint contains an index document that matches.
|
related |
Convenience methods to compare for equality against an index name.
Return true if this hint contains an index name that matches.