MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::v1::indexes::options Class Reference

#include <mongocxx/v1/indexes.hpp>

Description

Options for mongocxx::v1::indexes::model.

Supported fields include:

Attention
This feature is experimental! It is not ready for use!

Public Member Functions

 options ()
 Default initialization.
 options (options &&other) noexcept
 Move constructor.
 options (options const &other)
 Copy construction.
 ~options ()
 Destroy this object.
bsoncxx::v1::stdx::optional< bool > background () const
 Return the current "background" field.
optionsbackground (bool v)
 Set the "background" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewcollation () const
 Return the current "collation" field.
optionscollation (bsoncxx::v1::document::value v)
 Set the "collation" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_viewdefault_language () const
 Return the current "default_language" field.
optionsdefault_language (std::string v)
 Set the "default_language" field.
bsoncxx::v1::stdx::optional< std::chrono::seconds > expire_after () const
 Return the current "expireAfterSeconds" field.
optionsexpire_after (std::chrono::seconds v)
 Set the "expireAfterSeconds" field.
bsoncxx::v1::stdx::optional< bool > hidden () const
 Return the current "hidden" field.
optionshidden (bool v)
 Set the "hidden" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_viewlanguage_override () const
 Return the current "language_override" field.
optionslanguage_override (std::string v)
 Set the "language_override" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_viewname () const
 Return the current "name" field.
optionsname (std::string v)
 Set the "name" field.
 operator bsoncxx::v1::document::value () const
 Return these index management options as a document.
optionsoperator= (options &&other) noexcept
 Move assignment.
optionsoperator= (options const &other)
 Copy assignment.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewpartial_filter_expression () const
 Return the current "partialFilterExpression" field.
optionspartial_filter_expression (bsoncxx::v1::document::value v)
 Set the "partialFilterExpression" field.
bsoncxx::v1::stdx::optional< bool > sparse () const
 Return the current "sparse" field.
optionssparse (bool v)
 Set the "sparse" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewstorage_engine () const
 Return the current "storageEngine" field.
optionsstorage_engine (bsoncxx::v1::document::value v)
 Set the "storageEngine" field.
bsoncxx::v1::stdx::optional< std::int32_t > text_index_version () const
 Return the current "textIndexVersion" field.
optionstext_index_version (std::int32_t v)
 Set the "textIndexVersion" field.
bsoncxx::v1::stdx::optional< std::uint8_t > twod_bits_precision () const
 Return the current "bits" field.
optionstwod_bits_precision (std::uint8_t v)
 Set the "bits" field.
bsoncxx::v1::stdx::optional< double > twod_location_max () const
 Return the current "max" field.
optionstwod_location_max (double v)
 Set the "max" field.
bsoncxx::v1::stdx::optional< double > twod_location_min () const
 Return the current "min" field.
optionstwod_location_min (double v)
 Set the "min" field.
bsoncxx::v1::stdx::optional< std::uint8_t > twod_sphere_version () const
 Return the current "2dsphereIndexVersion" field.
optionstwod_sphere_version (std::uint8_t v)
 Set the "2dsphereIndexVersion" field.
bsoncxx::v1::stdx::optional< bool > unique () const
 Return the current "unique" field.
optionsunique (bool v)
 Set the "unique" field.
bsoncxx::v1::stdx::optional< std::int32_t > version () const
 Return the current "version" field.
optionsversion (std::int32_t v)
 Set the "version" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewweights () const
 Return the current "weights" field.
optionsweights (bsoncxx::v1::document::value v)
 Set the "weights" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewwildcard_projection () const
 Return the current "wildcardProjection" field.
optionswildcard_projection (bsoncxx::v1::document::value v)
 Set the "wildcardProjection" field.

Constructor & Destructor Documentation

◆ ~options()

mongocxx::v1::indexes::options::~options ( )

Destroy this object.

Warning
Invalidates all associated views.

◆ options() [1/3]

mongocxx::v1::indexes::options::options ( options && other)
noexcept

Move constructor.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ options() [2/3]

mongocxx::v1::indexes::options::options ( options const & other)

Copy construction.

◆ options() [3/3]

mongocxx::v1::indexes::options::options ( )

Default initialization.

Postconditions:
  • All supported fields are "unset" or zero-initialized.

Member Function Documentation

◆ background() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::indexes::options::background ( ) const

Return the current "background" field.

◆ background() [2/2]

options & mongocxx::v1::indexes::options::background ( bool v)

Set the "background" field.

◆ collation() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::indexes::options::collation ( ) const

Return the current "collation" field.

◆ collation() [2/2]

options & mongocxx::v1::indexes::options::collation ( bsoncxx::v1::document::value v)

Set the "collation" field.

◆ default_language() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::indexes::options::default_language ( ) const

Return the current "default_language" field.

◆ default_language() [2/2]

options & mongocxx::v1::indexes::options::default_language ( std::string v)

Set the "default_language" field.

◆ expire_after() [1/2]

bsoncxx::v1::stdx::optional< std::chrono::seconds > mongocxx::v1::indexes::options::expire_after ( ) const

Return the current "expireAfterSeconds" field.

◆ expire_after() [2/2]

options & mongocxx::v1::indexes::options::expire_after ( std::chrono::seconds v)

Set the "expireAfterSeconds" field.

◆ hidden() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::indexes::options::hidden ( ) const

Return the current "hidden" field.

◆ hidden() [2/2]

options & mongocxx::v1::indexes::options::hidden ( bool v)

Set the "hidden" field.

◆ language_override() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::indexes::options::language_override ( ) const

Return the current "language_override" field.

◆ language_override() [2/2]

options & mongocxx::v1::indexes::options::language_override ( std::string v)

Set the "language_override" field.

◆ name() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::indexes::options::name ( ) const

Return the current "name" field.

◆ name() [2/2]

options & mongocxx::v1::indexes::options::name ( std::string v)

Set the "name" field.

◆ operator bsoncxx::v1::document::value()

mongocxx::v1::indexes::options::operator bsoncxx::v1::document::value ( ) const

Return these index management options as a document.

◆ operator=() [1/2]

options & mongocxx::v1::indexes::options::operator= ( options && other)
noexcept

Move assignment.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ operator=() [2/2]

options & mongocxx::v1::indexes::options::operator= ( options const & other)

Copy assignment.

◆ partial_filter_expression() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::indexes::options::partial_filter_expression ( ) const

Return the current "partialFilterExpression" field.

◆ partial_filter_expression() [2/2]

options & mongocxx::v1::indexes::options::partial_filter_expression ( bsoncxx::v1::document::value v)

Set the "partialFilterExpression" field.

◆ sparse() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::indexes::options::sparse ( ) const

Return the current "sparse" field.

◆ sparse() [2/2]

options & mongocxx::v1::indexes::options::sparse ( bool v)

Set the "sparse" field.

◆ storage_engine() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::indexes::options::storage_engine ( ) const

Return the current "storageEngine" field.

◆ storage_engine() [2/2]

options & mongocxx::v1::indexes::options::storage_engine ( bsoncxx::v1::document::value v)

Set the "storageEngine" field.

◆ text_index_version() [1/2]

bsoncxx::v1::stdx::optional< std::int32_t > mongocxx::v1::indexes::options::text_index_version ( ) const

Return the current "textIndexVersion" field.

◆ text_index_version() [2/2]

options & mongocxx::v1::indexes::options::text_index_version ( std::int32_t v)

Set the "textIndexVersion" field.

◆ twod_bits_precision() [1/2]

bsoncxx::v1::stdx::optional< std::uint8_t > mongocxx::v1::indexes::options::twod_bits_precision ( ) const

Return the current "bits" field.

◆ twod_bits_precision() [2/2]

options & mongocxx::v1::indexes::options::twod_bits_precision ( std::uint8_t v)

Set the "bits" field.

◆ twod_location_max() [1/2]

bsoncxx::v1::stdx::optional< double > mongocxx::v1::indexes::options::twod_location_max ( ) const

Return the current "max" field.

◆ twod_location_max() [2/2]

options & mongocxx::v1::indexes::options::twod_location_max ( double v)

Set the "max" field.

◆ twod_location_min() [1/2]

bsoncxx::v1::stdx::optional< double > mongocxx::v1::indexes::options::twod_location_min ( ) const

Return the current "min" field.

◆ twod_location_min() [2/2]

options & mongocxx::v1::indexes::options::twod_location_min ( double v)

Set the "min" field.

◆ twod_sphere_version() [1/2]

bsoncxx::v1::stdx::optional< std::uint8_t > mongocxx::v1::indexes::options::twod_sphere_version ( ) const

Return the current "2dsphereIndexVersion" field.

◆ twod_sphere_version() [2/2]

options & mongocxx::v1::indexes::options::twod_sphere_version ( std::uint8_t v)

Set the "2dsphereIndexVersion" field.

◆ unique() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::indexes::options::unique ( ) const

Return the current "unique" field.

◆ unique() [2/2]

options & mongocxx::v1::indexes::options::unique ( bool v)

Set the "unique" field.

◆ version() [1/2]

bsoncxx::v1::stdx::optional< std::int32_t > mongocxx::v1::indexes::options::version ( ) const

Return the current "version" field.

◆ version() [2/2]

options & mongocxx::v1::indexes::options::version ( std::int32_t v)

Set the "version" field.

◆ weights() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::indexes::options::weights ( ) const

Return the current "weights" field.

◆ weights() [2/2]

options & mongocxx::v1::indexes::options::weights ( bsoncxx::v1::document::value v)

Set the "weights" field.

◆ wildcard_projection() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::indexes::options::wildcard_projection ( ) const

Return the current "wildcardProjection" field.

◆ wildcard_projection() [2/2]

options & mongocxx::v1::indexes::options::wildcard_projection ( bsoncxx::v1::document::value v)

Set the "wildcardProjection" field.


The documentation for this class was generated from the following file: