Writing and speaking rework, some changes to module upload
This commit is contained in:
@@ -34,8 +34,8 @@ class MongoDB(IDocumentStore):
|
||||
cursor = self._mongo_db[collection].find(query)
|
||||
return [document async for document in cursor]
|
||||
|
||||
async def update(self, collection: str, filter_query: Dict, update: Dict) -> Optional[str]:
|
||||
return (await self._mongo_db[collection].update_one(filter_query, update)).upserted_id
|
||||
async def update(self, collection: str, filter_query: Dict, update: Dict) -> Optional[str]:
|
||||
return (await self._mongo_db[collection].update_one(filter_query, update, upsert=True)).upserted_id
|
||||
|
||||
async def get_doc_by_id(self, collection: str, doc_id: str) -> Optional[Dict]:
|
||||
return await self._mongo_db[collection].find_one({"id": doc_id})
|
||||
|
||||
Reference in New Issue
Block a user