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

[GitHub] [age] RahimullahShaheen commented on issue #951: How to use WHERE caluse after a (WITH .. AS ...)

RahimullahShaheen commented on issue #951:
URL: https://github.com/apache/age/issues/951#issuecomment-1567942453

   The problem in your query is due to the use of where clause directly with the WITH clause.
   Here is another approach which you can use to get the desired result you want.
   ```
   SELECT * from cypher('munmud', $$
   MATCH (u:User {id: 'user1'})-[:WATCHED]->(m:Movie)
   RETURN m
   $$) as (V agtype);
   ```
   I have tried it and it gives the correct result as follow:
   ```
                                                              v                                                            
   ------------------------------------------------------------------------------------------------------------------------
    {"id": 1125899906842625, "label": "Movie", "properties": {"id": "movie1", "name": "The Shawshank Redemption"}}::vertex
    {"id": 1125899906842626, "label": "Movie", "properties": {"id": "movie2", "name": "The Godfather"}}::vertex
   (2 rows)
   
   ```


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