AbdulSamad4068 commented on issue #978:
URL: https://github.com/apache/age/issues/978#issuecomment-1587244769
The issue you're encountering is not a bug but a misunderstanding of how to
view the updated or deleted rows in Apache AgeDB. In AgeDB, only the rows
returned from the Cypher query will be displayed in the table. To see the
changes made to the graph entities, you need to use the RETURN clause in your
queries. Here's how you can modify your UPDATE and DELETE queries to view the
affected rows:
UPDATE query:
```
SELECT * FROM cypher ('tmp', $$
MATCH (a:Part) WHERE a.part_num =~ '3+' SET a.part_num = '333' RETURN a
$$) AS (a agtype);
```
DELETE query:
```
SELECT * FROM cypher ('tmp', $$
MATCH (a:Part) WHERE a.part_num =~ '3+' DELETE a RETURN a
$$) AS (a agtype);
```
without the RETURN clause, only the rows returned from the query will be
displayed, which might not include the modified 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]