@@ -687,6 +687,7 @@ def _parse_version(version):
687687/// String constant for setopt_algorithm "Indexed" explicit encryption
688688/// String constant for setopt_algorithm "Unindexed" explicit encryption
689689// DEPRECATED: support "RangePreview" has been removed in favor of "range".
690+ /// NOTE: "textPreview" is experimental only and may be removed in a future non-major release.
690691
691692/**
692693 * Identify the AWS KMS master key to use for creating a data key.
@@ -1466,6 +1467,33 @@ def _parse_version(version):
14661467 */
14671468bool mongocrypt_ctx_setopt_algorithm_range(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *opts);
14681469
1470+ /**
1471+ * Set options for explicit encryption with the "textPreview" algorithm.
1472+ *
1473+ * NOTE: "textPreview" is experimental only and may be removed in a future non-major release.
1474+ * @p opts is a BSON document of the form:
1475+ * {
1476+ * "caseSensitive": bool,
1477+ * . "diacriticSensitive": bool,
1478+ * . "prefix": Optional{
1479+ * . "strMaxQueryLength": Int32,
1480+ * . "strMinQueryLength": Int32,
1481+ * . },
1482+ * . "suffix": Optional{
1483+ * . "strMaxQueryLength": Int32,
1484+ * . "strMinQueryLength": Int32,
1485+ * . },
1486+ * . "substring": Optional{
1487+ * . "strMaxLength": Int32,
1488+ * . "strMaxQueryLength": Int32,
1489+ * . "strMinQueryLength": Int32,
1490+ * . },
1491+ * }
1492+ *
1493+ * "prefix" and "suffix" can both be set.
1494+ */
1495+ bool mongocrypt_ctx_setopt_algorithm_text(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *opts);
1496+
14691497/**
14701498 * Set the expiration time for the data encryption key cache. Defaults to 60 seconds if not set.
14711499 *
0 commit comments