#include <mongocxx/v1/hint.hpp>
Options related to a MongoDB query hint.
A document or string that specifies the index to use to support the query predicate.
- See also
-
|
| bool | operator== (hint const &lhs, hint const &rhs) |
| | Compare equal when the underlying "hint" values compare equal.
|
| bool | operator!= (hint const &lhs, hint const &rhs) |
| | Compare equal when the underlying "hint" values compare equal.
|
| bool | operator== (hint const &h, bsoncxx::v1::stdx::string_view str) |
| | Equivalent to comparing h.str() with str.
|
| bool | operator!= (hint const &h, bsoncxx::v1::stdx::string_view str) |
| | Equivalent to comparing h.str() with str.
|
| bool | operator== (bsoncxx::v1::stdx::string_view str, hint const &h) |
| | Equivalent to comparing h.str() with str.
|
| bool | operator!= (bsoncxx::v1::stdx::string_view str, hint const &h) |
| | Equivalent to comparing h.str() with str.
|
| bool | operator== (hint const &h, bsoncxx::v1::document::view doc) |
| | Equivalent to comparing h.doc() and doc.
|
| bool | operator!= (hint const &h, bsoncxx::v1::document::view doc) |
| | Equivalent to comparing h.doc() and doc.
|
| bool | operator== (bsoncxx::v1::document::view doc, hint const &h) |
| | Equivalent to comparing h.doc() and doc.
|
| bool | operator!= (bsoncxx::v1::document::view doc, hint const &h) |
| | Equivalent to comparing h.doc() and doc.
|
◆ ~hint()
| mongocxx::v1::hint::~hint |
( |
| ) |
|
Destroy this object.
- Warning
- Invalidates all associated views.
◆ hint() [1/5]
| mongocxx::v1::hint::hint |
( |
hint && | other | ) |
|
|
noexcept |
Move constructor.
- Postconditions:
- other is in an assign-or-destroy-only state.
◆ hint() [2/5]
| mongocxx::v1::hint::hint |
( |
hint const & | other | ) |
|
◆ hint() [3/5]
| mongocxx::v1::hint::hint |
( |
| ) |
|
Default initialization.
- Postconditions:
- this->str().has_value() == false
- this->doc().has_value() == false
◆ hint() [4/5]
| mongocxx::v1::hint::hint |
( |
std::string | str | ) |
|
|
explicit |
Initialize this "hint" option as a document.
◆ hint() [5/5]
Return the current "hint" option as a document.
◆ doc()
Return the current "hint" value as a document.
- Returns
- Empty when not a document.
◆ operator bsoncxx::v1::types::view()
◆ operator=() [1/2]
| hint & mongocxx::v1::hint::operator= |
( |
hint && | other | ) |
|
|
noexcept |
Move assignment.
- Postconditions:
- other is in an assign-or-destroy-only state.
◆ operator=() [2/2]
| hint & mongocxx::v1::hint::operator= |
( |
hint const & | other | ) |
|
◆ str()
Return the current "hint" value as a string.
- Returns
- Empty when not a string.
◆ to_value()
Return the current "hint" value as a BSON type value.
◆ operator!= [1/5]
Equivalent to comparing h.doc() and doc.
◆ operator!= [2/5]
Equivalent to comparing h.str() with str.
◆ operator!= [3/5]
Equivalent to comparing h.doc() and doc.
◆ operator!= [4/5]
Equivalent to comparing h.str() with str.
◆ operator!= [5/5]
| bool operator!= |
( |
hint const & | lhs, |
|
|
hint const & | rhs ) |
|
friend |
Compare equal when the underlying "hint" values compare equal.
◆ operator== [1/5]
Equivalent to comparing h.doc() and doc.
◆ operator== [2/5]
Equivalent to comparing h.str() with str.
◆ operator== [3/5]
Equivalent to comparing h.doc() and doc.
◆ operator== [4/5]
Equivalent to comparing h.str() with str.
◆ operator== [5/5]
| bool operator== |
( |
hint const & | lhs, |
|
|
hint const & | rhs ) |
|
friend |
Compare equal when the underlying "hint" values compare equal.
The documentation for this class was generated from the following file: