Class RangeOptions
- Namespace
- MongoDB.Driver.Encryption
- Assembly
- MongoDB.Driver.dll
Range options.
public sealed class RangeOptions
- Inheritance
-
RangeOptions
- Inherited Members
Remarks
The Range algorithm is experimental only. It is not intended for public use. RangeOpts specifies index options for a Queryable Encryption field supporting "rangePreview" queries. min, max, sparsity, and range must match the values set in the encryptedFields of the destination collection. For double and decimal128, min/max/precision must all be set, or all be unset. RangeOptions only applies when algorithm is "rangePreview".
Constructors
RangeOptions(long, Optional<BsonValue>, Optional<BsonValue>, Optional<int?>)
Initializes a new instance of the RangeOptions class.
public RangeOptions(long sparsity, Optional<BsonValue> min = default, Optional<BsonValue> max = default, Optional<int?> precision = default)
Parameters
sparsity
longThe sparsity.
min
Optional<BsonValue>The min range.
max
Optional<BsonValue>The max range.
precision
Optional<int?>The precision range.
Properties
Max
Maximum value.
public BsonValue Max { get; }
Property Value
Remarks
Max is required if precision is set.
Min
Minimum value.
public BsonValue Min { get; }
Property Value
Remarks
Min is required if precision is set.
Precision
Gets the precision.
public int? Precision { get; }
Property Value
- int?
Remarks
Precision may only be set for double or decimal128.
Sparsity
Gets the sparsity.
public long Sparsity { get; }