apache / apache/age

some useful cypher statements

Open
#218 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C
Stars
4.8k
Forks
523
Avg merge
1d 2h
Merged PRs (30d)
9

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.