-
Notifications
You must be signed in to change notification settings - Fork 456
CDRIVER-6044 Text search explicit encryption API and prose tests #2084
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
Open
mdb-ad
wants to merge
29
commits into
mongodb:master
Choose a base branch
from
mdb-ad:text-search
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
248d35b
prose tests draft
mdb-ad 6c83fe8
syntax fix
mdb-ad 6a7dda8
substring tests + format
mdb-ad 772abde
update libmongocrypt
mdb-ad 854c7ce
require 8.2
mdb-ad ba2f5e6
address memory leaks
mdb-ad 54b6504
Merge branch 'master' into text-search
mdb-ad fdce7c5
c driver format changes
mdb-ad 1cfb661
struct for every index type
mdb-ad 5fa53b7
no need for set field if text opts are a pointer
mdb-ad 43ea85f
prose test fixes
mdb-ad 29f8bb2
free index opts
mdb-ad cc7603a
remove accidental double declarations from merge
mdb-ad 07792f3
optional diacritic and case sensitive
mdb-ad 9af098f
field names
mdb-ad dac9b64
docs
mdb-ad e6017a6
next release is 2.2.0
mdb-ad 5c25230
Merge branch 'master' into text-search
mdb-ad 50a0888
review comments
mdb-ad b2f7b5f
docs fixes
mdb-ad 3e6be76
index text opts
mdb-ad f7d5620
Merge branch 'master' into text-search
mdb-ad 706d767
missing assert
mdb-ad b1ba169
format
mdb-ad 9a31103
naming consistency
mdb-ad d6ac164
missing index
mdb-ad b8fa71c
format
mdb-ad fa67c0e
rename underlines
mdb-ad c6c6277
libmongocrypt version declaration
mdb-ad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/libmongoc/doc/mongoc_client_encryption_encrypt_opts_set_text_opts.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_opts_set_text_opts | ||
|
|
||
| mongoc_client_encryption_encrypt_opts_set_text_opts() | ||
| ===================================================== | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| void | ||
| mongoc_client_encryption_encrypt_opts_set_text_opts( | ||
| mongoc_client_encryption_encrypt_opts_t *opts, | ||
| const mongoc_client_encryption_encrypt_text_opts_t *text_opts); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| Sets the text search encryption options for explicit encryption. | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
||
| * ``opts``: A :symbol:`mongoc_client_encryption_encrypt_opts_t`. | ||
| * ``text_opts``: A :symbol:`mongoc_client_encryption_encrypt_text_opts_t` specifying text search options. | ||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_t` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_new` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_set_prefix` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_set_suffix` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_set_substring` | ||
26 changes: 26 additions & 0 deletions
26
src/libmongoc/doc/mongoc_client_encryption_encrypt_text_opts_destroy.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_opts_destroy | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_destroy() | ||
| ==================================================== | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| void | ||
| mongoc_client_encryption_encrypt_text_opts_destroy(mongoc_client_encryption_encrypt_text_opts_t *topts); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| Frees a :symbol:`mongoc_client_encryption_encrypt_text_opts_t` created with :symbol:`mongoc_client_encryption_encrypt_text_opts_new()`. | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
||
| * ``topts``: A :symbol:`mongoc_client_encryption_encrypt_text_opts_t` to destroy. | ||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_new` |
27 changes: 27 additions & 0 deletions
27
src/libmongoc/doc/mongoc_client_encryption_encrypt_text_opts_new.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_opts_new | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_new() | ||
| ================================================ | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_t * | ||
| mongoc_client_encryption_encrypt_text_opts_new(void); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| Returns | ||
| ------- | ||
|
|
||
| A new :symbol:`mongoc_client_encryption_encrypt_text_opts_t` that must be freed with :symbol:`mongoc_client_encryption_encrypt_text_opts_destroy()`. | ||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_destroy` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_set_prefix` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_set_suffix` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_set_substring` |
29 changes: 29 additions & 0 deletions
29
...libmongoc/doc/mongoc_client_encryption_encrypt_text_opts_set_case_sensitive.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_opts_set_case_sensitive | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_set_case_sensitive() | ||
| =============================================================== | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| void | ||
| mongoc_client_encryption_encrypt_text_opts_set_case_sensitive( | ||
| mongoc_client_encryption_encrypt_text_opts_t *opts, | ||
| bool case_sensitive); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| Sets whether text search is case sensitive. | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
||
| * ``opts``: A :symbol:`mongoc_client_encryption_encrypt_text_opts_t`. | ||
| * ``case_sensitive``: If true, text search is case sensitive. | ||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_t` |
29 changes: 29 additions & 0 deletions
29
...ngoc/doc/mongoc_client_encryption_encrypt_text_opts_set_diacritic_sensitive.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_opts_set_diacritic_sensitive | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_set_diacritic_sensitive() | ||
| ==================================================================== | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| void | ||
| mongoc_client_encryption_encrypt_text_opts_set_diacritic_sensitive( | ||
| mongoc_client_encryption_encrypt_text_opts_t *opts, | ||
| bool diacritic_sensitive); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| Sets whether text search is diacritic sensitive. | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
||
| * ``opts``: A :symbol:`mongoc_client_encryption_encrypt_text_opts_t`. | ||
| * ``diacritic_sensitive``: If true, text search is diacritic sensitive. | ||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_t` |
30 changes: 30 additions & 0 deletions
30
src/libmongoc/doc/mongoc_client_encryption_encrypt_text_opts_set_prefix.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_opts_set_prefix | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_set_prefix() | ||
| ======================================================= | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| void | ||
| mongoc_client_encryption_encrypt_text_opts_set_prefix( | ||
| mongoc_client_encryption_encrypt_text_opts_t *opts, | ||
| mongoc_client_encryption_encrypt_text_prefix_opts_t *popts); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| Sets the prefix options for text search encryption. | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
||
| * ``opts``: A :symbol:`mongoc_client_encryption_encrypt_text_opts_t`. | ||
| * ``popts``: A :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_t` to set as prefix options. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add separate page for
|
||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_new` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_new` | ||
30 changes: 30 additions & 0 deletions
30
src/libmongoc/doc/mongoc_client_encryption_encrypt_text_opts_set_substring.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_opts_set_substring | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_set_substring() | ||
| ======================================== | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| void | ||
| mongoc_client_encryption_encrypt_text_opts_set_substring( | ||
| mongoc_client_encryption_encrypt_text_opts_t *opts, | ||
| mongoc_client_encryption_encrypt_text_substring_opts_t *ssopts); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| Sets the substring options for text search encryption. | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
||
| * ``opts``: A :symbol:`mongoc_client_encryption_encrypt_text_opts_t`. | ||
| * ``ssopts``: A :symbol:`mongoc_client_encryption_encrypt_text_substring_opts_t` to set as substring options. | ||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_new` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_substring_opts_new` |
30 changes: 30 additions & 0 deletions
30
src/libmongoc/doc/mongoc_client_encryption_encrypt_text_opts_set_suffix.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_opts_set_suffix | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_set_suffix() | ||
| ===================================== | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| void | ||
| mongoc_client_encryption_encrypt_text_opts_set_suffix( | ||
| mongoc_client_encryption_encrypt_text_opts_t *opts, | ||
| mongoc_client_encryption_encrypt_text_suffix_opts_t *sopts); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| Sets the suffix options for text search encryption. | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
||
| * ``opts``: A :symbol:`mongoc_client_encryption_encrypt_text_opts_t`. | ||
| * ``sopts``: A :symbol:`mongoc_client_encryption_encrypt_text_suffix_opts_t` to set as suffix options. | ||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_new` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_suffix_opts_new` |
55 changes: 55 additions & 0 deletions
55
src/libmongoc/doc/mongoc_client_encryption_encrypt_text_opts_t.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_opts_t | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_t | ||
| ============================================= | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| typedef struct _mongoc_client_encryption_encrypt_text_opts_t mongoc_client_encryption_encrypt_text_opts_t; | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| TextOpts specifies index options for a Queryable Encryption field supporting "textPreview" queries. Used to set options for :symbol:`mongoc_client_encryption_encrypt()`. | ||
|
|
||
| Case sensitive and diacritic sensitive must be set. If prefix or suffix are set, substring must not be set. | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| .. only:: html | ||
|
|
||
| Functions | ||
| --------- | ||
|
|
||
| .. toctree:: | ||
| :titlesonly: | ||
| :maxdepth: 1 | ||
|
|
||
| mongoc_client_encryption_encrypt_text_opts_new | ||
| mongoc_client_encryption_encrypt_text_opts_destroy | ||
| mongoc_client_encryption_encrypt_text_opts_set_case_sensitive | ||
| mongoc_client_encryption_encrypt_text_opts_set_diacritic_sensitive | ||
| mongoc_client_encryption_encrypt_text_opts_set_prefix | ||
| mongoc_client_encryption_encrypt_text_opts_set_suffix | ||
| mongoc_client_encryption_encrypt_text_opts_set_substring | ||
| mongoc_client_encryption_encrypt_text_prefix_opts_new | ||
| mongoc_client_encryption_encrypt_text_prefix_opts_destroy | ||
| mongoc_client_encryption_encrypt_text_prefix_opts_set_str_max_query_length | ||
| mongoc_client_encryption_encrypt_text_prefix_opts_set_str_min_query_length | ||
| mongoc_client_encryption_encrypt_text_suffix_opts_new | ||
| mongoc_client_encryption_encrypt_text_suffix_opts_destroy | ||
| mongoc_client_encryption_encrypt_text_suffix_opts_set_str_max_query_length | ||
| mongoc_client_encryption_encrypt_text_suffix_opts_set_str_min_query_length | ||
| mongoc_client_encryption_encrypt_text_substring_opts_new | ||
| mongoc_client_encryption_encrypt_text_substring_opts_destroy | ||
| mongoc_client_encryption_encrypt_text_substring_opts_set_str_max_length | ||
| mongoc_client_encryption_encrypt_text_substring_opts_set_str_max_query_length | ||
| mongoc_client_encryption_encrypt_text_substring_opts_set_str_min_query_length | ||
| mongoc_client_encryption_encrypt_opts_set_text_opts | ||
|
|
||
| .. seealso:: | ||
|
|
||
| | :symbol:`mongoc_client_encryption_encrypt()` | ||
| | :symbol:`mongoc_client_encryption_encrypt_opts_t()` |
26 changes: 26 additions & 0 deletions
26
src/libmongoc/doc/mongoc_client_encryption_encrypt_text_prefix_opts_destroy.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_prefix_opts_destroy | ||
|
|
||
| mongoc_client_encryption_encrypt_text_prefix_opts_destroy() | ||
| ========================================= | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| void | ||
| mongoc_client_encryption_encrypt_text_prefix_opts_destroy(mongoc_client_encryption_encrypt_text_prefix_opts_t *opts); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| Frees a :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_t` created with :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_new()`. | ||
|
|
||
| |encrypt-text-is-experimental| | ||
|
|
||
| Parameters | ||
| ---------- | ||
|
|
||
| * ``opts``: A :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_t` to destroy. | ||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_new` |
23 changes: 23 additions & 0 deletions
23
src/libmongoc/doc/mongoc_client_encryption_encrypt_text_prefix_opts_new.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| :man_page: mongoc_client_encryption_encrypt_text_prefix_opts_new | ||
|
|
||
| mongoc_client_encryption_encrypt_text_prefix_opts_new() | ||
| ===================================== | ||
|
|
||
| Synopsis | ||
| -------- | ||
|
|
||
| .. code-block:: c | ||
|
|
||
| mongoc_client_encryption_encrypt_text_prefix_opts_t * | ||
| mongoc_client_encryption_encrypt_text_prefix_opts_new(void); | ||
|
|
||
| .. versionadded:: 2.2.0 | ||
|
|
||
| Returns | ||
| ------- | ||
|
|
||
| A new :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_t` that must be freed with :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_destroy()`. | ||
|
|
||
| .. seealso:: | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_destroy` | ||
| | :symbol:`mongoc_client_encryption_encrypt_text_opts_set_prefix` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.