-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Needed
Scope
- Allow IndexType option to be set as a string. Accept the values "Indexed" and "Unindexed".
- Consider extending mongocrypt_ctx_setopt_algorithm to accept "Indexed" and "Unindexed".
- Allow QueryType option to be set as a string. Accept the values "equality".
- Consider adding a new function to set all explicit encryption options as a BSON document.
Background & Motivation
The current driver API accepts string values for EncryptOpts.algorithm "Indexed" and "Unindexed". The driver passes this to libmongocrypt using an enum value in mongocrypt_ctx_setopt_index_type.
The current driver API uses an enum for QueryType. This is passed to libmongocrypt using an enum value in mongocrypt_ctx_setopt_query_type.
Accepting string values in the driver API, and forwarding those string values to libmongocrypt API helps with forward compatibility. When new values of QueryType and IndexType are added in libmongocrypt, users would only need to upgrade libmongocrypt, and not the driver, to use the new values.
- causes
-
PYTHON-3310 Test Failure - query_type must be str or None, not: <enum 'QueryType'>
- Closed
- is depended on by
-
DRIVERS-2352 EncryptOpts queryType should accept a string consistent with queryType in encryptedFields
- Implementing
- is duplicated by
-
CSHARP-4204 EncryptOpts queryType should accept a string consistent with queryType in encryptedFields
- Closed
-
PYTHON-3301 EncryptOpts queryType should accept a string consistent with queryType in encryptedFields
- Closed
- split to
-
CSHARP-4207 Accept string values for QueryType and IndexType
- Closed
-
JAVA-4644 Accept string values for QueryType and IndexType
- Closed
-
NODE-4304 Accept string values for QueryType and IndexType
- Closed
-
PYTHON-3302 Accept string values for QueryType and IndexType
- Closed