1MONGOC_CLIENT_ENCRYPTION_ENCRYPT_MEOXNPlGRiOEbCSm_SoCInLOgINoE(cN3T)_ENCRYPTION_ENCRYPT_EXPRESSION(3)
2
3
4

NAME

6       mongoc_client_encryption_encrypt_expression   -   mongoc_client_encryp‐
7       tion_encrypt_expression()
8

SYNOPSIS

10          bool
11          mongoc_client_encryption_encrypt_expression (
12             mongoc_client_encryption_t *client_encryption,
13             const bson_t *expr,
14             mongoc_client_encryption_encrypt_opts_t *opts,
15             bson_t *expr_out,
16             bson_error_t *error);
17
18       IMPORTANT:
19          The Range algorithm is experimental only and not intended for public
20          use.  It is subject to breaking changes. This API is part of the ex‐
21          perimental Queryable Encryption API and may be subject  to  breaking
22          changes in future releases.
23
24       New in version 1.24.0.
25
26
27       Encrypts  a  Match  Expression or Aggregate Expression to query a range
28       index.
29
30       To query with a RangePreview encrypted payload, use  a  mongoc_client_t
31       configured        with        mongoc_auto_encryption_opts_t.        The
32       mongoc_auto_encryption_opts_t may be configured to bypass query  analy‐
33       sis  with mongoc_auto_encryption_opts_set_bypass_query_analysis().  The
34       mongoc_auto_encryption_opts_t must not be configured  to  bypass  auto‐
35       matic                          encryption                          with
36       mongoc_auto_encryption_opts_set_bypass_auto_encryption().
37
38       To query with a RangePreview payload, expr must be one of the following
39       forms:
40
41       1. A Match Expression of the following form:
42
43             // $gt may also be $gte. $lt may also be $lte.
44             // Can include one of $gt/$gte/$lt/$lte. It is not required to include both.
45             {"$and": [{"<field>": {"$gt": "<value1>"}}, {"<field>": {"$lt": "<value2>" }}]}
46
47       2. An Aggregation Expression of this form:
48
49             // $gt may also be $gte. $lt may also be $lte
50             // Can include one of $gt/$gte/$lt/$lte. It is not required to include both.
51             {"$and": [{"$gt": ["<fieldpath>", "<value1>"]}, {"$lt": ["<fieldpath>", "<value2>"]}]
52

PARAMETERS

54client_encryption: A mongoc_client_encryption_t
55
56expr: The expression to encrypt.
57
58opts: A mongoc_client_encryption_encrypt_opts_t.
59
60expr_out:  A  bson_t for the resulting encrypted expression. expr_out
61         is  always  initialized  (even  on   failure).   Caller   must   call
62         bson_destroy() to free.
63
64error: A bson_error_t set on failure.
65

RETURNS

67       Returns true if successful. Returns false and sets error otherwise.
68
69       SEE ALSO:
70          mongoc_client_encryption_encrypt_opts_t
71
72          mongoc_client_enable_auto_encryption()
73
74          mongoc_client_decryption_decrypt()
75
76

AUTHOR

78       MongoDB, Inc
79
81       2017-present, MongoDB, Inc
82
83
84
85
861.24.3                          MAOuNgGO1C7_,CL2I0E2N3T_ENCRYPTION_ENCRYPT_EXPRESSION(3)
Impressum