MONGOC_CLIENT...X_QUERY_LENGTH(3)
π MONGOC_CLIENT...X_QUERY_LENGTH(3) π
okay so bestie, this is a page from libmongoc β yes, the MongoDB C driver β and the function name is genuinely a whole paragraph, i'm not even joking. it's mongoc_client_encryption_encrypt_string_substring_opts_set_str_max_query_length, which is giving "my parents named me after the entire family tree" energy π. anyway. let's get into it.
β¨ SYNOPSIS β¨
void
mongoc_client_encryption_encrypt_string_substring_opts_set_str_max_query_length(
mongoc_client_encryption_encrypt_string_substring_opts_t *opts,
int32_t str_max_query_length);
like, look at it. iconic. unhinged. both. π
Changed in version 2.4.0: this got renamed from the now-deprecated text API. so if you're out here still using the old name, bestieβ¦ it's deprecated. it's giving legacy. move on π
this function sets the maximum query length for substring string search encryption options. that's the whole job. she's a setter. she sets. periodt. π
πΈ PARAMETERS πΈ
optsβ amongoc_client_encryption_encrypt_string_substring_opts_t. that's the options struct you're poking at. yes, the type name is also a marathon. we don't talk about it. π«Άstr_max_query_lengthβ the maximum query length for substring search. must be greater than zero. like, actually. zero is not it. negative is definitely not it. keep it> 0or don't come to the function at all, iykyk. β
β οΈ HEADS UP, THIS PART IS IMPORTANT β οΈ 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 it's released as Generally Available (GA). and the plot twist? the GA version of this feature may not be backwards compatible with the preview version. so likeβ¦ build on it at your own risk, babes. no cap. π
π¦ SEE ALSO π¦
mongoc_client_encryption_encrypt_string_substring_opts_new()mongoc_client_encryption_encrypt_string_opts_set_substring()
go read those too, they're the supporting cast and they ate π
π§ AUTHOR π§
MongoDB, Inc β the masterminds behind all of this β¨
π COPYRIGHT π
2009-present, MongoDB, Inc. β she's been booked and busy since 2009, we love a long-running gig π
and that's the page, bestie!! mwah π this lil doc is from libmongoc version 2.5.6, dated Oct 09, 2026 β screenshot it, cite it, live by it πβ¨
π¦ 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