#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.
Public Member Functions | |
| hint () | |
| Default initialization. | |
| hint (bsoncxx::v1::document::value doc) | |
| Return the current "hint" option as a document. | |
| hint (hint &&other) noexcept | |
| Move constructor. | |
| hint (hint const &other) | |
| Copy construction. | |
| hint (std::string str) | |
| Initialize this "hint" option as a document. | |
| ~hint () | |
| Destroy this object. | |
| bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > | doc () const |
| Return the current "hint" value as a document. | |
| operator bsoncxx::v1::types::view () const | |
| Equivalent to to_value() const. | |
| hint & | operator= (hint &&other) noexcept |
| Move assignment. | |
| hint & | operator= (hint const &other) |
| Copy assignment. | |
| bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | str () const |
| Return the current "hint" value as a string. | |
| bsoncxx::v1::types::view | to_value () const |
| Return the current "hint" value as a BSON type value. | |
Friends | |
| 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. | |
| mongocxx::v1::hint::~hint | ( | ) |
Destroy this object.
|
noexcept |
Move constructor.
| mongocxx::v1::hint::hint | ( | hint const & | other | ) |
Copy construction.
| mongocxx::v1::hint::hint | ( | ) |
|
explicit |
Initialize this "hint" option as a document.
|
explicit |
Return the current "hint" option as a document.
| bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::hint::doc | ( | ) | const |
Return the current "hint" value as a document.
| mongocxx::v1::hint::operator bsoncxx::v1::types::view | ( | ) | const |
Equivalent to to_value() const.
Move assignment.
| bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::hint::str | ( | ) | const |
Return the current "hint" value as a string.
| bsoncxx::v1::types::view mongocxx::v1::hint::to_value | ( | ) | const |
Return the current "hint" value as a BSON type value.
|
friend |
Equivalent to comparing h.doc() and doc.
|
friend |
Equivalent to comparing h.str() with str.
|
friend |
Equivalent to comparing h.doc() and doc.
|
friend |
Equivalent to comparing h.str() with str.
Compare equal when the underlying "hint" values compare equal.
|
friend |
Equivalent to comparing h.doc() and doc.
|
friend |
Equivalent to comparing h.str() with str.
|
friend |
Equivalent to comparing h.doc() and doc.
|
friend |
Equivalent to comparing h.str() with str.
Compare equal when the underlying "hint" values compare equal.