MuhammadTahaNaveed commented on issue #387:
URL: https://github.com/apache/age/issues/387#issuecomment-1349672954
> SELECT *
> FROM cypher('graph_name', $$
> MATCH (v:Useless)
> DELETE v
> $$) as (v agtype);
I think what they are trying to say by the term `"Delete single vertex"`is
that this query will delete the vertices(with label Useless) that has no edge.
>
> SELECT *
> FROM cypher('graph_name', $$
> MATCH (v:Useless)
> DETACH DELETE v
> $$) as (v agtype);
while in this case `"Delete all vertices and edges"`, DETACH option will
delete all the edges associated with the vertex (with label Useless) and then
delete the vertices.
- Here is a small example depicted below. I have created 2 vertices with
label "USELESS". Now the command below will delete them all if there is no edge
associated.

- Now I have created two vertices with label "USELESS" and both have edge
associated with them. So the command below will first delete all the edges
associated with the verteices(with label USELESS) and then the vertices.

This is what I think the documentation means.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]