[英]Fetching all the paths between two nodes using SQL Server Graph 2017
I found many examples of fetching paths between 2 nodes in neo4j and gremlin but could not find any on SQL Server Graph 2017. Though it uses Cypher's Match, I was thinking if it is possible to find the path using only Match?我发现了很多在 neo4j 和 gremlin 中的 2 个节点之间获取路径的示例,但在 SQL Server Graph 2017 上找不到任何示例。虽然它使用了 Cypher's Match,但我在想是否可以仅使用 Match 找到路径?
Thanks in advance!提前致谢!
Since SQL Server 2019 you can use SHORTEST_PATH
algorithm.从 SQL Server 2019 开始,您可以使用
SHORTEST_PATH
算法。 It doesn't allow you to list all paths though, only the shortest one , hence the name.它不允许您列出所有路径,只列出最短的路径,因此得名。
You can either create your own CLR function to do that, use WHILE
cycle to traverse the graph step by step or download the whole graph and traverse it using C#
.您可以创建自己的 CLR 函数来执行此操作,使用
WHILE
循环逐步遍历图形或下载整个图形并使用C#
遍历它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.