MONGOC_CLIENT_...S_SET_SPARSITY(3)

πŸ’… MONGOC_CLIENT_...S_SET_SPARSITY(3) πŸ’…

Okay bestie, welcome to the libmongoc corner πŸ’– This one is all about setting sparsity on your range encryption opts, and yes, the vibes are very β€œniche but important.” Let’s get into it.

✨ SYNOPSIS ✨

          void
          mongoc_client_encryption_encrypt_range_opts_set_sparsity (
               mongoc_client_encryption_encrypt_range_opts_t *range_opts, int64_t sparsity);

✨ New in version 1.24.0. ✨

This function sets sparsity for explicit encryption. It only applies when the algorithm set by mongoc_client_encryption_encrypt_opts_set_algorithm() is "Range". It is an error to set sparsity when the algorithm is not "Range".

🚨 Bestie, read that again: setting sparsity when the algorithm is not "Range" is an error. Not a vibe. Not a warning. An error.

Sparsity may be used to tune performance. When omitted, a default value is used.

Sparsity must match the value set in the encryptedFields of the destination collection. It is an error to set a different value.

😭 So yes, it has to match. This is not a β€œclose enough” situation. A different value is an error.

🌸 PARAMETERS 🌸

  • range_opts β€” a mongoc_client_encryption_encrypt_range_opts_t
  • sparsity β€” a non-negative sparsity.

🫢 SEE ALSO 🫢

  • mongoc_client_encryption_encrypt_range_opts_t

✨ AUTHOR ✨

MongoDB, Inc

2009-present, MongoDB, Inc.


Bye bestie πŸ’– this libmongoc page is version 2.5.6, dated Oct 09, 202 (the footer literally cuts off there, no cap 😭). Mwah! πŸ’…

πŸ“¦ where this page comes from