.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "MONGOC_CLIENT_ENCRYPTION_ENCRYPT_EXPRESSION" "3" "May 07, 2024" "1.27.1" "libmongoc" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX bool mongoc_client_encryption_encrypt_expression ( mongoc_client_encryption_t *client_encryption, const bson_t *expr, mongoc_client_encryption_encrypt_opts_t *opts, bson_t *expr_out, bson_error_t *error); .EE .UNINDENT .UNINDENT .sp \fBIMPORTANT:\fP .INDENT 0.0 .INDENT 3.5 The Range algorithm is experimental only and not intended for public use. It is subject to breaking changes. This API is part of the experimental \fI\%Queryable Encryption\fP API and may be subject to breaking changes in future releases. .UNINDENT .UNINDENT .sp New in version 1.24.0. .sp Encrypts a Match Expression or Aggregate Expression to query a range index. .sp To query with a \fBRangePreview\fP encrypted payload, use a \fI\%mongoc_client_t\fP configured with \fI\%mongoc_auto_encryption_opts_t\fP\&. The \fI\%mongoc_auto_encryption_opts_t\fP may be configured to bypass query analysis with \fI\%mongoc_auto_encryption_opts_set_bypass_query_analysis()\fP\&. The \fI\%mongoc_auto_encryption_opts_t\fP must not be configured to bypass automatic encryption with \fI\%mongoc_auto_encryption_opts_set_bypass_auto_encryption()\fP\&. .sp To query with a \fBRangePreview\fP payload, \fBexpr\fP must be one of the following forms: .INDENT 0.0 .IP 1. 3 A Match Expression of the following form: .INDENT 3.0 .INDENT 3.5 .sp .EX // $gt may also be $gte. $lt may also be $lte. // Can include one of $gt/$gte/$lt/$lte. It is not required to include both. {\(dq$and\(dq: [{\(dq\(dq: {\(dq$gt\(dq: \(dq\(dq}}, {\(dq\(dq: {\(dq$lt\(dq: \(dq\(dq }}]} .EE .UNINDENT .UNINDENT .IP 2. 3 An Aggregation Expression of this form: .INDENT 3.0 .INDENT 3.5 .sp .EX // $gt may also be $gte. $lt may also be $lte // Can include one of $gt/$gte/$lt/$lte. It is not required to include both. {\(dq$and\(dq: [{\(dq$gt\(dq: [\(dq\(dq, \(dq\(dq]}, {\(dq$lt\(dq: [\(dq\(dq, \(dq\(dq]}] .EE .UNINDENT .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBclient_encryption\fP: A \fI\%mongoc_client_encryption_t\fP .IP \(bu 2 \fBexpr\fP: The expression to encrypt. .IP \(bu 2 \fBopts\fP: A \fI\%mongoc_client_encryption_encrypt_opts_t\fP\&. .IP \(bu 2 \fBexpr_out\fP: A \fI\%bson_t\fP for the resulting encrypted expression. \fBexpr_out\fP is always initialized (even on failure). Caller must call \fI\%bson_destroy()\fP to free. .IP \(bu 2 \fBerror\fP: A \fI\%bson_error_t\fP set on failure. .UNINDENT .SH RETURNS .sp Returns \fBtrue\fP if successful. Returns \fBfalse\fP and sets \fBerror\fP otherwise. .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 .nf \fI\%mongoc_client_encryption_encrypt_opts_t\fP .fi .sp .nf \fI\%mongoc_client_enable_auto_encryption()\fP .fi .sp .nf \fI\%mongoc_client_decryption_decrypt()\fP .fi .sp .UNINDENT .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .