This commit is contained in:
Timothy J. Baek
2024-10-13 03:02:02 -07:00
parent dff3732fcd
commit 5ffd216fca
3 changed files with 141 additions and 152 deletions

View File

@@ -154,5 +154,15 @@ class KnowledgeTable:
except Exception:
return False
def delete_all_knowledge(self) -> bool:
with get_db() as db:
try:
db.query(Knowledge).delete()
db.commit()
return True
except Exception:
return False
Knowledges = KnowledgeTable()