From 8f6f4c249a86891d94dcff4fa756b14c1f391d08 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 18 Feb 2025 10:01:21 +0100 Subject: [PATCH] Added more drops --- lightrag/kg/postgres_impl.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lightrag/kg/postgres_impl.py b/lightrag/kg/postgres_impl.py index 5e99ea4b..b2ee6013 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -1018,7 +1018,13 @@ class PGGraphStorage(BaseGraphStorage): self, node_label: str, max_depth: int = 5 ) -> KnowledgeGraph: raise NotImplementedError - + + async def drop(self) -> None: + """Drop the storage""" + drop_sql = SQL_TEMPLATES["drop_vdb_entity"] + await self.db.execute(drop_sql) + drop_sql = SQL_TEMPLATES["drop_vdb_relation"] + await self.db.execute(drop_sql) NAMESPACE_TABLE_MAP = { NameSpace.KV_STORE_FULL_DOCS: "LIGHTRAG_DOC_FULL",