This commit is contained in:
Yannick Stephan
2025-02-19 22:52:49 +01:00
parent 9277fe8c29
commit eb3306f34c
12 changed files with 7 additions and 84 deletions

View File

@@ -186,12 +186,10 @@ class PostgreSQLDB:
asyncpg.exceptions.UniqueViolationError,
asyncpg.exceptions.DuplicateTableError,
) as e:
if upsert:
print("Key value duplicate, but upsert succeeded.")
else:
logger.error(f"Upsert error: {e}")
if not upsert:
logger.error(f"PostgreSQL, upsert error: {e}")
except Exception as e:
logger.error(f"PostgreSQL database,\nsql:{sql},\ndata:{data},\nerror:{e}")
logger.error(f"PostgreSQL database, sql:{sql}, data:{data}, error:{e}")
raise
@@ -1095,9 +1093,6 @@ class PGGraphStorage(BaseGraphStorage):
) -> tuple[np.ndarray[Any, Any], list[str]]:
raise NotImplementedError
async def get_all_labels(self) -> list[str]:
raise NotImplementedError
async def get_knowledge_graph(
self, node_label: str, max_depth: int = 5
) -> KnowledgeGraph: