Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
248d35b
prose tests draft
mdb-ad Aug 6, 2025
6c83fe8
syntax fix
mdb-ad Aug 6, 2025
6a7dda8
substring tests + format
mdb-ad Aug 7, 2025
772abde
update libmongocrypt
mdb-ad Aug 7, 2025
854c7ce
require 8.2
mdb-ad Aug 7, 2025
ba2f5e6
address memory leaks
mdb-ad Aug 7, 2025
54b6504
Merge branch 'master' into text-search
mdb-ad Aug 22, 2025
fdce7c5
c driver format changes
mdb-ad Aug 22, 2025
1cfb661
struct for every index type
mdb-ad Aug 25, 2025
5fa53b7
no need for set field if text opts are a pointer
mdb-ad Aug 27, 2025
43ea85f
prose test fixes
mdb-ad Aug 28, 2025
29f8bb2
free index opts
mdb-ad Aug 28, 2025
cc7603a
remove accidental double declarations from merge
mdb-ad Aug 28, 2025
07792f3
optional diacritic and case sensitive
mdb-ad Oct 3, 2025
9af098f
field names
mdb-ad Oct 3, 2025
dac9b64
docs
mdb-ad Oct 3, 2025
e6017a6
next release is 2.2.0
mdb-ad Oct 3, 2025
5c25230
Merge branch 'master' into text-search
mdb-ad Oct 3, 2025
50a0888
review comments
mdb-ad Oct 24, 2025
b2f7b5f
docs fixes
mdb-ad Oct 24, 2025
3e6be76
index text opts
mdb-ad Oct 28, 2025
f7d5620
Merge branch 'master' into text-search
mdb-ad Oct 28, 2025
706d767
missing assert
mdb-ad Oct 28, 2025
b1ba169
format
mdb-ad Oct 28, 2025
9a31103
naming consistency
mdb-ad Oct 28, 2025
d6ac164
missing index
mdb-ad Oct 29, 2025
b8fa71c
format
mdb-ad Oct 29, 2025
fa67c0e
rename underlines
mdb-ad Nov 6, 2025
c6c6277
libmongocrypt version declaration
mdb-ad Nov 6, 2025
45db2f0
Revert "libmongocrypt version declaration"
mdb-ad Nov 7, 2025
85b09d9
Merge branch 'master' into text-search
mdb-ad Nov 19, 2025
dca9606
docs fixes
mdb-ad Nov 19, 2025
25be550
str max length docs
mdb-ad Nov 19, 2025
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
4 changes: 2 additions & 2 deletions src/libmongoc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,10 @@ elseif (NOT ENABLE_CLIENT_SIDE_ENCRYPTION STREQUAL OFF)
find_package (mongocrypt QUIET)
endif ()

if (mongocrypt_FOUND AND "${mongocrypt_VERSION}" VERSION_LESS 1.15.0)
if (mongocrypt_FOUND AND "${mongocrypt_VERSION}" VERSION_LESS 1.15.1)
message (STATUS " libmongocrypt found at ${mongocrypt_DIR}")
message (STATUS " libmongocrypt version ${mongocrypt_VERSION} found")
message (STATUS " libmongocrypt version 1.15.0 is required to enable In-Use Encryption Support.")
message (STATUS " libmongocrypt version 1.15.1 is required to enable In-Use Encryption Support.")
set (REQUIRED_MONGOCRYPT_VERSION_FOUND OFF)
elseif (mongocrypt_FOUND)
set (REQUIRED_MONGOCRYPT_VERSION_FOUND ON)
Expand Down
1 change: 1 addition & 0 deletions src/libmongoc/doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ API Reference
mongoc_client_encryption_datakey_opts_t
mongoc_client_encryption_rewrap_many_datakey_result_t
mongoc_client_encryption_encrypt_opts_t
mongoc_client_encryption_encrypt_text_opts_t
mongoc_client_encryption_encrypt_range_opts_t
mongoc_client_encryption_opts_t
mongoc_client_pool_t
Expand Down
6 changes: 6 additions & 0 deletions src/libmongoc/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ def _maybe_update_inventories(app: Sphinx):
.. |bson_t-opt-storage-ptr| replace::
maybe-``NULL`` pointer to `overwritable storage <bson_lifetimes_>`_ for a :symbol:`bson_t`

.. |encrypt-text-is-experimental| replace::
The "TextPreview" algorithm is in preview and should be used for experimental workloads only.
These features are unstable and their security is not guaranteed until released as Generally
Available (GA). The GA version of these features may not be backwards compatible with the
preview version.

.. _mongodb_docs_cdriver: https://www.mongodb.com/docs/languages/c/c-driver/current/

.. _queryable-encryption: https://www.mongodb.com/docs/languages/c/c-driver/current/libmongoc/guides/queryable-encryption/
Expand Down
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`
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`
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`
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`
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`
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.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add separate page for mongoc_client_encryption_encrypt_text_prefix_opts_t (and suffix/substring) to fix error in make-docs task:

WARNING: unknown document: 'mongoc_client_encryption_encrypt_text_prefix_opts_t'


.. seealso::
| :symbol:`mongoc_client_encryption_encrypt_text_opts_new`
| :symbol:`mongoc_client_encryption_encrypt_text_prefix_opts_new`
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`
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`
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
: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_t
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_t
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_t
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()`
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`
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`
Loading