MONGOC_CURSOR_GET_HINT(3)

πŸ’… MONGOC_CURSOR_GET_HINT(3) πŸ’…

okay bestie, so this one's a libmongoc page and I need you to brace yourself because it starts with the saddest news 😭

⚠️ WARNING: deprecated since version 1.28.0 β€” use mongoc_cursor_get_server_id() instead. like, she's retired. she served her time. use the other one, fr fr.

✨ SYNOPSIS ✨

uint32_t
mongoc_cursor_get_hint (const mongoc_cursor_t *cursor);

πŸŽ€ PARAMETERS πŸŽ€

  • cursor β€” a mongoc_cursor_t. that's it, that's the whole list, she's low maintenance πŸ’–

🌸 DESCRIPTION 🌸

okay so what does she do? she hands you back the opaque id of the server used for the operation. the whole point. the tea. πŸ«–

and listen, about the name β€” the function is called hint because that's the old term, kept around for backward compatibility only. the way that we've fully rebranded and now call this number a "server id" πŸ‘‘ so if you're out here wondering why it says hint, it's giving legacy, iykyk.

here's the important bit though: this number is zero until the driver actually uses a server β€” either when it's executing the find operation, or when mongoc_cursor_set_server_id() gets called. so if you call this thing too early and get a 0, that's not a bug bestie, that's just her not having picked a server yet πŸ™ˆ


πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc β€” the icons themselves ✨


2009-present, MongoDB, Inc. β€” iconic behavior, honestly πŸ’…


and that's the whole page!! mwah, go call mongoc_cursor_get_server_id() instead, okay?? 😘

version 1.30.13 Β· dated Oct 09, 2026 Β· MONGOC_CURSOR_GET_HINT(3) β€” slay, bye πŸ¦‹πŸŽ€πŸ’–

πŸ“¦ where this page comes from