53 BSONCXX_PRIVATE_WARNINGS_PUSH();
54 BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4251));
55 BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4275));
64 virtual ~base_storage_options();
66 base_storage_options(base_storage_options&&) =
default;
67 base_storage_options& operator=(base_storage_options&&) =
default;
68 base_storage_options(base_storage_options
const&) =
default;
69 base_storage_options& operator=(base_storage_options
const&) =
default;
71 base_storage_options() =
default;
76 virtual int type()
const = 0;
86 ~wiredtiger_storage_options()
override;
88 wiredtiger_storage_options(wiredtiger_storage_options&&) =
default;
89 wiredtiger_storage_options& operator=(wiredtiger_storage_options&&) =
default;
90 wiredtiger_storage_options(wiredtiger_storage_options
const&) =
default;
91 wiredtiger_storage_options& operator=(wiredtiger_storage_options
const&) =
default;
93 wiredtiger_storage_options() =
default;
111 return _config_string;
122 BSONCXX_PRIVATE_WARNINGS_POP();
159 ret.
name(std::string{_name->view()});
172 if (_storage_engine) {
188 if (_default_language) {
192 if (_language_override) {
196 if (_partial_filter_expression) {
200 if (_twod_sphere_version) {
204 if (_twod_bits_precision) {
208 if (_twod_location_min) {
212 if (_twod_location_max) {
264 _unique = std::move(
unique);
292 _hidden = std::move(
hidden);
316 _name = std::move(
name);
375 _sparse = std::move(
sparse);
448 return _storage_engine;
466 _expire_after = std::move(seconds);
476 return _expire_after;
490 _version = std::move(v);
550 return _default_language;
575 return _language_override;
599 return _partial_filter_expression;
623 return _twod_sphere_version;
647 return _twod_bits_precision;
671 return _twod_location_min;
695 return _twod_location_max;
734 return this->haystack_bucket_size_deprecated();
738 return _haystack_bucket_size;
762 bsoncxx::
v_noabi::stdx::optional<std::chrono::seconds> _expire_after;
768 bsoncxx::
v_noabi::stdx::optional<std::uint8_t> _twod_sphere_version;
769 bsoncxx::
v_noabi::stdx::optional<std::uint8_t> _twod_bits_precision;
The bsoncxx v_noabi macro guard postlude header.
The bsoncxx v_noabi macro guard prelude header.
A BSON document.
Definition value.hpp:46
A polyfill for std::optional<T>.
Definition optional.hpp:799
A read-only, non-owning view of a BSON document.
Definition view.hpp:40
A view-or-value variant type for strings.
Definition view_or_value.hpp:41
index()=default
Default initialization.
Options for mongocxx::v1::indexes::model.
Definition indexes.hpp:93
options & collation(bsoncxx::v1::document::value v)
Set the "collation" field.
options & twod_location_min(double v)
Set the "min" field.
options & default_language(std::string v)
Set the "default_language" field.
options & expire_after(std::chrono::seconds v)
Set the "expireAfterSeconds" field.
options & twod_location_max(double v)
Set the "max" field.
options & background(bool v)
Set the "background" field.
options & partial_filter_expression(bsoncxx::v1::document::value v)
Set the "partialFilterExpression" field.
options & language_override(std::string v)
Set the "language_override" field.
options & storage_engine(bsoncxx::v1::document::value v)
Set the "storageEngine" field.
options & version(std::int32_t v)
Set the "version" field.
options & twod_sphere_version(std::uint8_t v)
Set the "2dsphereIndexVersion" field.
options & sparse(bool v)
Set the "sparse" field.
options & weights(bsoncxx::v1::document::value v)
Set the "weights" field.
options & unique(bool v)
Set the "unique" field.
options & hidden(bool v)
Set the "hidden" field.
options & name(std::string v)
Set the "name" field.
options & twod_bits_precision(std::uint8_t v)
Set the "bits" field.
A MongoDB collection.
Definition collection.hpp:98
Base class representing the optional storage engine options for indexes.
Definition index.hpp:62
void config_string(bsoncxx::v_noabi::string::view_or_value config_string)
Set the WiredTiger configuration string.
Definition index.hpp:101
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > const & config_string() const
The current config_string setting.
Definition index.hpp:110
Used by MongoDB index creation operations.
Definition index.hpp:51
bsoncxx::v_noabi::stdx::optional< std::chrono::seconds > const & expire_after() const
The current expire_after setting.
Definition index.hpp:475
index & haystack_bucket_size(double haystack_bucket_size)
For geoHaystack indexes, specify the number of units within which to group the location values; i....
Definition index.hpp:716
index & hidden(bool hidden)
Whether or not the index is hidden from the query planner. A hidden index is not evaluated as part of...
Definition index.hpp:291
index & language_override(bsoncxx::v_noabi::string::view_or_value language_override)
For text indexes, the name of the field, in the collection’s documents, that contains the override la...
Definition index.hpp:564
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view > const & weights() const
The current weights setting.
Definition index.hpp:524
operator v1::indexes::options() const
Convert to the mongocxx::v1 equivalent.
Definition index.hpp:141
index & twod_location_max(double twod_location_max)
For 2d indexes, the upper inclusive boundary for the longitude and latitude values.
Definition index.hpp:684
index & background(bool background)
Whether or not to build the index in the background so that building the index does not block other d...
Definition index.hpp:235
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.
Definition index.hpp:465
index & weights(bsoncxx::v_noabi::document::view weights)
For text indexes, sets the weight document. The weight document contains field and weight pairs.
Definition index.hpp:514
index & unique(bool unique)
Whether or not to create a unique index so that the collection will not accept insertion of documents...
Definition index.hpp:263
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view > const & partial_filter_expression() const
The current partial_filter_expression setting.
Definition index.hpp:598
bsoncxx::v_noabi::stdx::optional< double > const & twod_location_min() const
The current lower inclusive boundary for the longitude and latitude values.
Definition index.hpp:670
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > const & language_override() const
The current name of the field that contains the override language for text indexes.
Definition index.hpp:574
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > const & name() const
The current name setting.
Definition index.hpp:325
bsoncxx::v_noabi::stdx::optional< double > const & haystack_bucket_size() const
The current haystack_bucket_size setting.
Definition index.hpp:733
index & storage_options(std::unique_ptr< base_storage_options > storage_options)
Specifies the storage engine options for the index.
Definition index.hpp:402
bsoncxx::v_noabi::stdx::optional< std::int32_t > const & version() const
The current index version.
Definition index.hpp:499
bsoncxx::v_noabi::stdx::optional< bool > const & sparse() const
The current sparse setting.
Definition index.hpp:384
index & collation(bsoncxx::v_noabi::document::view collation)
Sets the collation for this index.
Definition index.hpp:342
index & name(bsoncxx::v_noabi::string::view_or_value name)
The name of the index.
Definition index.hpp:315
bsoncxx::v_noabi::stdx::optional< std::uint8_t > const & twod_sphere_version() const
The current twod_sphere_version setting.
Definition index.hpp:622
index & storage_engine(bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view > storage_engine)
Specifies the storage engine options for the index.
Definition index.hpp:439
index & version(std::int32_t v)
Sets the index version.
Definition index.hpp:489
bsoncxx::v_noabi::stdx::optional< bool > const & unique() const
The current unique setting.
Definition index.hpp:273
index & twod_location_min(double twod_location_min)
For 2d indexes, the lower inclusive boundary for the longitude and latitude values.
Definition index.hpp:660
index & default_language(bsoncxx::v_noabi::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...
Definition index.hpp:539
index & twod_bits_precision(std::uint8_t twod_bits_precision)
For 2d indexes, the precision of the stored geohash value of the location data.
Definition index.hpp:636
index & storage_options(std::unique_ptr< wiredtiger_storage_options > storage_options)
Specifies the WiredTiger-specific storage engine options for the index.
Definition index.hpp:417
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view > const & storage_engine() const
The current storage engine options.
Definition index.hpp:447
bsoncxx::v_noabi::stdx::optional< std::uint8_t > const & twod_bits_precision() const
The current precision of the stored geohash value of the location data.
Definition index.hpp:646
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > const & default_language() const
The current default_language setting.
Definition index.hpp:549
index()=default
Default initialization.
index & partial_filter_expression(bsoncxx::v_noabi::document::view partial_filter_expression)
Sets the document for the partial filter expression for partial indexes.
Definition index.hpp:588
bsoncxx::v_noabi::stdx::optional< double > const & twod_location_max() const
The current upper inclusive boundary for the longitude and latitude values.
Definition index.hpp:694
bsoncxx::v_noabi::stdx::optional< bool > const & background() const
The current background setting.
Definition index.hpp:245
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view > const & collation() const
Retrieves the current collation for this index.
Definition index.hpp:356
operator bsoncxx::v_noabi::document::view_or_value()
Conversion operator that provides a view of the options in document form.
index & twod_sphere_version(std::uint8_t twod_sphere_version)
For 2dsphere indexes, the 2dsphere index version number. Version can be either 1 or 2.
Definition index.hpp:612
index & sparse(bool sparse)
Whether or not to create a sparse index. Sparse indexes only reference documents with the indexed fie...
Definition index.hpp:374
bsoncxx::v_noabi::stdx::optional< bool > const & hidden() const
The current hidden setting.
Definition index.hpp:301
Provides bsoncxx::v_noabi::document::view_or_value.
Declares mongocxx::v_noabi::options::index.
Provides mongocxx::v1::indexes.
#define MONGOCXX_DEPRECATED
Declares the associated entity as deprecated.
Definition export.hpp:25
#define MONGOCXX_ABI_NO_EXPORT
Excludes the associated entity from being part of the ABI.
Definition export.hpp:20
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
#define MONGOCXX_ABI_EXPORT
Exports the associated entity as part of the ABI.
Definition export.hpp:15
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
v1::element::view to_v1(v_noabi::array::element const &v)
Convert to the bsoncxx::v1 equivalent of v.
Definition element.hpp:132
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities whose ABI stability is guaranteed for documented symbols.
Declares entities representing options to use with various commands.
Declares entities whose ABI stability is NOT guaranteed.
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
The top-level namespace within which all mongocxx library entities are declared.
Provides bsoncxx::v_noabi::string::view_or_value.
Provides bsoncxx::v_noabi::document::value.
Provides bsoncxx::v_noabi::document::view.
Provides std::optional-related polyfills for library API usage.
Declares mongocxx::v_noabi::collection.