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

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: