Compare commits

...
Sign in to create a new pull request.

8 commits

Author SHA1 Message Date
hajdul88
723a3e7be4
Merge branch 'dev' into memgraph-integration-fixes 2025-06-19 15:22:39 +02:00
hajdul88
50016e45f7
Merge branch 'dev' into memgraph-integration-fixes 2025-06-19 14:53:45 +02:00
hajdul88
58bc710c43 Fix: fixes ruff 2025-06-19 14:46:48 +02:00
hajdul88
2d0f3e7f1f
Merge branch 'dev' into memgraph-integration-fixes 2025-06-19 14:17:44 +02:00
matea16
5ede210f12 update memgraph integration 2025-06-17 15:29:33 +02:00
Matea Pesic
ce9173c598
Merge branch 'topoteretes:main' into main 2025-06-13 14:38:19 +02:00
Matea Pesic
879bcc1edf
Merge branch 'topoteretes:main' into main 2025-05-21 14:14:32 +02:00
github-actions[bot]
7700c2dd0e Update contributors list 2025-05-12 00:48:17 +00:00

View file

@ -376,12 +376,19 @@ class MemgraphAdapter(GraphDBInterface):
The result of the edge addition operation, including relationship details. The result of the edge addition operation, including relationship details.
""" """
exists = await asyncio.gather(self.has_node(str(from_node)), self.has_node(str(to_node)))
if not all(exists):
return None
serialized_properties = self.serialize_properties(edge_properties or {}) serialized_properties = self.serialize_properties(edge_properties or {})
query = dedent( query = dedent(
f"""\ f"""\
MATCH (from_node {{id: $from_node}}), MATCH (from_node {{id: $from_node}}),
(to_node {{id: $to_node}}) (to_node {{id: $to_node}})
WHERE from_node IS NOT NULL AND to_node IS NOT NULL
MERGE (from_node)-[r:{relationship_name}]->(to_node) MERGE (from_node)-[r:{relationship_name}]->(to_node)
ON CREATE SET r += $properties, r.updated_at = timestamp() ON CREATE SET r += $properties, r.updated_at = timestamp()
ON MATCH SET r += $properties, r.updated_at = timestamp() ON MATCH SET r += $properties, r.updated_at = timestamp()