DEV Community

Muhammad Muneeb Ur Rehman
Muhammad Muneeb Ur Rehman

Posted on

Delete Edges from Apache AGE

In Apache AGE, we can delete any edge by using DELETE command.

Query:
SELECT *
FROM cypher('graph_name', $$
MATCH (n {name: 'Andres'})-[r:KNOWS]->()
DELETE r
$$) as (v agtype);

Explanation:
Firstly, we find the edge we want to delete by using MATCH for instance, MATCH (n {name: 'Andres'})-[r:KNOWS]->(). Then, we delete that edge by using, DELETE r.

For more details visit: https://age.apache.org/overview/

AGE Github Link: https://github.com/apache/age

AGE Viewer Github Link: https://github.com/apache/age-viewer

Top comments (0)