Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-2928 document "range" as unstable #1601

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading