cho2hhun commented on issue #1270:
URL: https://github.com/apache/age/issues/1270#issuecomment-1769778770

   I think you wanna see the **relation** for (Node a) -[any 
relationship]->(Node b)
   
   To see that **realtion**, you need to seperatly return it in `RETURN` clause.
   like below
   `SELECT * FROM cypher('matrix', $$ MATCH (a)-[r]->(b) RETURN a, r, b$$) as 
(a agtype, r agtype, b agtype);`
   
   - to return the edge(relationship), you might as well to clarify the edge 
using any notation or alphbet like `r`
   - To return the **relationship** for _Node a_ and _Node b_, you have to 
clarify the things that you wanna return seperatly like `RETURN a, r, b`
   - and you might as well to clarify the return Nodes / Edges and its Data 
type like `as (a agtype, r agtype, b agtype)`
   
   
   
   
   
   But I think you want to see this **relationship** as a unified thing like 
tuple, list, array
   It is also simple!
   `SELECT * FROM cypher('matrix', $$ MATCH p = (a)-[r]->(b) RETURN p$$) as (p 
agtype);`
   
   All you gotta do is you can simply declare the **relationship** to a path 
like `MATCH p = (a)-[r]->(b)`
   then it is returned **unified value** with list which is a kind of data type 
in Cypher like below
   
   `p\nagtype\n[{"id": 1125899906842625, "label": "vt_car", "properties": 
{"carline": "ENCLAVE FWD", "mfr_name": "General Motors", "car_division": 
"Buick"}}::vertex, {"id": 2251799813685249, "label": "eg_eng_use2", "end_id": 
1407374883553292, "start_id": 1125899906842625, "properties": {"fe": 
21.29::numeric, "co2": 424.00::numeric}}::edge, {"id": 1407374883553292, 
"label": "vt_engine", "properties": {"no_cyl": 6, "eng_displ": 3.6::numeric, 
"air_aspiration_method": "NA"}}::vertex]::path`


-- 
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-unsubscr...@age.apache.org

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

Reply via email to