MONGOC_CLIENT...STR_MAX_LENGTH(3)
β¨ 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β amongoc_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, typeint32_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 π
π COPYRIGHT π
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
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms