You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2022/05/18 11:35:32 UTC

[GitHub] [incubator-age] jihot2000 opened a new issue, #218: some useful WHERE statements

jihot2000 opened a new issue, #218:
URL: https://github.com/apache/incubator-age/issues/218

   **Is your feature request related to a problem? Please describe.**
   I find it is difficult when I try to query a link list.
   I searched and found some useful cypher statements which works for Neo4j.
   
   **Describe the solution you'd like**
   
   - UNWIND a vertex list
   
   ```
   MATCH p=()-[]->()
   WITH nodes(p) AS a
   UNWIND a AS b
   RETURN b
   ```
   
   - WHERE not a relationship
   
   ```
   MATCH (head)-[:edge*]->()
   WHERE NOT ()-[:edge]->(head)
   RETURN head
   ```
   
   - list generation using IN
   
   ```
   MATCH p=()-[]->()
   WITH nodes(p) AS a
   RETURN [x IN a | x.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.apache.org

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


[GitHub] [incubator-age] jihot2000 commented on issue #218: some useful cypher statements

Posted by GitBox <gi...@apache.org>.
jihot2000 commented on issue #218:
URL: https://github.com/apache/incubator-age/issues/218#issuecomment-1130122198

   I find 'WHERE NOT EXISTS' can do path pattern not match
   ```
   MATCH (head)-[:edge*]->()
   WHERE NOT EXISTS (()-[:edge]->(head))
   RETURN head
   ```


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


[GitHub] [incubator-age] jrgemignani commented on issue #218: some useful cypher statements

Posted by GitBox <gi...@apache.org>.
jrgemignani commented on issue #218:
URL: https://github.com/apache/incubator-age/issues/218#issuecomment-1139180148

   List comprehension will be upcoming. Unwind should work, we will be looking into that.


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