【发布时间】:2020-05-13 19:31:43
【问题描述】:
我无法弄清楚以下密码查询的 neo4jclient 等效项是什么:
match (n)
return n.Property, n.AnotherProperty, n.head(label(n))
这是我目前所拥有的:
.Match("n")
.Return((n) => new SomeNode
{
Property = n.As<SomeNode>.Property,
AnotherProperty = n.As<SomeNode>.AnotherProperty,
Label = n.Labels() //This gives all labels, I only need the head. I can't chain it with ".head()"
}
我查看了 stackoverflow 以及 wiki,但找不到任何关于链接函数的信息。
有没有办法以我在这里描述的方式实现链接,我是否需要构造另一个查询来分别获取标签,然后获取该列表的头部并将其添加到 SomeNode,或者我错过了一个更好、完全不同的方法?
我最初是在遇到以下错误时到达这里的: “如果您想在 .NET 中运行客户端逻辑来重塑数据,请在执行查询后使用 Select 调用,例如 .Return(...).Results.Select(r => ...)。” 但是,wiki 上也没有这方面的示例。
【问题讨论】:
标签: c# neo4j neo4jclient