Exemplo n.º 1
0
    def find(cls, collection_name, query):
        results = Database.find(collection=collection_name, query=query)
        results = [cls(**result).to_json() for result in results]

        return results
Exemplo n.º 2
0
 def get_all(cls, collection_name):
     results = Database.find(collection=collection_name, query={})
     return [cls(**result).to_json() for result in results]