Skip to content
Snippets Groups Projects
Commit 4760aa53 authored by Duchateau Fabien's avatar Duchateau Fabien
Browse files
parents 31f6fce9 fbe32eed
No related branches found
No related tags found
No related merge requests found
......@@ -133,6 +133,20 @@ class Mongiris:
doc = collection.find_one(json_query)
doc_json = Mongiris.bson_to_json(doc)
return doc_json
def find_all(self, collection):
"""
Finds all documents in the given collection.
Args:
collection: a string representing the collection name
Returns:
doc_json: a dictionnary representing the documents, or None
"""
doc = collection.find()
doc_json = Mongiris.bson_to_json(doc)
return doc_json
def find_all(self, collection):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment