Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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()
==================================
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fix underlines in docs files to fix the WARNING: Title underline too short. warnings causing failures in make-docs.


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,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()`
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