MONGOC_CLIENT...STR_MAX_LENGTH(3)

πŸ“¦
version 2.5.6 Β· 2 versions
, in epel 10

✨ okay so, welcome to mongoc_client_encryption_encrypt_string_substring_opts_set_str_max_length(3) ✨

Hii bestie 🫢 this little cutie lives in libmongoc, and it's the one that sets your max string length for substring string search encryption options. It's giving "small function, big responsibility" tbh. Let's get into it πŸ’…


🌸 SYNOPSIS 🌸

void
mongoc_client_encryption_encrypt_string_substring_opts_set_str_max_length(
   mongoc_client_encryption_encrypt_string_substring_opts_t *opts,
   int32_t str_max_length);

That's the whole signature, no cap. Returns void, so like… she does her thing and doesn't report back. Very mysterious of her ✨

πŸ¦‹ Changed in version 2.4.0: Renamed from the now-deprecated text API. So if you're out here reading old docs β€” that's why nothing matches, bestie. Not you, it's the deprecated API 😭

She sets the maximum string length for substring string search encryption options. That's it, that's the job, and she does it flawlessly πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

  • opts β€” a mongoc_client_encryption_encrypt_string_substring_opts_t. Yeah the type name is a whole paragraph, we don't talk about it πŸ’€ it's the options struct she's editing.
  • str_max_length β€” the maximum string length for substring search, type int32_t. It must be greater than zero. Like, zero is not invited to this party, and neither are the negatives. Periodt πŸ™ˆ

πŸ”₯ A LIL WARNING (important, fr fr) πŸ”₯

πŸ’€ The "substringPreview" query type is in preview and should be used for experimental workloads only. This feature is unstable and its security is not guaranteed until released as Generally Available (GA). And listen β€” the GA version of this feature may not be backwards compatible with the preview version. So don't build your whole personality on preview behaviour, okay? 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Go give these siblings some love too:

  • mongoc_client_encryption_encrypt_string_substring_opts_new()
  • mongoc_client_encryption_encrypt_string_opts_set_substring()

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” the icons behind the whole thing πŸ’–


2009-present, MongoDB, Inc. β€” yes, they've been at this since 2009, legends only 🫢


And that's a wrap, bestie ✨ this page was brought to you by libmongoc version 2.5.6, dated Oct 09, 2026 β€” go forth, set those max lengths, and stay greater than zero πŸ’…πŸŽ€

πŸ“¦ where this page comes from