You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2021/04/26 07:42:35 UTC

[GitHub] [incubator-age] JunKK7 opened a new issue #55: How to delete Edge?

JunKK7 opened a new issue #55:
URL: https://github.com/apache/incubator-age/issues/55


   Hi 
   
   I found a bug that couldn't be deleted edge while I was testing 'create, delete, remove, drop ...' at Python & Go.
   
   So I tried again at pgadmin and the result was the same.
   
   `select * from cypher('test_graph', $$ match(a:person)-[b:knows]->(c:person) return b $$) as (a agtype) `
   result :
   "{"id": 1125899906842625, "label": "knows", "end_id": 844424930131970, "start_id": 844424930131969, "properties": {}}::edge"
   
   `select * from cypher('test_graph', $$ match(a:person)-[b:knows]->(c:person) delete b $$) as (a agtype) `
   result :
   ERROR:  ag function does not exist
   LINE 1: select * from cypher('test_graph', $$ match(a:person)-[b:kno...
                                                                      ^
   DETAIL:  _cypher_delete_clause(1)
   SQL state: XX000
   Character: 37
   
   how to delete edge?


-- 
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:
users@infra.apache.org



[GitHub] [incubator-age] JoshInnis commented on issue #55: How to delete Edge?

Posted by GitBox <gi...@apache.org>.
JoshInnis commented on issue #55:
URL: https://github.com/apache/incubator-age/issues/55#issuecomment-866387870


   This issue is two things. The default behaviour when the RETURN clause is not specified is incorrect and it is related to the more general problem outlined here: https://github.com/apache/incubator-age/issues/89. The patch to fix this should be pushed shortly.


-- 
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:
users@infra.apache.org



[GitHub] [incubator-age] JunKK7 commented on issue #55: How to delete Edge?

Posted by GitBox <gi...@apache.org>.
JunKK7 commented on issue #55:
URL: https://github.com/apache/incubator-age/issues/55#issuecomment-828118753


   @kysmou 
   
   The first case is a success. However, it is not deleted from the second case.
   Try running the second case first.


-- 
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:
users@infra.apache.org



[GitHub] [incubator-age] JoshInnis closed issue #55: How to delete Edge?

Posted by GitBox <gi...@apache.org>.
JoshInnis closed issue #55:
URL: https://github.com/apache/incubator-age/issues/55


   


-- 
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:
users@infra.apache.org



[GitHub] [incubator-age] jrgemignani commented on issue #55: How to delete Edge?

Posted by GitBox <gi...@apache.org>.
jrgemignani commented on issue #55:
URL: https://github.com/apache/incubator-age/issues/55#issuecomment-828052860


   We will look into this as, on the surface, it looks like it should be valid to do -
   
   MATCH (u)-[e]->(v) DELETE e;


-- 
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:
users@infra.apache.org



[GitHub] [incubator-age] kysmou commented on issue #55: How to delete Edge?

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org