MONGOC_MATCHER_MATCH(3)

πŸ“¦
version 1.23.1 Β· 2 versions
, in debian bookworm

✨ 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_t that 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 🫢


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