pdpotter commented on issue #153:
URL: https://github.com/apache/incubator-age/issues/153#issuecomment-986542230


   Is it possible to give some more information about the date in your graph? 
E.g. the result of
   
   ```
   SELECT *
   FROM cypher('text_test', $$
             MATCH (V)-[R:connect]->(V2)
             RETURN V, R, V2
   $$) as (V agtype, R agtype, V2 agtype);
   ```
   
   The following minimal example seems to work:
   ### Setup
   ```
   SELECT *
   FROM cypher('test_graph', $$
       CREATE (n:person {name: 'parent'})
       RETURN n
   $$) as (n agtype);
   ```
   ```
                                             n                                  
         
   
--------------------------------------------------------------------------------------
    {"id": 844424930131972, "label": "person", "properties": {"name": 
"parent"}}::vertex
   (1 row)
   ```
   ```
   SELECT *
   FROM cypher('test_graph', $$
       CREATE (n:person {name: 'child1'})
       RETURN n
   $$) as (n agtype);
   ```
   ```
                                             n                                  
         
   
--------------------------------------------------------------------------------------
    {"id": 844424930131973, "label": "person", "properties": {"name": 
"child1"}}::vertex
   (1 row)
   ```
   ```
   SELECT 
    FROM cypher('test_graph', $$
       CREATE (n:person {name: 'child2'})
       RETURN n
   $$) as (n agtype);
   ```
   ```
                                             n                                  
         
   
--------------------------------------------------------------------------------------
    {"id": 844424930131974, "label": "person", "properties": {"name": 
"child2"}}::vertex
   (1 row)
   ```
   ```
   SELECT *
   FROM cypher('test_graph', $$
       MATCH (p:person {name:'parent'}), (c1:person {name:'child1'})
       CREATE (p)-[:connect]->(c1)
       RETURN p, c1
   $$) as (p agtype, c1 agtype);
   ```
   ```
                                             p                                  
         |                                          c1                          
                
   
--------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------
    {"id": 844424930131972, "label": "person", "properties": {"name": 
"parent"}}::vertex | {"id": 844424930131973, "label": "person", "properties": 
{"name": "child1"}}::vertex
   (1 row)
   ```
   ```
   SELECT *
   FROM cypher('test_graph', $$
       MATCH (p:person {name:'parent'}), (c2:person {name:'child2'})
       CREATE (p)-[:connect]->(c2)
       RETURN p, c2
   $$) as (p agtype, c2 agtype);
   ```
   ```
                                             p                                  
         |                                          c2                          
                
   
--------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------
    {"id": 844424930131972, "label": "person", "properties": {"name": 
"parent"}}::vertex | {"id": 844424930131974, "label": "person", "properties": 
{"name": "child2"}}::vertex
   (1 row)
   ```
   
   ### Query
   ```
   SELECT *
   FROM cypher('test_graph', $$
       MATCH (p)-[r:connect]->(c)
       RETURN p.name, collect(c.name)
   $$) as (p agtype, c agtype);
       p     |          c           
   ----------+----------------------
    "parent" | ["child2", "child1"]
   (1 row)
   ```
   


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


Reply via email to