Loading...
Searching...
No Matches
mongocxx::options::range Class Reference

`#include <mongocxx/v_noabi/mongocxx/options/range.hpp>`

## Description

Used by mongocxx::v_noabi::options::encrypt::range_opts.

Specifies index options (RangeOpts) for a Queryable Encryption field supporting "range" queries.

Note
  min, max, trimFactor, sparsity, and precision must match the values set in the encryptedFields of the destination collection.
  For double and decimal128, min, max, and precision must all be set, or all be unset.

## Public Member Functions

| range ()=default
| Default initialization.
| range (v1::range_options opts)
| Construct with the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const & | max () const
| Gets RangeOpts.max.
range & | max (bsoncxx::v_noabi::types::bson_value::view_or_value value)
| Sets RangeOpts.max.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const & | min () const
| Gets RangeOpts.min.
range & | min (bsoncxx::v_noabi::types::bson_value::view_or_value value)
| Sets RangeOpts.min.
| operator v1::range_options () const
| Convert to the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< std::int32_t > const & | precision () const
| Gets RangeOpts.precision.
range & | precision (std::int32_t value)
| Sets RangeOpts.precision.
bsoncxx::v_noabi::stdx::optional< std::int64_t > const & | sparsity () const
| Gets RangeOpts.sparsity.
range & | sparsity (std::int64_t value)
| Sets RangeOpts.sparsity.
bsoncxx::v_noabi::stdx::optional< std::int32_t > const & | trim_factor () const
| Gets RangeOpts.trimFactor.
range & | trim_factor (std::int32_t value)
| Sets RangeOpts.trimFactor.

## Constructor & Destructor Documentation

## range() [1/2]

mongocxx::v_noabi::options::range::range | ( |  | ) |

default

Default initialization.

## range() [2/2]

mongocxx::v_noabi::options::range::range | ( | v1::range_options | opts | ) |

Construct with the mongocxx::v1 equivalent.

## Member Function Documentation

## max() [1/2]

bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const & mongocxx::v_noabi::options::range::max | ( |  | ) | const

inline

Gets RangeOpts.max.

Note
  Required if precision is set.

## max() [2/2]

range & mongocxx::v_noabi::options::range::max | ( | bsoncxx::v_noabi::types::bson_value::view_or_value | value | ) |

inline

Sets RangeOpts.max.

Note
  Required if precision is set.

## min() [1/2]

bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const & mongocxx::v_noabi::options::range::min | ( |  | ) | const

inline

Gets RangeOpts.min.

Note
  Required if precision is set.

## min() [2/2]

range & mongocxx::v_noabi::options::range::min | ( | bsoncxx::v_noabi::types::bson_value::view_or_value | value | ) |

inline

Sets RangeOpts.min.

Note
  Required if precision is set.

## operator v1::range_options()

mongocxx::v_noabi::options::range::operator v1::range_options | ( |  | ) | const

inline explicit

Convert to the mongocxx::v1 equivalent.

## precision() [1/2]

bsoncxx::v_noabi::stdx::optional< std::int32_t > const & mongocxx::v_noabi::options::range::precision | ( |  | ) | const

inline

Gets RangeOpts.precision.

Note
  May only be set for double or decimal128.

## precision() [2/2]

range & mongocxx::v_noabi::options::range::precision | ( | std::int32_t | value | ) |

inline

Sets RangeOpts.precision.

Note
  May only be set for double or decimal128.

## sparsity() [1/2]

bsoncxx::v_noabi::stdx::optional< std::int64_t > const & mongocxx::v_noabi::options::range::sparsity | ( |  | ) | const

inline

Gets RangeOpts.sparsity.

## sparsity() [2/2]

range & mongocxx::v_noabi::options::range::sparsity | ( | std::int64_t | value | ) |

inline

Sets RangeOpts.sparsity.

## trim_factor() [1/2]

bsoncxx::v_noabi::stdx::optional< std::int32_t > const & mongocxx::v_noabi::options::range::trim_factor | ( |  | ) | const

inline

Gets RangeOpts.trimFactor.

## trim_factor() [2/2]

range & mongocxx::v_noabi::options::range::trim_factor | ( | std::int32_t | value | ) |

inline

Sets RangeOpts.trimFactor.

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

- mongocxx/v_noabi/mongocxx/options/range.hpp