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

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

Zeesh-an commented on issue #978:
URL: https://github.com/apache/age/issues/978#issuecomment-1588063850

   It appears there may be some confusion. Only the rows returned from a Cypher query are displayed in the table. To accurately observe the changes made to graph entities, RETURN clause in your queries can be used as mentioned by @AbdulSamad4068 . Here's an alternative explanation along with modified examples to demonstrate how you can adjust your UPDATE and DELETE queries to view the affected rows:
   ```
   SELECT * FROM cypher ('tmp', $$
   MATCH (a:Part)
   WHERE a.part_num =~ '3+'
   SET a.part_num = '333'
   RETURN a
   $$) AS (a agtype);
   
   ```
   In this query, the 'part_num' property of nodes labeled as 'Part' is modified, specifically updating it to '333'. By including the RETURN clause and specifying 'a', the modified rows will be returned and displayed as part of the query result.
   


-- 
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