gpt4 book ai didi

c# - 在 Neo4jClient 中使用 UNWIND 进行 Cypher 查询

转载 作者:太空宇宙 更新时间:2023-11-03 13:18:46 30 4
gpt4 key购买 nike

由于当前版本的 Neo4jClient 不支持 UNWIND,我在重写以下 Cypher 查询时遇到了麻烦:

MATCH (:A{UId:someByteArray})--(b1:B)-[:C]-(b2:B)
MATCH p = (b1)-[:C*]->(b2)
WITH b1.someString as s1, b2.someString as s2, p,
EXTRACT(c IN RELATIONSHIPS(p) | c.someValue) AS valuesAlias
UNWIND(valuesAlias) AS va
WITH s1, s2, length(NODES(p)) as pLength, MIN(va) AS minVA
WITH s1, s2, MAX(minVA) as maxMinVA, MIN(pLength) AS minPL
RETURN s1, s2, maxMinVA

上面的查询是 Solve the Widest Path Problem in Cypher 的变体

最佳答案

郑重声明,Neo4jClient 现在支持 UNWIND。

关于c# - 在 Neo4jClient 中使用 UNWIND 进行 Cypher 查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25087720/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com