Skip to content

Commit 15ce781

Browse files
GODRIVER-3123 [master] QE Range Protocol V2 (#1723) (#1763)
Co-authored-by: Qingyang Hu <[email protected]>
1 parent a7ee617 commit 15ce781

File tree

105 files changed

+1998
-1412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1998
-1412
lines changed

etc/install-libmongocrypt.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This script installs libmongocrypt into an "install" directory.
44
set -eux
55

6-
LIBMONGOCRYPT_TAG="1.8.2"
6+
LIBMONGOCRYPT_TAG="1.11.0"
77

88
# Install libmongocrypt based on OS.
99
if [ "Windows_NT" = "${OS:-}" ]; then
@@ -13,11 +13,11 @@ if [ "Windows_NT" = "${OS:-}" ]; then
1313
mkdir libmongocrypt-all
1414
cd libmongocrypt-all
1515
# The following URL is published from the upload-all task in the libmongocrypt Evergreen project.
16-
curl https://mciuploads.s3.amazonaws.com/libmongocrypt/all/$LIBMONGOCRYPT_TAG/libmongocrypt-all.tar.gz -o libmongocrypt-all.tar.gz
16+
curl -L https://github.com/mongodb/libmongocrypt/releases/download/$LIBMONGOCRYPT_TAG/libmongocrypt-windows-x86_64-$LIBMONGOCRYPT_TAG.tar.gz -o libmongocrypt-all.tar.gz
1717
tar -xf libmongocrypt-all.tar.gz
1818
cd ..
19-
cp libmongocrypt-all/windows-test/bin/mongocrypt.dll c:/libmongocrypt/bin
20-
cp libmongocrypt-all/windows-test/include/mongocrypt/*.h c:/libmongocrypt/include
19+
cp libmongocrypt-all/bin/mongocrypt.dll c:/libmongocrypt/bin
20+
cp libmongocrypt-all/include/mongocrypt/*.h c:/libmongocrypt/include
2121

2222
rm -rf libmongocrypt-all
2323
echo "fetching build for Windows ... end"

internal/integration/client_side_encryption_prose_test.go

Lines changed: 90 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,8 +2455,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
24552455
}
24562456
})
24572457

2458-
// GODRIVER-3123. When we implement this feature, lower the min server version to 8.0.1
2459-
qeRunOpts22 := qeRunOpts.MaxServerVersion("7.99.99")
2458+
qeRunOpts22 := qeRunOpts.MinServerVersion("8.0")
24602459
mt.RunOpts("22. range explicit encryption", qeRunOpts22, func(mt *mtest.T) {
24612460
type testcase struct {
24622461
typeStr string
@@ -2470,6 +2469,8 @@ func TestClientSideEncryptionProse(t *testing.T) {
24702469
twoHundredOne bson.RawValue
24712470
}
24722471

2472+
trimFactor := int32(1)
2473+
sparsity := int64(1)
24732474
precision := int32(2)
24742475

24752476
d128_0, err := bson.ParseDecimal128("0")
@@ -2497,7 +2498,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
24972498
typeStr: "DecimalNoPrecision",
24982499
field: "encryptedDecimalNoPrecision",
24992500
typeBson: bson.TypeDecimal128,
2500-
rangeOpts: options.Range().SetSparsity(1),
2501+
rangeOpts: options.Range().SetTrimFactor(trimFactor).SetSparsity(sparsity),
25012502
zero: bson.RawValue{Type: bson.TypeDecimal128, Value: bsoncore.AppendDecimal128(nil, d128_0h, d128_0l)},
25022503
six: bson.RawValue{Type: bson.TypeDecimal128, Value: bsoncore.AppendDecimal128(nil, d128_6h, d128_6l)},
25032504
thirty: bson.RawValue{Type: bson.TypeDecimal128, Value: bsoncore.AppendDecimal128(nil, d128_30h, d128_30l)},
@@ -2511,7 +2512,8 @@ func TestClientSideEncryptionProse(t *testing.T) {
25112512
rangeOpts: options.Range().
25122513
SetMin(bson.RawValue{Type: bson.TypeDecimal128, Value: bsoncore.AppendDecimal128(nil, d128_0h, d128_0l)}).
25132514
SetMax(bson.RawValue{Type: bson.TypeDecimal128, Value: bsoncore.AppendDecimal128(nil, d128_200h, d128_200l)}).
2514-
SetSparsity(1).
2515+
SetTrimFactor(trimFactor).
2516+
SetSparsity(sparsity).
25152517
SetPrecision(precision),
25162518
zero: bson.RawValue{Type: bson.TypeDecimal128, Value: bsoncore.AppendDecimal128(nil, d128_0h, d128_0l)},
25172519
six: bson.RawValue{Type: bson.TypeDecimal128, Value: bsoncore.AppendDecimal128(nil, d128_6h, d128_6l)},
@@ -2523,7 +2525,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
25232525
typeStr: "DoubleNoPrecision",
25242526
field: "encryptedDoubleNoPrecision",
25252527
typeBson: bson.TypeDouble,
2526-
rangeOpts: options.Range().SetSparsity(1),
2528+
rangeOpts: options.Range().SetTrimFactor(trimFactor).SetSparsity(sparsity),
25272529
zero: bson.RawValue{Type: bson.TypeDouble, Value: bsoncore.AppendDouble(nil, 0)},
25282530
six: bson.RawValue{Type: bson.TypeDouble, Value: bsoncore.AppendDouble(nil, 6)},
25292531
thirty: bson.RawValue{Type: bson.TypeDouble, Value: bsoncore.AppendDouble(nil, 30)},
@@ -2537,7 +2539,8 @@ func TestClientSideEncryptionProse(t *testing.T) {
25372539
rangeOpts: options.Range().
25382540
SetMin(bson.RawValue{Type: bson.TypeDouble, Value: bsoncore.AppendDouble(nil, 0)}).
25392541
SetMax(bson.RawValue{Type: bson.TypeDouble, Value: bsoncore.AppendDouble(nil, 200)}).
2540-
SetSparsity(1).
2542+
SetTrimFactor(trimFactor).
2543+
SetSparsity(sparsity).
25412544
SetPrecision(precision),
25422545
zero: bson.RawValue{Type: bson.TypeDouble, Value: bsoncore.AppendDouble(nil, 0)},
25432546
six: bson.RawValue{Type: bson.TypeDouble, Value: bsoncore.AppendDouble(nil, 6)},
@@ -2552,7 +2555,8 @@ func TestClientSideEncryptionProse(t *testing.T) {
25522555
rangeOpts: options.Range().
25532556
SetMin(bson.RawValue{Type: bson.TypeDateTime, Value: bsoncore.AppendDateTime(nil, 0)}).
25542557
SetMax(bson.RawValue{Type: bson.TypeDateTime, Value: bsoncore.AppendDateTime(nil, 200)}).
2555-
SetSparsity(1),
2558+
SetTrimFactor(trimFactor).
2559+
SetSparsity(sparsity),
25562560
zero: bson.RawValue{Type: bson.TypeDateTime, Value: bsoncore.AppendDateTime(nil, 0)},
25572561
six: bson.RawValue{Type: bson.TypeDateTime, Value: bsoncore.AppendDateTime(nil, 6)},
25582562
thirty: bson.RawValue{Type: bson.TypeDateTime, Value: bsoncore.AppendDateTime(nil, 30)},
@@ -2566,7 +2570,8 @@ func TestClientSideEncryptionProse(t *testing.T) {
25662570
rangeOpts: options.Range().
25672571
SetMin(bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 0)}).
25682572
SetMax(bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 200)}).
2569-
SetSparsity(1),
2573+
SetTrimFactor(trimFactor).
2574+
SetSparsity(sparsity),
25702575
zero: bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 0)},
25712576
six: bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 6)},
25722577
thirty: bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 30)},
@@ -2580,7 +2585,8 @@ func TestClientSideEncryptionProse(t *testing.T) {
25802585
rangeOpts: options.Range().
25812586
SetMin(bson.RawValue{Type: bson.TypeInt64, Value: bsoncore.AppendInt64(nil, 0)}).
25822587
SetMax(bson.RawValue{Type: bson.TypeInt64, Value: bsoncore.AppendInt64(nil, 200)}).
2583-
SetSparsity(1),
2588+
SetTrimFactor(trimFactor).
2589+
SetSparsity(sparsity),
25842590
zero: bson.RawValue{Type: bson.TypeInt64, Value: bsoncore.AppendInt64(nil, 0)},
25852591
six: bson.RawValue{Type: bson.TypeInt64, Value: bsoncore.AppendInt64(nil, 6)},
25862592
thirty: bson.RawValue{Type: bson.TypeInt64, Value: bsoncore.AppendInt64(nil, 30)},
@@ -2635,7 +2641,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
26352641
// Insert 0, 6, 30, and 200.
26362642
coll := encryptedClient.Database("db").Collection("explicit_encryption")
26372643
eo := options.Encrypt().
2638-
SetAlgorithm("RangePreview").
2644+
SetAlgorithm("Range").
26392645
SetKeyID(key1ID).
26402646
SetContentionFactor(0).
26412647
SetRangeOptions(test.rangeOpts)
@@ -2682,7 +2688,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
26822688
defer clientEncryption.Close(context.Background())
26832689
defer encryptedClient.Disconnect(context.Background())
26842690
eo := options.Encrypt().
2685-
SetAlgorithm("RangePreview").
2691+
SetAlgorithm("Range").
26862692
SetKeyID(key1ID).
26872693
SetContentionFactor(0).
26882694
SetRangeOptions(test.rangeOpts)
@@ -2698,10 +2704,10 @@ func TestClientSideEncryptionProse(t *testing.T) {
26982704
defer clientEncryption.Close(context.Background())
26992705
defer encryptedClient.Disconnect(context.Background())
27002706
eo := options.Encrypt().
2701-
SetAlgorithm("RangePreview").
2707+
SetAlgorithm("Range").
27022708
SetKeyID(key1ID).
27032709
SetContentionFactor(0).
2704-
SetQueryType("rangePreview").
2710+
SetQueryType("range").
27052711
SetRangeOptions(test.rangeOpts)
27062712

27072713
expr := bson.M{
@@ -2740,10 +2746,10 @@ func TestClientSideEncryptionProse(t *testing.T) {
27402746
defer clientEncryption.Close(context.Background())
27412747
defer encryptedClient.Disconnect(context.Background())
27422748
eo := options.Encrypt().
2743-
SetAlgorithm("RangePreview").
2749+
SetAlgorithm("Range").
27442750
SetKeyID(key1ID).
27452751
SetContentionFactor(0).
2746-
SetQueryType("rangePreview").
2752+
SetQueryType("range").
27472753
SetRangeOptions(test.rangeOpts)
27482754

27492755
expr := bson.M{
@@ -2782,10 +2788,10 @@ func TestClientSideEncryptionProse(t *testing.T) {
27822788
defer clientEncryption.Close(context.Background())
27832789
defer encryptedClient.Disconnect(context.Background())
27842790
eo := options.Encrypt().
2785-
SetAlgorithm("RangePreview").
2791+
SetAlgorithm("Range").
27862792
SetKeyID(key1ID).
27872793
SetContentionFactor(0).
2788-
SetQueryType("rangePreview").
2794+
SetQueryType("range").
27892795
SetRangeOptions(test.rangeOpts)
27902796

27912797
expr := bson.M{
@@ -2819,10 +2825,10 @@ func TestClientSideEncryptionProse(t *testing.T) {
28192825
defer clientEncryption.Close(context.Background())
28202826
defer encryptedClient.Disconnect(context.Background())
28212827
eo := options.Encrypt().
2822-
SetAlgorithm("RangePreview").
2828+
SetAlgorithm("Range").
28232829
SetKeyID(key1ID).
28242830
SetContentionFactor(0).
2825-
SetQueryType("rangePreview").
2831+
SetQueryType("range").
28262832
SetRangeOptions(test.rangeOpts)
28272833

28282834
expr := bson.M{
@@ -2858,7 +2864,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
28582864
defer clientEncryption.Close(context.Background())
28592865
defer encryptedClient.Disconnect(context.Background())
28602866
eo := options.Encrypt().
2861-
SetAlgorithm("RangePreview").
2867+
SetAlgorithm("Range").
28622868
SetKeyID(key1ID).
28632869
SetContentionFactor(0).
28642870
SetRangeOptions(test.rangeOpts)
@@ -2872,7 +2878,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
28722878
defer clientEncryption.Close(context.Background())
28732879
defer encryptedClient.Disconnect(context.Background())
28742880
eo := options.Encrypt().
2875-
SetAlgorithm("RangePreview").
2881+
SetAlgorithm("Range").
28762882
SetKeyID(key1ID).
28772883
SetContentionFactor(0).
28782884
SetRangeOptions(test.rangeOpts)
@@ -2899,7 +2905,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
28992905
ro := test.rangeOpts
29002906
ro.SetPrecision(2)
29012907
eo := options.Encrypt().
2902-
SetAlgorithm("RangePreview").
2908+
SetAlgorithm("Range").
29032909
SetKeyID(key1ID).
29042910
SetContentionFactor(0).
29052911
SetRangeOptions(ro)
@@ -2911,6 +2917,68 @@ func TestClientSideEncryptionProse(t *testing.T) {
29112917
})
29122918
}
29132919
})
2920+
2921+
mt.RunOpts("22. range explicit encryption applies defaults", qeRunOpts22, func(mt *mtest.T) {
2922+
err := mt.Client.Database("keyvault").Collection("datakeys").Drop(context.Background())
2923+
assert.Nil(mt, err, "error on Drop: %v", err)
2924+
2925+
testVal := bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 123)}
2926+
2927+
keyVaultClient, err := mongo.Connect(options.Client().ApplyURI(mtest.ClusterURI()))
2928+
assert.Nil(mt, err, "error on Connect: %v", err)
2929+
2930+
ceo := options.ClientEncryption().
2931+
SetKeyVaultNamespace("keyvault.datakeys").
2932+
SetKmsProviders(fullKmsProvidersMap)
2933+
clientEncryption, err := mongo.NewClientEncryption(keyVaultClient, ceo)
2934+
assert.Nil(mt, err, "error on NewClientEncryption: %v", err)
2935+
2936+
dkOpts := options.DataKey()
2937+
keyID, err := clientEncryption.CreateDataKey(context.Background(), "local", dkOpts)
2938+
assert.Nil(mt, err, "error in CreateDataKey: %v", err)
2939+
2940+
eo := options.Encrypt().
2941+
SetAlgorithm("Range").
2942+
SetKeyID(keyID).
2943+
SetContentionFactor(0).
2944+
SetRangeOptions(options.Range().
2945+
SetMin(bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 0)}).
2946+
SetMax(bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 1000)}))
2947+
payloadDefaults, err := clientEncryption.Encrypt(context.Background(), testVal, eo)
2948+
assert.Nil(mt, err, "error in Encrypt: %v", err)
2949+
2950+
mt.Run("Case 1: uses libmongocrypt defaults", func(mt *mtest.T) {
2951+
trimFactor := int32(6)
2952+
sparsity := int64(2)
2953+
eo := options.Encrypt().
2954+
SetAlgorithm("Range").
2955+
SetKeyID(keyID).
2956+
SetContentionFactor(0).
2957+
SetRangeOptions(options.Range().
2958+
SetMin(bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 0)}).
2959+
SetMax(bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 1000)}).
2960+
SetTrimFactor(trimFactor).
2961+
SetSparsity(sparsity))
2962+
payload, err := clientEncryption.Encrypt(context.Background(), testVal, eo)
2963+
assert.Nil(mt, err, "error in Encrypt: %v", err)
2964+
assert.Equalf(mt, len(payload.Data), len(payloadDefaults.Data), "the returned payload size is expected to be %d", len(payloadDefaults.Data))
2965+
})
2966+
2967+
mt.Run("Case 2: accepts trimFactor 0", func(mt *mtest.T) {
2968+
trimFactor := int32(0)
2969+
eo := options.Encrypt().
2970+
SetAlgorithm("Range").
2971+
SetKeyID(keyID).
2972+
SetContentionFactor(0).
2973+
SetRangeOptions(options.Range().
2974+
SetMin(bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 0)}).
2975+
SetMax(bson.RawValue{Type: bson.TypeInt32, Value: bsoncore.AppendInt32(nil, 1000)}).
2976+
SetTrimFactor(trimFactor))
2977+
payload, err := clientEncryption.Encrypt(context.Background(), testVal, eo)
2978+
assert.Nil(mt, err, "error in Encrypt: %v", err)
2979+
assert.Greater(t, len(payload.Data), len(payloadDefaults.Data), "the returned payload size is expected to be greater than %d", len(payloadDefaults.Data))
2980+
})
2981+
})
29142982
}
29152983

29162984
func getWatcher(mt *mtest.T, streamType mongo.StreamType, cpt *cseProseTest) watcher {

mongo/client_encryption.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,12 @@ func transformExplicitEncryptionOptions(opts ...options.Lister[options.EncryptOp
221221
if rangeArgs.Precision != nil {
222222
transformedRange.Precision = rangeArgs.Precision
223223
}
224-
transformedRange.Sparsity = rangeArgs.Sparsity
224+
if rangeArgs.Sparsity != nil {
225+
transformedRange.Sparsity = rangeArgs.Sparsity
226+
}
227+
if rangeArgs.TrimFactor != nil {
228+
transformedRange.TrimFactor = rangeArgs.TrimFactor
229+
}
225230
transformed.SetRangeOptions(transformedRange)
226231
}
227232
return transformed
@@ -250,14 +255,8 @@ func (ce *ClientEncryption) Encrypt(
250255
// 2. An Aggregate Expression of this form:
251256
// {$and: [{$gt: [<fieldpath>, <value1>]}, {$lt: [<fieldpath>, <value2>]}]
252257
// $gt may also be $gte. $lt may also be $lte.
253-
// Only supported for queryType "rangePreview"
254-
// Beta: The Range algorithm is experimental only. It is not intended for public use. It is subject to breaking changes.
255-
func (ce *ClientEncryption) EncryptExpression(
256-
ctx context.Context,
257-
expr interface{},
258-
result interface{},
259-
opts ...options.Lister[options.EncryptOptions],
260-
) error {
258+
// Only supported for queryType "range"
259+
func (ce *ClientEncryption) EncryptExpression(ctx context.Context, expr interface{}, result interface{}, opts ...options.Lister[options.EncryptOptions]) error {
261260
transformed := transformExplicitEncryptionOptions(opts...)
262261

263262
exprDoc, err := marshal(expr, nil, nil)

mongo/options/encryptoptions.go

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ const (
1616
QueryTypeEquality string = "equality"
1717
)
1818

19-
// RangeOptions specifies index options for a Queryable Encryption field
20-
// supporting "rangePreview" queries. Beta: The Range algorithm is experimental
21-
// only. It is not intended for public use. It is subject to breaking changes.
19+
// RangeOptions specifies index options for a Queryable Encryption field supporting "range" queries.
2220
type RangeOptions struct {
23-
Min *bson.RawValue
24-
Max *bson.RawValue
25-
Sparsity int64
26-
Precision *int32
21+
Min *bson.RawValue
22+
Max *bson.RawValue
23+
Sparsity *int64
24+
TrimFactor *int32
25+
Precision *int32
2726
}
2827

2928
// RangeOptionsBuilder contains options to configure Rangeopts for queryeable
@@ -96,6 +95,7 @@ func (e *EncryptOptionsBuilder) SetKeyAltName(keyAltName string) *EncryptOptions
9695
// - AEAD_AES_256_CBC_HMAC_SHA_512-Random
9796
// - Indexed
9897
// - Unindexed
98+
// - Range
9999
// This is required.
100100
// Indexed and Unindexed are used for Queryable Encryption.
101101
func (e *EncryptOptionsBuilder) SetAlgorithm(algorithm string) *EncryptOptionsBuilder {
@@ -134,8 +134,7 @@ func (e *EncryptOptionsBuilder) SetContentionFactor(contentionFactor int64) *Enc
134134
return e
135135
}
136136

137-
// SetRangeOptions specifies the options to use for explicit encryption with range. It is only valid to set if algorithm is "rangePreview".
138-
// Beta: The Range algorithm is experimental only. It is not intended for public use. It is subject to breaking changes.
137+
// SetRangeOptions specifies the options to use for explicit encryption with range. It is only valid to set if algorithm is "range".
139138
func (e *EncryptOptionsBuilder) SetRangeOptions(ro *RangeOptionsBuilder) *EncryptOptionsBuilder {
140139
e.Opts = append(e.Opts, func(opts *EncryptOptions) error {
141140
opts.RangeOptions = ro
@@ -147,7 +146,6 @@ func (e *EncryptOptionsBuilder) SetRangeOptions(ro *RangeOptionsBuilder) *Encryp
147146
}
148147

149148
// SetMin sets the range index minimum value.
150-
// Beta: The Range algorithm is experimental only. It is not intended for public use. It is subject to breaking changes.
151149
func (ro *RangeOptionsBuilder) SetMin(min bson.RawValue) *RangeOptionsBuilder {
152150
ro.Opts = append(ro.Opts, func(opts *RangeOptions) error {
153151
opts.Min = &min
@@ -159,7 +157,6 @@ func (ro *RangeOptionsBuilder) SetMin(min bson.RawValue) *RangeOptionsBuilder {
159157
}
160158

161159
// SetMax sets the range index maximum value.
162-
// Beta: The Range algorithm is experimental only. It is not intended for public use. It is subject to breaking changes.
163160
func (ro *RangeOptionsBuilder) SetMax(max bson.RawValue) *RangeOptionsBuilder {
164161
ro.Opts = append(ro.Opts, func(opts *RangeOptions) error {
165162
opts.Max = &max
@@ -171,10 +168,20 @@ func (ro *RangeOptionsBuilder) SetMax(max bson.RawValue) *RangeOptionsBuilder {
171168
}
172169

173170
// SetSparsity sets the range index sparsity.
174-
// Beta: The Range algorithm is experimental only. It is not intended for public use. It is subject to breaking changes.
175171
func (ro *RangeOptionsBuilder) SetSparsity(sparsity int64) *RangeOptionsBuilder {
176172
ro.Opts = append(ro.Opts, func(opts *RangeOptions) error {
177-
opts.Sparsity = sparsity
173+
opts.Sparsity = &sparsity
174+
175+
return nil
176+
})
177+
178+
return ro
179+
}
180+
181+
// SetTrimFactor sets the range index trim factor.
182+
func (ro *RangeOptionsBuilder) SetTrimFactor(trimFactor int32) *RangeOptionsBuilder {
183+
ro.Opts = append(ro.Opts, func(opts *RangeOptions) error {
184+
opts.TrimFactor = &trimFactor
178185

179186
return nil
180187
})
@@ -183,7 +190,6 @@ func (ro *RangeOptionsBuilder) SetSparsity(sparsity int64) *RangeOptionsBuilder
183190
}
184191

185192
// SetPrecision sets the range index precision.
186-
// Beta: The Range algorithm is experimental only. It is not intended for public use. It is subject to breaking changes.
187193
func (ro *RangeOptionsBuilder) SetPrecision(precision int32) *RangeOptionsBuilder {
188194
ro.Opts = append(ro.Opts, func(opts *RangeOptions) error {
189195
opts.Precision = &precision

0 commit comments

Comments
 (0)