AGEStorage: fix has_edge(): AGE always returns field names in lower case
This commit is contained in:
@@ -370,7 +370,7 @@ class AGEStorage(BaseGraphStorage):
|
|||||||
|
|
||||||
query = (
|
query = (
|
||||||
"MATCH (a:`{src_label}`)-[r]-(b:`{tgt_label}`) "
|
"MATCH (a:`{src_label}`)-[r]-(b:`{tgt_label}`) "
|
||||||
"RETURN COUNT(r) > 0 AS edgeExists"
|
"RETURN COUNT(r) > 0 AS edge_exists"
|
||||||
)
|
)
|
||||||
single_result = (
|
single_result = (
|
||||||
await self._query(
|
await self._query(
|
||||||
@@ -384,7 +384,7 @@ class AGEStorage(BaseGraphStorage):
|
|||||||
inspect.currentframe().f_code.co_name,
|
inspect.currentframe().f_code.co_name,
|
||||||
single_result[0],
|
single_result[0],
|
||||||
)
|
)
|
||||||
return single_result["edgeExists"].lower() == "true"
|
return single_result["edge_exists"].lower() == "true"
|
||||||
|
|
||||||
async def get_node(self, node_id: str) -> Union[dict, None]:
|
async def get_node(self, node_id: str) -> Union[dict, None]:
|
||||||
entity_name_label = node_id.strip('"')
|
entity_name_label = node_id.strip('"')
|
||||||
|
Reference in New Issue
Block a user