[英]GRAPH_EDGES not working and documentation not helping
Ok so I am posting here because ArangoDB documentation is not helping me.好的,所以我在这里发帖是因为 ArangoDB 文档对我没有帮助。 I am moving from 2.5.7 to latest ArangoDB.
我正在从 2.5.7 迁移到最新的 ArangoDB。 I was using the GRAPH_EDGES in one of the query and it is not working anymore.
我在其中一个查询中使用了 GRAPH_EDGES,但它不再工作了。 I followed https://docs.arangodb.com/3.1/cookbook/AQL/MigratingGraphFunctionsTo3.html but this is not correct.
我关注了https://docs.arangodb.com/3.1/cookbook/AQL/MigratingGraphFunctionsTo3.html但这不正确。 At one place it says not to use @graphName but then it keep showing the use of it.
在一个地方它说不要使用@graphName,但它一直显示它的使用。 My Query is as following:
我的查询如下:
{"query":"for P in GRAPH_EDGES(@graph, @example, {edgeCollectionRestriction:\"myEdgeCollection\"}) RETURN P","bindVars":{"example":{"signature":"sig1"}, "graph" : "GRAPH2"}}
I tried the following query change and it returns empty result:我尝试了以下查询更改,它返回空结果:
{"query":"for P in ANY @startId myEdgeCollection RETURN P","bindVars":{"startId":{"signature":"sig1"}}}
Can somebody help.有人可以帮忙吗。
The use of graphName depends on the case. graphName 的使用视情况而定。 The docu doesn't tell you to never use it anymore.
文档不会告诉你永远不要再使用它了。
In your case you have to replace P
with v, e
.在您的情况下,您必须用
v, e
替换P
。 You can find more information about the syntaxhere .您可以在此处找到有关语法的更多信息。
Then your code should look like follow:那么你的代码应该如下所示:
{"query":"for v, e in ANY @startId myEdgeCollection RETURN e","bindVars":{"startId":{"signature":"sig1"}}}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.