mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 15:24:09 +03:00
fixed node notation (#2745)
nodes should be indicated with regular parenthesis `()`, some lines contained nodes within square brackets `[]`
This commit is contained in:
parent
3ede04c52f
commit
8f56f54c5e
@ -67,16 +67,16 @@ Paths
|
||||
|
||||
**The way to mix nodes and relationships.**
|
||||
|
||||
```(a:Person)-[:KNOWS]-[b:Person]```
|
||||
```(a:Person)-[:KNOWS]-(b:Person)```
|
||||
A path describing that **a** and **b** know each other.
|
||||
|
||||
```(a:Person)-[:MANAGES]->[b:Person]```
|
||||
```(a:Person)-[:MANAGES]->(b:Person)```
|
||||
A path can be directed. This path describes that **a** is the manager of **b**.
|
||||
|
||||
```(a:Person)-[:KNOWS]-[b:Person]-[:KNOWS]-[c:Person]```
|
||||
```(a:Person)-[:KNOWS]-(b:Person)-[:KNOWS]-(c:Person)```
|
||||
You can chain multiple relationships. This path describes the friend of a friend.
|
||||
|
||||
```(a:Person)-[:MANAGES]->[b:Person]-[:MANAGES]->[c:Person]```
|
||||
```(a:Person)-[:MANAGES]->(b:Person)-[:MANAGES]->(c:Person)```
|
||||
A chain can also be directed. This path describes that **a** is the boss of **b** and the big boss of **c**.
|
||||
|
||||
Patterns often used (from Neo4j doc) :
|
||||
|
Loading…
Reference in New Issue
Block a user