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

[GitHub] [age] farooquememon385 commented on issue #918: How to add multiple edges in single query faster?

farooquememon385 commented on issue #918:
URL: https://github.com/apache/age/issues/918#issuecomment-1546546133

   **You can add edges by running query with a rule between to node Types**
   ### for example:
   
   we have Person nodes and Country nodes in graph named 'GRAPH_NAME' and we want to make a relation that Person born in some country. 
   
   **we can make relationship by running the query like this: **
   
   SELECT * FROM cypher('GRAPH_NAME', $$ MATCH (a:Person), (b:Country) WHERE a.bornIn = b.name CREATE (a)-[r:BORNIN]->(b) RETURN r $$) as (r agtype);
   
   no it does not matter that we have how many nodes of Person or Country
   it will just create relationship based on the rule that **Person.bornIn = Country.name**


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