kysmou commented on issue #55:
URL: https://github.com/apache/incubator-age/issues/55#issuecomment-828038789


   I tested it on age 0.4 version, and the delete was successful.
   -> A return statement is required after the delete statement.
   
   Below is the syntax I tested.
   
   * case 1 Person vertex delete 
   SELECT *
   FROM cypher('graph_name', $$
   match (a:Person{name: 'Andres'})-[r:acted_in]->(b:movie) detach delete a
   return a
   $$) as (a agtype);
   
   * case 2  acted_in edge delete
   SELECT *
   FROM cypher('graph_name', $$
   match (a:Person{name: 'Andres'})-[r:acted_in]->(b:movie) delete r
   return r
   $$) as (a agtype);
                                                                  a             
                                                   
   
--------------------------------------------------------------------------------------------------------------------------------
    {"id": 1407374883553283, "label": "acted_in", "end_id": 1125899906842628, 
"start_id": 844424930131970, "properties": {}}::edge
   (1 row)
   
   * Check whether deletion was successful or failed
   SELECT *
   FROM cypher('graph_name', $$
   match (a:Person{name: 'Andres'})-[r:acted_in]->(b:movie) 
   return r
   $$) as (a agtype);
    a 
   ---
   (0 rows)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to