问题标签 [neo4jclient]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
439 浏览

c# - 无法将类型“Neo4jClient.NodeReference<>”隐式转换为“Neo4jClient.GraphClient”

这是一个两部分的问题

  1. 当我尝试创建新节点时出现此错误

    无法将类型“Neo4jClient.NodeReference”隐式转换为“Neo4jClient.GraphClient”

我这里有 3 个类第一个连接到 GraphDB 服务器并返回客户端变量以供以后在其他类中使用

然后是 New_Node 类,看起来像这样

然后是具有 CreateNode 方法的 Graph Operations 类

  1. 如何在另一行代码上设置节点的属性而不是使用节点创建它们,我想让我的应用程序更加动态,因为这种方式似乎很难编码

    var refA = client.Create(new Person() { Name = "Person A" });

在Java中可以做到这一点

0 投票
1 回答
924 浏览

neo4j - 如何在 .net neo4j 客户端中将关系属性作为参数传递?

我想将参数传递到查询中,以便可以在 CreateUnique 中使用关系属性。我更喜欢使用参数而不是仅仅使用字符串格式,以便它可以保护(我是否正确假设参数受密码注入保护?)免受密码注入。

0 投票
1 回答
2895 浏览

neo4jclient - 如何在 neo4j .net 客户端中返回两个带有密码查询的集合

我想在一个查询“标签”和“项目”中返回两个集合,其中每个标签可以有 0..many 项目。看起来如果我使用投影,它将假定一个包含两列而不是两个集合的集合,对吗?有没有更好的方法来运行这个搜索查询?

我越来越"the query response contains columns Tags, Items however ...anonymous type does not contain settable properties to receive this data"

0 投票
1 回答
1744 浏览

neo4j - 在 Neo4jClient .NET 中检索所有相关节点、Cypher 查询

我有一个执行 Cypher 查询的方法,我想返回与查询中指定的节点(64)有关系的所有节点及其名称:

现在,当我尝试在我的代码中执行此操作时,它不想工作。这是我的方法:

我希望此查询返回名称。

有人可以帮我吗?

0 投票
1 回答
524 浏览

neo4j - 努力在 Neo4jClient.NET 中执行索引密码查询

我尝试使用适用于 .NET 的 Neo4jClient 在 Neo4j 中对我的 NameIndex 执行查询,但出现此错误:

我的方法如下所示:

理想情况下,我想将 NodeName 传递到查询中,但这不起作用,因此我尝试对其进行硬编码,但这也不起作用。两种情况都会产生相同的错误消息?

0 投票
2 回答
1223 浏览

c# - C# Neo4jClient 任务取消异常

我正在使用 Neo4jClient 对 Neo4j 数据库进行相当长的查询,并得到一个非常随机发生的异常。如何解决这个问题?

0 投票
1 回答
443 浏览

neo4j - neo4jclient where clause not putting in parameters

I'm having an issue with the Where clause not pulling out the values and putting them as parameters.

The Query string comes out looking like "WHERE (Id <> Id)". I can fix the problem easily by not using lambdas and just using the code below but I'm interested to see why it didn't work

I've also tried the below line but that didn't work either.

Edit Tatham - I've created an issue in Bitbucket for this.

You are correct the right way for the Where clause should be.

0 投票
1 回答
254 浏览

neo4jclient - 如何在.net Neo4jClient 中的密码查询的返回子句中执行过滤器

我无法弄清楚如何使用 neo4j 客户端中的 cypher linq Return 函数在 return 子句中放置过滤器。

我正在尝试进行这样的查询:

我试过从这样的 with 子句开始

但我无法将字符串传递给 Return 方法,如果我尝试将某种过滤器传递给 LINQ lambda,则会出现The return expression that you have provided uses methods other than those defined by ICypherResultItem.错误。

0 投票
1 回答
367 浏览

neo4jclient - 我可以返回一个 IEnumerable而不是 IEnumerable> 在 Neo4J .net 客户端中使用 CollectAs

我可以让 CollectAs 函数返回IEnumerable<T>而不是返回IEnumerable<Node<T>>吗?我想将我的 POCO 类中的 Neo4j.Node 等数据库特定类排除在外。我必须使用命名类,因为与客户端一起使用,因为替代关系是可选的,并且使用泛型类会给我没有结果。另一种选择是创建一个像 AppDetailWithNodes 这样的中间类,然后将其转换为 POCO 类,但为此添加一个额外的类似乎有点麻烦。

0 投票
1 回答
98 浏览

constraints - Neo4j 客户端:如果已经达到最大关系数,我们可以抛出异常吗?

如果我有一对多的关系,比如 1 Vehicle 有 1 到 4 个轮子,如果有人试图打电话

graphClient.Create(wheel, new VehicleHasWheel(vehicle.Reference));

我们可以期望 graphClient 抛出一个异常,所以我们的汽车上没有 5 个轮子吗?

我们可以将关系 CarHasWheel 的最大值定义为 4。

现在,如果我必须检查约束,我需要手动查询数据库以获取现有轮子,然后决定是否应该创建另一个轮子。