JanusGraph.net C#
JanusGraph .net C#
嘿,谁能帮我弄清楚如何连接到托管多个图的远程 JanusGraph 服务器并使用 C# 查询特定图(按图名)JanusGraph.net?
我可以连接到服务器,但我无法查询特定的图形。
var c = JanusGraph.Net.JanusGraphClientBuilder.BuildClientForServer(server).Create();
var connection = new DriverRemoteConnection(c);
var g = Traversal().WithRemote(connection);
我们如何在 JanusGrapgh.net
中实现 ConfiguredGraphFactory.create("graphName") 或 ConfiguredGraphFactory.open("graphName")
DriverRemoteConnection
除了 GremlinClient
参数之外还可以接受另一个参数:
var c = JanusGraph.Net.JanusGraphClientBuilder.BuildClientForServer(server).Create();
var connection = new DriverRemoteConnection(c, "graphTraversalSourceName");
var g = Traversal().WithRemote(connection);
请注意,远程遍历不绑定 Graph
个实例。它们绑定到 GraphTraversalSource
,因此您必须将 "graphTraversalSourceName" 更改为服务器上这些已配置对象之一的名称。当您不提供此参数时,它只是默认为 "g" 顺便说一下。另外,请注意可以找到 .NET API 文档 here.
嘿,谁能帮我弄清楚如何连接到托管多个图的远程 JanusGraph 服务器并使用 C# 查询特定图(按图名)JanusGraph.net?
我可以连接到服务器,但我无法查询特定的图形。
var c = JanusGraph.Net.JanusGraphClientBuilder.BuildClientForServer(server).Create();
var connection = new DriverRemoteConnection(c);
var g = Traversal().WithRemote(connection);
我们如何在 JanusGrapgh.net
中实现 ConfiguredGraphFactory.create("graphName") 或 ConfiguredGraphFactory.open("graphName")DriverRemoteConnection
除了 GremlinClient
参数之外还可以接受另一个参数:
var c = JanusGraph.Net.JanusGraphClientBuilder.BuildClientForServer(server).Create();
var connection = new DriverRemoteConnection(c, "graphTraversalSourceName");
var g = Traversal().WithRemote(connection);
请注意,远程遍历不绑定 Graph
个实例。它们绑定到 GraphTraversalSource
,因此您必须将 "graphTraversalSourceName" 更改为服务器上这些已配置对象之一的名称。当您不提供此参数时,它只是默认为 "g" 顺便说一下。另外,请注意可以找到 .NET API 文档 here.