MongoLink`
MongoLink`

MongoCollectionFind

MongoCollectionFind[MongoCollection[]]

returns a MongoCursor containing every document in MongoCollection.

MongoCollectionFind[MongoCollection[],query]

returns a cursor containing every document matching the query query.

MongoCollectionFind[MongoCollection[],query,projection]

the fields included in the documents is controlled by projection.

更多信息和选项

范例

基本范例  (1)

Connect to a client:

Connect to a the "WolframTestCollection" collection in the "WolframTestDB" database:

Find all of the documents in the collection:

Read the first document in the cursor:

Find all of the documents in the collection that match the query <|"age"5|>:

Read the first document in the cursor:

Find all of the documents in the collection that match the query <|"age"4|>, without returning the "date" field:

Return a list of all documents in the cursor:

Wolfram Research (2018),MongoCollectionFind,Wolfram 语言函数,https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionFind.html.

文本

Wolfram Research (2018),MongoCollectionFind,Wolfram 语言函数,https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionFind.html.

CMS

Wolfram 语言. 2018. "MongoCollectionFind." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionFind.html.

APA

Wolfram 语言. (2018). MongoCollectionFind. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionFind.html 年

BibTeX

@misc{reference.wolfram_2024_mongocollectionfind, author="Wolfram Research", title="{MongoCollectionFind}", year="2018", howpublished="\url{https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionFind.html}", note=[Accessed: 15-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_mongocollectionfind, organization={Wolfram Research}, title={MongoCollectionFind}, year={2018}, url={https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionFind.html}, note=[Accessed: 15-November-2024 ]}