[MONGOCRYPT-441] Accept string values for QueryType and IndexType Created: 09/Jun/22 Updated: 25/Jun/22 Resolved: 16/Jun/22 |
|
| Status: | Closed |
| Project: | Libmongocrypt |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.5.0-rc2 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kevin Albertson | Assignee: | Colby Pike |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Binding Changes: | Needed | ||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Scope
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. |
| Comments |
| Comment by Githook User [ 20/Jun/22 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}Message: chore(
|
| Comment by Githook User [ 17/Jun/22 ] |
|
Author: {'name': 'vector-of-bool', 'email': 'vectorofbool@gmail.com', 'username': 'vector-of-bool'}Message: Update use of removed API |
| Comment by Githook User [ 16/Jun/22 ] |
|
Author: {'name': 'vector-of-bool', 'email': 'vectorofbool@gmail.com', 'username': 'vector-of-bool'}Message:
|
| Comment by Jeremy Mikola [ 09/Jun/22 ] |
|
In DRIVERS-2352, I suggest that EncryptOpts accept the same string value for queryType that the server accepts within encryptedFields. This would be "equality" (lowercase), and cause less confusion should users attempt to use a constant defined for EncryptOpts in encryptedFields. |