Skip to content

Commit

Permalink
DRIVERS-2928 document "range" as unstable (mongodb#1601)
Browse files Browse the repository at this point in the history
DRIVERS-2767 document "range" as unstable
  • Loading branch information
kevinAlbs authored Jun 14, 2024
1 parent b5e09dc commit 2f39993
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion source/client-side-encryption/client-side-encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ class ClientEncryption {
// {$and: [{$gt: [<fieldpath>, <value1>]}, {$lt: [<fieldpath>, <value2>]}]
// $gt may also be $gte. $lt may also be $lte.
// Only supported when queryType is "range" and algorithm is "Range".
// NOTE: The "range" queryType and "Range" algorithm are currently unstable API and subject to backwards breaking changes.
encryptExpression(expr: Document, opts: EncryptOpts): Document;

// Decrypts an encrypted value (BSON binary of subtype 6).
Expand Down Expand Up @@ -1167,6 +1168,7 @@ class EncryptOpts {
rangeOpts: Optional<RangeOpts>
}

// NOTE: RangeOpts is currently unstable API and subject to backwards breaking changes.
// RangeOpts specifies index options for a Queryable Encryption field supporting "range" queries.
// min, max, trimFactor, sparsity, and precision 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.
Expand Down Expand Up @@ -1201,7 +1203,7 @@ One of the strings:
- "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
- "Indexed"
- "Unindexed"
- "Range"
- "Range" (unstable)

The result of explicit encryption with the "Indexed" or "Range" algorithm must be processed by the server to insert or
query. Drivers MUST document the following behavior:
Expand All @@ -1210,6 +1212,9 @@ query. Drivers MUST document the following behavior:
> `AutoEncryptionOpts`. `AutoEncryptionOpts.bypassQueryAnalysis` may be true. `AutoEncryptionOpts.bypassAutoEncryption`
> must be false.

> [!NOTE]
> The "Range" algorithm is currently unstable API and subject to backwards breaking changes.

#### contentionFactor

contentionFactor only applies when algorithm is "Indexed" or "Range". It is an error to set contentionFactor when
Expand All @@ -1225,10 +1230,16 @@ One of the strings:
queryType only applies when algorithm is "Indexed" or "Range". It is an error to set queryType when algorithm is not
"Indexed" or "Range".

> [!NOTE]
> The "range" queryType is currently unstable API and subject to backwards breaking changes.

#### rangeOpts

rangeOpts only applies when algorithm is "range". It is an error to set rangeOpts when algorithm is not "range".

> [!NOTE]
> rangeOpts is currently unstable API and subject to backwards breaking changes.

## User facing API: When Auto Encryption Fails

Auto encryption requires parsing the MongoDB query language client side (with the [mongocryptd](#mongocryptd) process or
Expand Down Expand Up @@ -2375,6 +2386,8 @@ explicit session parameter as described in the [Drivers Sessions Specification](

## Changelog

- 2024-06-13: Document range as unstable.

- 2024-05-31: Replace rangePreview with range.

- 2024-03-20: Add `delegated` option to "kmip" KMS provider
Expand Down

0 comments on commit 2f39993

Please sign in to comment.