MONGOC_CURSOR_MORE(3)
π MONGOC_CURSOR_MORE(3) β the libmongoc glow-up
okay bestie, welcome to the libmongoc corner of the manual, and today's main character is mongoc_cursor_more(3). she's short, she's simple, and honestly she's a little bit of a liar β but we'll get to that. π
β¨ SYNOPSIS β¨
bool
mongoc_cursor_more (mongoc_cursor_t *cursor);
πΈ PARAMETERS πΈ
cursorβ amongoc_cursor_t. that's it. that's the whole parameter list. periodt. π
π¦ DESCRIPTION π¦
okay so this function shall indicate if there's potentially more data to be read from the cursor. key word: potentially. this is lowkey only useful with tailable cursors. for regular cursors, bestie, use mongoc_cursor_next() β that's the one you actually want. π«Ά
π the details (read these, fr fr)
mongoc_cursor_more is unreliable because it does not contact the server to see if there are actually more documents in the result set. nope. not even a little peek. it simply returns true if:
- the cursor has not begun, or
- it has begun and there are buffered documents in the client-side cursor, or
- it has begun and the server has not yet told the cursor it is completely iterated.
that's the whole vibe check. π
β οΈ and it's unreliable with regular queries too, because it returns true for a new cursor before iteration β even if the cursor will match no documents at all. literally giving "yes babe there's definitely more" energy with zero receipts. π
it's also true if:
- the collection has been dropped on the server since the previous fetch, or
- the cursor has finished its final batch and the next batch will be empty.
so yeah. she's confident, she's just not always correct. π
β RETURNS β
true if the cursor has locally-buffered documents, or if a round-trip to the server might fetch additional documents.
that "might" is doing soooo much work in that sentence, iykyk. π
π₯ SEE ALSO π₯
- Tailable Cursor Example
go read it, it's giving tutorial energy and it slaps. π§
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
and that's the whole page, bestie β version 2.5.6, dated Oct 09, 2026, straight from the MONGOC_CURSOR_MORE(3) manual. slay, stay buffered, and check your cursor before you trust it. πβ¨
π¦ 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