Skip to content

Commit

Permalink
Make placeholder graph nicer, maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhghomon committed Jan 3, 2025
1 parent 8a6e9b8 commit 0c31c15
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/content/doc-surrealql/datamodel/idioms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1205,23 +1205,17 @@ RELATE person:acquaintance3->knows->person:star;

This representation of this small network of friends allows us to visualize the issues that these three algorithms solve. Using `+path` will output all of the possible paths from `person:you`, `+collect` will collect all of the records in this network, and `+shortest=person:star` will find the shortest path.

```
```
┌───►person:acquaintance1
┌───────► person:friend1 │
│ │ │
│ │ │
│ │ ┼───►person:acquaintance2 person:star
person:you │ │ ▲
│ │ │ │
│ ▼ │ │
└────────► person:friend2──────┤ │
│ │
│ │
│ │
└───►person:acquaintance3───────────────┘
│ │ ┼───►person:acquaintance2 person:star
person:you │ │ ▲
│ ▼ │ │
└────────► person:friend2──────┤ │
│ │
└───►person:acquaintance3──────────┘
```

To use these algorithms, follow them with the path that should be followed, in this case `->knows->person`.
Expand Down

0 comments on commit 0c31c15

Please sign in to comment.