MongoCursorNext[MongoCursor[…]]
returns the next document in the MongoCursor[…] object.
MongoCursorNext
MongoCursorNext[MongoCursor[…]]
returns the next document in the MongoCursor[…] object.
更多信息和选项
- To use MongoCursorNext, you first need to load MongoLink using Needs["MongoLink`"].
- If MongoCursorNext is called on a cursor with no more documents, Null is returned.
- Read[MongoCursor[…]] is equivalent to MongoCursorNext[MongoCursor[…]].
- MongoCursorNext corresponds to cursor.next in the MongoDB documentation.
范例
基本范例 (1)
Needs["MongoLink`"]client = MongoConnect[]Connect to a the "WolframTestCollection" collection in the "WolframTestDB" database:
coll = client["WolframTestDB"]["WolframTestCollection"]Find all of the documents in the collection:
cursor = MongoCollectionFind[coll]View documents in the collection one at a time:
MongoCursorNext[cursor]MongoCursorNext[cursor]MongoCursorNext[cursor]When there are no more documents in the cursor, nothing will be returned:
MongoCursorNext[cursor]cursor = MongoCollectionFind[coll]Read[cursor]技术笔记
相关指南
文本
Wolfram Research (2018),MongoCursorNext,Wolfram 语言函数,https://reference.wolfram.com/language/MongoLink/ref/MongoCursorNext.html.
CMS
Wolfram 语言. 2018. "MongoCursorNext." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/MongoLink/ref/MongoCursorNext.html.
APA
Wolfram 语言. (2018). MongoCursorNext. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/MongoLink/ref/MongoCursorNext.html 年
BibTeX
@misc{reference.wolfram_2026_mongocursornext, author="Wolfram Research", title="{MongoCursorNext}", year="2018", howpublished="\url{https://reference.wolfram.com/language/MongoLink/ref/MongoCursorNext.html}", note=[Accessed: 11-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_mongocursornext, organization={Wolfram Research}, title={MongoCursorNext}, year={2018}, url={https://reference.wolfram.com/language/MongoLink/ref/MongoCursorNext.html}, note=[Accessed: 11-August-2026]}