MONGOC_CURSOR_CLONE(3)
π MONGOC_CURSOR_CLONE(3) π
okay so bestie, welcome to the libmongoc manual page for mongoc_cursor_clone β this is the one, this is THE icon, the moment, the clone arc we've all been waiting for π§¬β¨
β¨ SYNOPSIS β¨
mongoc_cursor_t *
mongoc_cursor_clone (const mongoc_cursor_t *cursor);
like, that's literally the whole vibe check right there π«Ά
πΈ PARAMETERS πΈ
cursorβ amongoc_cursor_t. that's it. that's the whole parameter list, she's a simple queen π
π¦ DESCRIPTION π¦
so this function shall create a copy of a mongoc_cursor_t. no cap, an actual copy, she's giving twin energy π
the cloned cursor gets reset to the beginning of the query, which means the query will be re-executed on the MongoDB server when mongoc_cursor_next() is called. so like, it's not a lazy copy sitting there doing nothing β the moment you hit next(), the server's doing the work all over again π₯
iykyk, that's the important bit: re-execution on the server. not a free lunch, just a fresh start β¨
π RETURNS π
you get a newly allocated mongoc_cursor_t β a whole new cursor, freshly allocated, main character energy π
and like any new cursor bestie, she should be freed with mongoc_cursor_destroy() when no longer in use. don't leave her hanging, that's rude π
WARNING: failure to handle the result of this function is a programming error. like, fr fr, that's a programming error, not a cute little oopsie π handle your return values, bestie!!
π AUTHOR π
MongoDB, Inc β the icon, the legend, the moment π
π COPYRIGHT π
2009-present, MongoDB, Inc. β slay, protecting the intellectual property since 2009 π
and that's the page, bestie!! π this was libmongoc manual page MONGOC_CURSOR_CLONE(3), version 2.5.6, dated Oct 09, 2026 β go forth and clone responsibly, mwah πππ¦
π¦ 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