17#include <bsoncxx/document/value.hpp>
18#include <bsoncxx/document/view_or_value.hpp>
19#include <bsoncxx/stdx/optional.hpp>
20#include <bsoncxx/string/view_or_value.hpp>
21#include <bsoncxx/types/bson_value/view.hpp>
22#include <mongocxx/stdx.hpp>
24#include <mongocxx/config/prelude.hpp>
27inline namespace v_noabi {
42 hint(bsoncxx::document::view_or_value index);
50 explicit hint(bsoncxx::string::view_or_value index);
59 friend MONGOCXX_API
bool MONGOCXX_CALL
operator==(
const hint& index_hint, std::string index);
62 bsoncxx::document::view index);
86 stdx::optional<bsoncxx::document::view_or_value> _index_doc;
87 stdx::optional<bsoncxx::string::view_or_value> _index_string;
97MONGOCXX_API
bool MONGOCXX_CALL
operator==(std::string index,
const hint& index_hint);
108MONGOCXX_API
bool MONGOCXX_CALL
operator!=(
const hint& index_hint, std::string index);
109MONGOCXX_API
bool MONGOCXX_CALL operator!=(std::string index,
const hint& index_index);
121MONGOCXX_API
bool MONGOCXX_CALL
operator==(bsoncxx::document::view index,
const hint& index_hint);
133MONGOCXX_API
bool MONGOCXX_CALL
operator!=(
const hint& index_hint, bsoncxx::document::view index);
134MONGOCXX_API
bool MONGOCXX_CALL operator!=(bsoncxx::document::view index,
const hint& index_hint);
146#include <mongocxx/config/postlude.hpp>
A view-only variant that can contain any BSON type.
Definition view.hpp:44
Class representing a hint to be passed to a database operation.
Definition hint.hpp:31
bool operator==(bsoncxx::document::view index, const hint &index_hint)
Convenience methods to compare for equality against an index document.
bsoncxx::types::bson_value::view to_value() const
Returns a types::bson_value::view representing this hint.
friend bool operator==(const hint &index_hint, std::string index)
Compare this hint to a string for (in)-equality.
friend bool operator==(const hint &index_hint, bsoncxx::document::view index)
Compare this hint to a string for (in)-equality.
bool operator==(std::string index, const hint &index_hint)
Convenience methods to compare for equality against an index name.
bool operator!=(const hint &index_hint, std::string index)
Convenience methods to compare for inequality against an index name.
bool operator!=(const hint &index_hint, bsoncxx::document::view index)
Convenience methods to compare for equality against an index document.
hint(bsoncxx::document::view_or_value index)
Constructs a new hint.
hint(bsoncxx::string::view_or_value index)
Constructs a new hint.
The top-level namespace for mongocxx library entities.
Definition bulk_write.hpp:24