MONGOC_QUERY_FLAGS_T(3)
π MONGOC_QUERY_FLAGS_T(3) β Flags for query operations β¨
okay so this is a page from libmongoc (that's the MongoDB C driver, iykyk) and it's literally just about MONGOC_QUERY_FLAGS_T(3) β the little enum of query flags. it's short, it's sweet, and bestie you're gonna get it in like two minutes fr fr π«Ά
πΈ SYNOPSIS πΈ
typedef enum {
MONGOC_QUERY_NONE = 0,
MONGOC_QUERY_TAILABLE_CURSOR = 1 << 1,
MONGOC_QUERY_SECONDARY_OK = 1 << 2,
MONGOC_QUERY_OPLOG_REPLAY = 1 << 3,
MONGOC_QUERY_NO_CURSOR_TIMEOUT = 1 << 4,
MONGOC_QUERY_AWAIT_DATA = 1 << 5,
MONGOC_QUERY_EXHAUST = 1 << 6,
MONGOC_QUERY_PARTIAL = 1 << 7,
} mongoc_query_flags_t;
like, look at those bit shifts. chef's kiss. π
π¦ DESCRIPTION π¦
so these flags are the ones that correspond to the MongoDB wire protocol β no cap, that's literally what they are. π
you can bitwise-or them together (yes, | them, that's the move), and they may modify how a query is performed in the MongoDB server. that's the whole vibe check.
π FLAG VALUES π
okay here's the lineup, one by one, no skips:
MONGOC_QUERY_NONEβ specify no query flags. it's the nothing girlie. the blank slate. the= 0.MONGOC_QUERY_TAILABLE_CURSORβ the cursor will not be closed when the last data is retrieved, so you can resume this cursor later. it's giving "don't leave, i'm not done talking" energy πMONGOC_QUERY_SECONDARY_OKβ allow query of replica set secondaries. let the side characters speak, honestly π«ΆMONGOC_QUERY_OPLOG_REPLAYβ used internally by MongoDB. main character behaviour that you're not invited to, bestie, and that's fine πMONGOC_QUERY_NO_CURSOR_TIMEOUTβ okay so normally the server times out an idle cursor after an inactivity period (10minutes). this prevents that. your cursor stays unbothered, moisturized, in its lane β¨MONGOC_QUERY_AWAIT_DATAβ use this withMONGOC_QUERY_TAILABLE_CURSOR. it'll block rather than returning no data, and after a period, it times out. patient but not that patient πΈMONGOC_QUERY_EXHAUSTβ unused. that's it. that's the whole description. it's the forgotten sibling πMONGOC_QUERY_PARTIALβ get partial results frommongosif some shards are down (instead of throwing an error). like, you take what you can get instead of having a whole meltdown π₯
β οΈ quick vibe-check warning for you: these flags correspond to the wire protocol and may modify how a query is performed in the MongoDB server β so know what you're or-ing together before you send it. π
π AUTHOR π
MongoDB, Inc β yeah, them. the whole house.
π COPYRIGHT π
2009-present, MongoDB, Inc.
β alright bestie that's the whole page, you ate it up. this came from libmongoc version 2.5.6, dated Oct 09, 2026 β screenshot it, cite it, live your truth ππ¦πππ§
π¦ 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