You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "AbdulSamad4068 (via GitHub)" <gi...@apache.org> on 2023/06/12 12:29:10 UTC

[GitHub] [age] AbdulSamad4068 commented on issue #978: The count number does not match on UPDATE and DELETE.

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: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org