arangodb - 如何在 ArangoDB 中列出递归路径
问题描述
我正在尝试进行图遍历,我只想列出递归路径
我的遍历具有 1..10 的可变深度,它将找到以下路径:
1. start - decide - execute1 - end
2. start - decide - execute2 - decide - execute1 - end
3. start - execute3 - end
使用以下查询:
FOR v, e, p IN 1..10 OUTBOUND 'Node/start_0' Path
FILTER v.name == "end"
RETURN CONCAT_SEPARATOR(' - ', p.vertices[*].name)
现在我只想列出具有递归或循环的路径,在此示例中,我只想获取路径2. start - decide - execute2 - decide - execute1 - end
,因为它通过了decide - execute2 - decide
。我知道我们可以通过设置来避免这样的循环场景,uniqueVertices: 'path'
但是如何只获取其中有循环的场景
解决方案
推荐阅读
- java - 带有图形 API 的 MSAL
- json - 使用 curl 从 bash 中的变量发布 json 对象时遇到问题
- java - Anroid 我尝试通过可绘制的 xml 文件更改我的背景颜色
- python - 在python中提取键值对
- python - 根据两个值对链表进行排序
- javascript - 在队列中的第二个函数中使用第一个函数的返回数据
- javascript - 具有存储位置的路径时如何获取文件
- flutter - 在 ABI 的 NDK 工具链文件夹中找不到工具链,前缀为:arm-linux-androideabi
- reactjs - 分页组件在父组件上呈现,在反应中呈现在两个不同的视图/页面上
- php - 带有标头功能的重定向不起作用,但没有错误