MONGOC_MATCHER_MATCH(3)
β¨ NAME β¨
mongoc_matcher_match β bestie, this is the little function that goes does this doc match my query π
Ok so real talk, we're in the libmongoc manual, section 3, and the star of the show is mongoc_matcher_match. Come sit with me π«Ά
π¦ SYNOPSIS π¦
bool
mongoc_matcher_match (const mongoc_matcher_t *matcher, const bson_t *document);
So what does it do? It checks whether the query that got compiled into matcher actually matches document. That's it. That's the whole vibe. Literally a vibe check but for BSON π₯
π DEPRECATED π
WARNING: mongoc_matcher_t is deprecated and will be removed in version 2.0.
Not me having to tell you this π mongoc_matcher_t is deprecated, girlies β it's getting removed in version 2.0. So if you're out here building something new on top of itβ¦ don't. This is giving "iconic but on its way out" energy π Please plan accordingly, fr fr.
πΈ PARAMETERS πΈ
- matcher β a
mongoc_matcher_t. That's the compiled-query little guy doing all the work. - query β a
bson_tthat contains the query.
(And yes the synopsis calls the second one document while this list calls it query β iykyk, we simply do not interrogate the elders π)
π RETURNS π
true if document matches the query specification you handed to mongoc_matcher_new() β¨ Otherwise false. Binary. No in-between. Periodt π
π AUTHOR π
MongoDB, Inc β the icons themselves π«Ά
π COPYRIGHT π
2017-present, MongoDB, Inc π
And that's a wrap, bestie! π¦ This page is from libmongoc, version 1.23.1, dated Apr 27, 2026 β so if you're reading this, mwah, go match some documents, and remember to check your deprecations before they check you πππΈ
π¦ where this page comes from
- debian bookworm: libmongoc-doc 1.23.1-1+deb12u3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms