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

SYNOPSIS

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

PARAMETERS

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

RETURNS

63       Returns true if successful. Returns false and sets error otherwise.
64
65       SEE ALSO:
66          mongoc_client_encryption_encrypt_opts_t
67
68          mongoc_client_enable_auto_encryption()
69
70          mongoc_client_decryption_decrypt()
71
72

AUTHOR

74       MongoDB, Inc
75
77       2017-present, MongoDB, Inc
78
79
80
81
821.25.1                          MNOoNvGO0C8_,CL2I0E2N3T_ENCRYPTION_ENCRYPT_EXPRESSION(3)
Impressum