MongoDB C++ Driver
mongocxx-3.6.2
|
20 #include <bsoncxx/document/view.hpp>
21 #include <bsoncxx/stdx/optional.hpp>
22 #include <bsoncxx/string/view_or_value.hpp>
23 #include <mongocxx/stdx.hpp>
25 #include <bsoncxx/document/value.hpp>
26 #include <bsoncxx/document/view_or_value.hpp>
27 #include <mongocxx/config/prelude.hpp>
30 MONGOCXX_INLINE_NAMESPACE_BEGIN
52 MONGOCXX_PRIVATE
virtual int type()
const = 0;
75 const stdx::optional<bsoncxx::string::view_or_value>&
config_string()
const;
79 MONGOCXX_PRIVATE
int type()
const override;
80 stdx::optional<bsoncxx::string::view_or_value> _config_string;
127 const stdx::optional<bool>&
unique()
const;
149 const stdx::optional<bool>&
hidden()
const;
168 const stdx::optional<bsoncxx::string::view_or_value>&
name()
const;
194 const stdx::optional<bsoncxx::document::view>&
collation()
const;
216 const stdx::optional<bool>&
sparse()
const;
279 const stdx::optional<std::int32_t>&
version()
const;
299 const stdx::optional<bsoncxx::document::view>&
weights()
const;
454 index& haystack_bucket_size_deprecated(
double haystack_bucket_size);
465 const stdx::optional<double>& haystack_bucket_size_deprecated()
const;
479 stdx::optional<bool> _background;
480 stdx::optional<bool> _unique;
481 stdx::optional<bool> _hidden;
482 stdx::optional<bsoncxx::string::view_or_value> _name;
483 stdx::optional<bsoncxx::document::view> _collation;
484 stdx::optional<bool> _sparse;
485 std::unique_ptr<base_storage_options> _storage_options;
486 stdx::optional<std::chrono::seconds> _expire_after;
487 stdx::optional<std::int32_t> _version;
488 stdx::optional<bsoncxx::document::view> _weights;
489 stdx::optional<bsoncxx::string::view_or_value> _default_language;
490 stdx::optional<bsoncxx::string::view_or_value> _language_override;
491 stdx::optional<bsoncxx::document::view> _partial_filter_expression;
492 stdx::optional<std::uint8_t> _twod_sphere_version;
493 stdx::optional<std::uint8_t> _twod_bits_precision;
494 stdx::optional<double> _twod_location_min;
495 stdx::optional<double> _twod_location_max;
496 stdx::optional<double> _haystack_bucket_size;
501 const std::unique_ptr<base_storage_options>& storage_options()
const;
505 MONGOCXX_INLINE_NAMESPACE_END
508 #include <mongocxx/config/postlude.hpp>
const stdx::optional< bsoncxx::document::view > & collation() const
Retrieves the current collation for this index.
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24
const stdx::optional< bool > & sparse() const
The current sparse setting.
const stdx::optional< bsoncxx::string::view_or_value > & language_override() const
The current name of the field that contains the override language for text indexes.
index & version(std::int32_t v)
Sets the index version.
const stdx::optional< bool > & background() const
The current background setting.
Class representing the optional arguments to a MongoDB create index operation.
Definition: index.hpp:41
index & background(bool background)
Whether or not to build the index in the background so that building the index does not block other d...
index & unique(bool unique)
Whether or not to create a unique index so that the collection will not accept insertion of documents...
MONGOCXX_DEPRECATED index & haystack_bucket_size(double haystack_bucket_size)
For geoHaystack indexes, specify the number of units within which to group the location values; i....
void config_string(bsoncxx::string::view_or_value config_string)
Set the WiredTiger configuration string.
index & partial_filter_expression(bsoncxx::document::view partial_filter_expression)
Sets the document for the partial filter expression for partial indexes.
index & twod_bits_precision(std::uint8_t twod_bits_precision)
For 2d indexes, the precision of the stored geohash value of the location data.
index & storage_options(std::unique_ptr< base_storage_options > storage_options)
Optionally used only in MongoDB 3.0.0 and higher.
index & twod_sphere_version(std::uint8_t twod_sphere_version)
For 2dsphere indexes, the 2dsphere index version number.
Class representing the optional WiredTiger storage engine options for indexes.
Definition: index.hpp:58
MONGOCXX_DEPRECATED const stdx::optional< double > & haystack_bucket_size() const
The current haystack_bucket_size setting.
index & default_language(bsoncxx::string::view_or_value default_language)
For text indexes, the language that determines the list of stop words and the rules for the stemmer a...
index & sparse(bool sparse)
Whether or not to create a sparse index.
Class representing a view-or-value variant type for strings.
Definition: view_or_value.hpp:36
const stdx::optional< bsoncxx::string::view_or_value > & name() const
The current name setting.
index & hidden(bool hidden)
Whether or not the index is hidden from the query planner.
index & twod_location_min(double twod_location_min)
For 2d indexes, the lower inclusive boundary for the longitude and latitude values.
const stdx::optional< bool > & unique() const
The current unique setting.
index & collation(bsoncxx::document::view collation)
Sets the collation for this index.
index & expire_after(std::chrono::seconds seconds)
Set a value, in seconds, as a TTL to control how long MongoDB retains documents in this collection.
const stdx::optional< std::uint8_t > & twod_sphere_version() const
The current twod_sphere_version setting.
index & storage_options(std::unique_ptr< wiredtiger_storage_options > storage_options)
Optionally used only in MongoDB 3.0.0 and higher.
index & name(bsoncxx::string::view_or_value name)
The name of the index.
const stdx::optional< double > & twod_location_max() const
The current upper inclusive boundary for the longitude and latitude values.
const stdx::optional< std::int32_t > & version() const
The current index version.
Base class representing the optional storage engine options for indexes.
Definition: index.hpp:46
const stdx::optional< bsoncxx::document::view > & weights() const
The current weights setting.
const stdx::optional< bsoncxx::document::view > & partial_filter_expression() const
The current partial_filter_expression setting.
const stdx::optional< std::uint8_t > & twod_bits_precision() const
The current precision of the stored geohash value of the location data.
const stdx::optional< std::chrono::seconds > & expire_after() const
The current expire_after setting.
const stdx::optional< bsoncxx::string::view_or_value > & default_language() const
The current default_language setting.
const stdx::optional< bool > & hidden() const
The current hidden setting.
const stdx::optional< bsoncxx::string::view_or_value > & config_string() const
The current config_string setting.
index & language_override(bsoncxx::string::view_or_value language_override)
For text indexes, the name of the field, in the collection’s documents, that contains the override la...
const stdx::optional< double > & twod_location_min() const
The current lower inclusive boundary for the longitude and latitude values.
Class representing server side document groupings within a MongoDB database.
Definition: collection.hpp:81
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33
index & weights(bsoncxx::document::view weights)
For text indexes, sets the weight document.
index & twod_location_max(double twod_location_max)
For 2d indexes, the upper inclusive boundary for the longitude and latitude values.