简体   繁体   English

ArangoDB最短路径错误AQL 2.8

[英]ArangoDB shortest path error AQL 2.8

we are trying to switch to "3.0 style" of graph functions. 我们正试图切换到图形功能的“3.0风格”。

We run the example of the documentation: 我们运行文档的示例:

FOR v, e IN OUTBOUND SHORTEST_PATH 'circles/A' TO 'circles/D' GRAPH 'traversalGraph' RETURN [v._key, e._key]

and it works on ArangoDB 3.0, but it doesn't in ArangoDB 2.8.11 The error is: 它适用于ArangoDB 3.0,但它不在ArangoDB 2.8.11中。错误是:

"errorNum":1501,"errorMessage":"syntax error, unexpected quoted string near '' TO 'circles/D' GRAPH 'traversa...' at position 1:46 (while parsing)"

Our goal is switch all queries into "3.0 style", because we want upgrade the database to 3.0, but we would like also backward compatibility. 我们的目标是将所有查询切换为“3.0样式”,因为我们希望将数据库升级到3.0,但我们也希望向后兼容。 We have read https://docs.arangodb.com/cookbook/AQL/MigratingGraphFunctionsTo3.html and there is a section that talks about shortest_path. 我们已阅读https://docs.arangodb.com/cookbook/AQL/MigratingGraphFunctionsTo3.html ,其中有一节介绍了shortest_path。 We tried the example, but the error is above. 我们尝试了这个例子,但错误就在上面。

Can somebody help us? 有人可以帮助我们吗?

Thank you very much. 非常感谢你。

Best regards, 最好的祝福,

Daniele 丹尼尔

The SHORTEST_PATH implementation you mentioned was added with 3.0. 您提到的SHORTEST_PATH实现添加了3.0。

In ArangoDB 2.8 it didn't exist yet , and thus it won't understand this newer syntax. ArangoDB 2.8中它还不存在 ,因此它不会理解这种新的语法。 So I'm afraid you won't be able to use these queries with 2.8. 所以我担心你无法在2.8中使用这些查询。

If you want your application to be flexible between these two ArangoDB versions, you will have to prevail two code paths in your Application at the time being. 如果您希望应用程序在这两个ArangoDB版本之间保持灵活性,那么您必须在应用程序中优先使用两个代码路径。

This is a bit uncomfortable, but others found the efford to be worth while , I hope you will too ;-) 这有点不舒服, 但其他人发现efford值得一试 ,我希望你也会这样;-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM