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
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
: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_encrypt_text_opts_t *text_opts);

.. versionadded:: 2.2.0

Sets the text search encryption options for explicit encryption.

Parameters
----------

* ``opts``: A :symbol:`mongoc_client_encryption_encrypt_opts_t`.
* ``text_opts``: A :symbol:`mongoc_encrypt_text_opts_t` specifying text search options.

.. seealso::
| :symbol:`mongoc_encrypt_text_opts_t`
| :symbol:`mongoc_encrypt_text_opts_new`
| :symbol:`mongoc_encrypt_text_opts_set_prefix`
| :symbol:`mongoc_encrypt_text_opts_set_suffix`
| :symbol:`mongoc_encrypt_text_opts_set_substring`
24 changes: 24 additions & 0 deletions src/libmongoc/doc/mongoc_encrypt_text_opts_destroy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:man_page: mongoc_encrypt_text_opts_destroy

mongoc_encrypt_text_opts_destroy()
==================================

Synopsis
--------

.. code-block:: c

void
mongoc_encrypt_text_opts_destroy(mongoc_encrypt_text_opts_t *topts);

.. versionadded:: 2.2.0

Frees a :symbol:`mongoc_encrypt_text_opts_t` created with :symbol:`mongoc_encrypt_text_opts_new()`.

Parameters
----------

* ``topts``: A :symbol:`mongoc_encrypt_text_opts_t` to destroy.

.. seealso::
| :symbol:`mongoc_encrypt_text_opts_new`
25 changes: 25 additions & 0 deletions src/libmongoc/doc/mongoc_encrypt_text_opts_new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
:man_page: mongoc_encrypt_text_opts_new

mongoc_encrypt_text_opts_new()
==============================

Synopsis
--------

.. code-block:: c

mongoc_encrypt_text_opts_t *
mongoc_encrypt_text_opts_new(void);

.. versionadded:: 2.2.0

Returns
-------

A new :symbol:`mongoc_encrypt_text_opts_t` that must be freed with :symbol:`mongoc_encrypt_text_opts_destroy()`.

.. seealso::
| :symbol:`mongoc_encrypt_text_opts_destroy`
| :symbol:`mongoc_encrypt_text_opts_set_prefix`
| :symbol:`mongoc_encrypt_text_opts_set_suffix`
| :symbol:`mongoc_encrypt_text_opts_set_substring`
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:man_page: mongoc_encrypt_text_opts_set_case_sensitive

mongoc_encrypt_text_opts_set_case_sensitive()
============================================

Synopsis
--------

.. code-block:: c

void
mongoc_encrypt_text_opts_set_case_sensitive(
mongoc_encrypt_text_opts_t *opts,
bool case_sensitive);

.. versionadded:: 2.2.0

Sets whether text search is case sensitive.

Parameters
----------

* ``opts``: A :symbol:`mongoc_encrypt_text_opts_t`.
* ``case_sensitive``: If true, text search is case sensitive.

.. seealso::
| :symbol:`mongoc_encrypt_text_opts_t`
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:man_page: mongoc_encrypt_text_opts_set_diacritic_sensitive

mongoc_encrypt_text_opts_set_diacritic_sensitive()
=================================================

Synopsis
--------

.. code-block:: c

void
mongoc_encrypt_text_opts_set_diacritic_sensitive(
mongoc_encrypt_text_opts_t *opts,
bool diacritic_sensitive);

.. versionadded:: 2.2.0

Sets whether text search is diacritic sensitive.

Parameters
----------

* ``opts``: A :symbol:`mongoc_encrypt_text_opts_t`.
* ``diacritic_sensitive``: If true, text search is diacritic sensitive.

.. seealso::
| :symbol:`mongoc_encrypt_text_opts_t`
28 changes: 28 additions & 0 deletions src/libmongoc/doc/mongoc_encrypt_text_opts_set_prefix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
:man_page: mongoc_encrypt_text_opts_set_prefix

mongoc_encrypt_text_opts_set_prefix()
=====================================

Synopsis
--------

.. code-block:: c

void
mongoc_encrypt_text_opts_set_prefix(
mongoc_encrypt_text_opts_t *opts,
mongoc_encrypt_text_prefix_opts_t *popts);

.. versionadded:: 2.2.0

Sets the prefix options for text search encryption.

Parameters
----------

* ``opts``: A :symbol:`mongoc_encrypt_text_opts_t`.
* ``popts``: A :symbol:`mongoc_encrypt_text_prefix_opts_t` to set as prefix options.

.. seealso::
| :symbol:`mongoc_encrypt_text_opts_new`
| :symbol:`mongoc_encrypt_text_prefix_opts_new`
28 changes: 28 additions & 0 deletions src/libmongoc/doc/mongoc_encrypt_text_opts_set_substring.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
:man_page: mongoc_encrypt_text_opts_set_substring

mongoc_encrypt_text_opts_set_substring()
========================================

Synopsis
--------

.. code-block:: c

void
mongoc_encrypt_text_opts_set_substring(
mongoc_encrypt_text_opts_t *opts,
mongoc_encrypt_text_substring_opts_t *ssopts);

.. versionadded:: 2.2.0

Sets the substring options for text search encryption.

Parameters
----------

* ``opts``: A :symbol:`mongoc_encrypt_text_opts_t`.
* ``ssopts``: A :symbol:`mongoc_encrypt_text_substring_opts_t` to set as substring options.

.. seealso::
| :symbol:`mongoc_encrypt_text_opts_new`
| :symbol:`mongoc_encrypt_text_substring_opts_new`
28 changes: 28 additions & 0 deletions src/libmongoc/doc/mongoc_encrypt_text_opts_set_suffix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
:man_page: mongoc_encrypt_text_opts_set_suffix

mongoc_encrypt_text_opts_set_suffix()
=====================================

Synopsis
--------

.. code-block:: c

void
mongoc_encrypt_text_opts_set_suffix(
mongoc_encrypt_text_opts_t *opts,
mongoc_encrypt_text_suffix_opts_t *sopts);

.. versionadded:: 2.2.0

Sets the suffix options for text search encryption.

Parameters
----------

* ``opts``: A :symbol:`mongoc_encrypt_text_opts_t`.
* ``sopts``: A :symbol:`mongoc_encrypt_text_suffix_opts_t` to set as suffix options.

.. seealso::
| :symbol:`mongoc_encrypt_text_opts_new`
| :symbol:`mongoc_encrypt_text_suffix_opts_new`
53 changes: 53 additions & 0 deletions src/libmongoc/doc/mongoc_encrypt_text_opts_t.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
:man_page: mongoc_encrypt_text_opts_t

mongoc_encrypt_text_opts_t
=============================================

Synopsis
--------

.. code-block:: c

typedef struct _mongoc_encrypt_text_opts_t mongoc_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.

.. only:: html

Functions
---------

.. toctree::
:titlesonly:
:maxdepth: 1

mongoc_encrypt_text_opts_new
mongoc_encrypt_text_opts_destroy
mongoc_encrypt_text_opts_set_case_sensitive
mongoc_encrypt_text_opts_set_diacritic_sensitive
mongoc_encrypt_text_opts_set_prefix
mongoc_encrypt_text_opts_set_suffix
mongoc_encrypt_text_opts_set_substring
mongoc_encrypt_text_prefix_opts_new
mongoc_encrypt_text_prefix_opts_destroy
mongoc_encrypt_text_prefix_opts_set_str_max_query_length
mongoc_encrypt_text_prefix_opts_set_str_min_query_length
mongoc_encrypt_text_suffix_opts_new
mongoc_encrypt_text_suffix_opts_destroy
mongoc_encrypt_text_suffix_opts_set_str_max_query_length
mongoc_encrypt_text_suffix_opts_set_str_min_query_length
mongoc_encrypt_text_substring_opts_new
mongoc_encrypt_text_substring_opts_destroy
mongoc_encrypt_text_substring_opts_set_str_max_length
mongoc_encrypt_text_substring_opts_set_str_max_query_length
mongoc_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()`
24 changes: 24 additions & 0 deletions src/libmongoc/doc/mongoc_encrypt_text_prefix_opts_destroy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:man_page: mongoc_encrypt_text_prefix_opts_destroy

mongoc_encrypt_text_prefix_opts_destroy()
========================================

Synopsis
--------

.. code-block:: c

void
mongoc_encrypt_text_prefix_opts_destroy(mongoc_encrypt_text_prefix_opts_t *opts);

.. versionadded:: 2.2.0

Frees a :symbol:`mongoc_encrypt_text_prefix_opts_t` created with :symbol:`mongoc_encrypt_text_prefix_opts_new()`.

Parameters
----------

* ``opts``: A :symbol:`mongoc_encrypt_text_prefix_opts_t` to destroy.

.. seealso::
| :symbol:`mongoc_encrypt_text_prefix_opts_new`
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
:man_page: mongoc_encrypt_text_prefix_opts_set_str_max_query_length

mongoc_encrypt_text_prefix_opts_set_str_max_query_length()
=========================================================

Synopsis
--------

.. code-block:: c

void
mongoc_encrypt_text_prefix_opts_set_str_max_query_length(
mongoc_encrypt_text_prefix_opts_t *opts,
int32_t str_max_query_length);

.. versionadded:: 2.2.0

Sets the maximum query length for prefix text search encryption options.

Parameters
----------

* ``opts``: A :symbol:`mongoc_encrypt_text_prefix_opts_t`.
* ``str_max_query_length``: The maximum query length for prefix search. Must be greater than zero.

.. seealso::
| :symbol:`mongoc_encrypt_text_prefix_opts_new`
| :symbol:`mongoc_encrypt_text_opts_set_prefix`
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
:man_page: mongoc_encrypt_text_prefix_opts_set_str_min_query_length

mongoc_encrypt_text_prefix_opts_set_str_min_query_length()
=========================================================

Synopsis
--------

.. code-block:: c

void
mongoc_encrypt_text_prefix_opts_set_str_min_query_length(
mongoc_encrypt_text_prefix_opts_t *opts,
int32_t str_min_query_length);

.. versionadded:: 2.2.0

Sets the minimum query length for prefix text search encryption options.

Parameters
----------

* ``opts``: A :symbol:`mongoc_encrypt_text_prefix_opts_t`.
* ``str_min_query_length``: The minimum query length for prefix search. Must be greater than zero.

.. seealso::
| :symbol:`mongoc_encrypt_text_prefix_opts_new`
| :symbol:`mongoc_encrypt_text_opts_set_prefix`
Loading