This commit is contained in:
parent
3b4e61f451
commit
5c17e151e4
Binary file not shown.
Binary file not shown.
|
|
@ -97,8 +97,11 @@ class DatabaseManager:
|
|||
result = collection.update_one(query, update, upsert=True)
|
||||
if result.upserted_id is not None:
|
||||
print(f"Inserted new document with ID: {result.upserted_id}")
|
||||
return True # 삽입 성공
|
||||
|
||||
else:
|
||||
print("Document already exists, no insertion made.")
|
||||
return False # 문서가 이미 존재하여 삽입되지 않음
|
||||
|
||||
|
||||
def query_documents(self, collection_name, query):
|
||||
|
|
|
|||
Loading…
Reference in New Issue