MONGOC_MATCHER_NEW(3)

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

πŸ’– MONGOC_MATCHER_NEW πŸ’–

okay bestie, welcome to the libmongoc corner of the man pages, section 3, and today's main character is mongoc_matcher_new. she's giving matcher energy. she's also, unfortunately, giving deprecated energy, but we'll get to that. πŸŽ€


✨ NAME ✨

mongoc_matcher_new β€” literally just mongoc_matcher_new(), that's her whole name, no notes πŸ’…


🌸 SYNOPSIS 🌸

mongoc_matcher_t *
mongoc_matcher_new (const bson_t *query, bson_error_t *error)
   BSON_GNUC_WARN_UNUSED_RESULT BSON_GNUC_DEPRECATED;

so what she does is create a brand new mongoc_matcher_t using the query specification you hand her. that's the vibe. ✨


πŸ’€ DEPRECATED πŸ’€

WARNING: mongoc_matcher_t is deprecated and will be removed in version 2.0.

not me having to break the news 😭 bestie she's deprecated. she is being removed in version 2.0. so like, use her if you must, but know she's on her way out the door. gone but not forgotten fr fr 🫢


πŸ¦‹ PARAMETERS πŸ¦‹

  • query β€” a bson_t. yes, that's the whole description. she's a bson_t. slay.
  • error β€” an optional spot to put a bson_error_t, or you can just pass NULL if you're feeling chaotic πŸ™ˆ

🌈 ERRORS 🌈

any errors get propagated via the error parameter. so if you passed her a real place to land, that's where the drama shows up. ✨


πŸ‘‘ RETURNS πŸ‘‘

she hands you back a freshly allocated mongoc_matcher_t β€” and bestie, please free her with mongoc_matcher_destroy() when you're done, she deserves that. πŸŽ€

but if things go wrong? you get NULL back and error gets set. this can happen if query contains an invalid query specification. so like, garbage in, NULL out, iykyk πŸ’…


πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc β€” iconic, we stan 🫢


2017-present, MongoDB, Inc


okay that's the whole page, no cap. this was MONGOC_MATCHER_NEW(3) from libmongoc, version 1.23.1, dated Apr 27, 2026. love her, use her while she's here, and remember: deprecated doesn't mean forgotten. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from