示例#1
0
 def get_all(self):
     return [User.from_dict(x) for x in super().get_all()]
示例#2
0
 def get(self, user_id):
     return User.from_dict(self.collection.find_one({"_id": user_id}))
示例#3
0
 def get_one_by_query(self, query):
     result = self.collection.find_one(query)
     return User.from_dict(result) if result else None