简体   繁体   English

使用 SQL Server Graph 2017 获取两个节点之间的所有路径

[英]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.

相关问题 图中2个节点之间的所有路径 - All the paths between 2 nodes in graph 如何使用密码检索我的neo4j图中两个节点之间的唯一路径列表? - How to retrieve a list of unique paths between two nodes in my neo4j graph using cypher? 实现Dijkstra之后,在2个节点之间的图中的所有路径 - All paths in a graph between 2 nodes after implementing Dijkstra 递归获取2个节点之间的所有可能路径 - Recursively get all possible paths between 2 nodes 实体框架查询到 SQL Server 2017 Graph 数据库的语法 - Syntax for Entity Framework query to SQL Server 2017 Graph database C#图遍历 - 跟踪任意两个节点之间的路径 - C# graph traversal - tracking path between any two nodes 使用Fluent Nhibernate从我的SQL数据库中获取图形对象 - Fetching a graph object from my sql DB using Fluent Nhibernate C#算法搜索两个顶点之间的所有路径 - C# algorithm search for all paths between two vertices 使用C#在两个SQL Server数据库之间移动表 - Move tables between two SQL Server databases using C# 使用C#无法在Sql Server 2017中执行Sql脚本 - Unable to execute Sql scripts in Sql Server 2017 by using C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM