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

[GitHub] [age] abdulmanann commented on issue #820: Are multiple cypher calls possible within the same FROM clause?

abdulmanann commented on issue #820:
URL: https://github.com/apache/age/issues/820#issuecomment-1609709067

    
   
   
   
   > @jrgemignani I see, the reason cypher(), cypher() queries was failing for me was cause of not adding the `graphN(v agtype)` at the end.
   > 
   > Seems like I can actually go ahead and overload with multiple cypher queries if need be:
   > 
   > ```
   > SELECT * FROM
   > cypher('graph1', $$
   >     CREATE (c: Customer { user: 'jameS', tags: 'dev' })
   > $$) as graph1(v agtype),
   > cypher('graph2', $$
   >     CREATE (s: Queries { user: 'jameS', keywords: ['ocaml','c++'] })
   > $$) as graph2(v agtype),
   > cypher('metro', $$
   >     CREATE (n: Metro { user: 'jameS', keywords: ['ocaml','c++'] })
   > $$) as metro(v agtype);
   > ```
   
   I tried this for the query below
   ```
   SELECT * FROM cypher('usergraph', $$CREATE(u:User {name: 'user1', email: 'user1@email.com', phone: '1234-5678'}) RETURN u$$) as usergraph(u agtype), 
   cypher('usergraph', $$CREATE(u:User{name:'user2', email:'user
   2@email.com'}) RETURN u$$) as usergraph(u agtype);
   ```
    but am getting the following error:
   ![image](https://github.com/apache/age/assets/57444524/8fb1d9f5-4e39-465c-bfc8-7b05ff1572ec)
   
   Is there any way to work around it without using JOIN?
   


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