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.

Details and Options

Examples

Basic Examples  (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 Language function, https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionFind.html.

Text

Wolfram Research (2018), MongoCollectionFind, Wolfram Language function, https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionFind.html.

CMS

Wolfram Language. 2018. "MongoCollectionFind." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionFind.html.

APA

Wolfram Language. (2018). MongoCollectionFind. Wolfram Language & System Documentation Center. Retrieved from 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 ]}