Skip to content

Conversation

blink1073
Copy link
Member

@blink1073 blink1073 commented Sep 9, 2025

Add support for textPreview queries. Changes include:

  • Add support for the text_options parameter to ExplicitEncrypter.encrypt().
  • Call mongocrypt_ctx_setopt_algorithm_text to set the text_options if provided.
  • Added a basic test. More tests will be implemented in pymongo via the spec tests.

Tested with mongodb/mongo-python-driver#2521

Copy link
Contributor

@aclark4life aclark4life left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Test data was generated by manually encrypting "foo" and copying the results to the test ? Does the spec say anything about what options to test and how ?

@blink1073
Copy link
Member Author

LGTM! Test data was generated by manually encrypting "foo" and copying the results to the test ? Does the spec say anything about what options to test and how ?

Yes, that's what I did. The spec tests are all in PyMongo, this was just a sanity check against the code path.

@blink1073 blink1073 merged commit 7387a6a into mongodb:master Sep 9, 2025
64 of 68 checks passed
@blink1073 blink1073 deleted the PYTHON-5531 branch September 9, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants