TalhaMunir-JD commented on issue #934:
URL: https://github.com/apache/age/issues/934#issuecomment-1554127149
Yes you can update property of multiple nodes without specifying every node
individually.
If you want to update nodes based on some condition. You can do this in 2
ways :
Updating nodes based on a condition:
1. You can use match clause with come condition that selects the node that
you want to update
2. Then use set clause to update the desired properties.
SQL:
`MATCH (n:labelt)
WHERE n.Property = 'random value'
SET n.nProperty = 'new value'`
In above case all nodes with labelt and with property 'Property' that equals
to a new balue random value will be selected and their new property will be
updated to new value.
Another method can be to update nodes of a specific label:
1. In above scenario by just eliminating the condition in match clause you
can update all the nodes.
SQL:
`MATCH (n:labelt)
SET n.newProperty = 'new value'`
In above case all nodes with labelt will have new property updated to a new
value
Using above 2 ways you can update properties of multiple nodes in graph
database using a single query without specifying each node individually.
--
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]