[英]ArangoDB: How to limit/skip results with Javascript graph functions?
I'm new to ArangoDB and I'm working on a Foxx service using the Javascript graph module.我是 ArangoDB 的新手,我正在使用 Javascript 图形模块开发 Foxx 服务。 I see in AQL that the results of a graph traversal can be limited and offset, but I don't see the equivalent capability in the Javascript API (ie _neighbors function).
我在 AQL 中看到图遍历的结果可以被限制和偏移,但是我在 Javascript API(即 _neighbors 函数)中没有看到等效的功能。 Since there could be large numbers of neighbors involved, I hope there is a way to do this that doesn't require the full results of the neighbors function to be filtered by my script.
由于可能涉及大量邻居,我希望有一种方法可以做到这一点,不需要我的脚本过滤邻居函数的完整结果。 Is there a lower level edge iteration approach that would allow me to build the result set directly?
是否有较低级别的边缘迭代方法可以让我直接构建结果集?
Thanks!谢谢!
Please don't use the javascript graph functions;请不要使用 javascript 图形函数; they don't scale.
他们没有规模。
Please use the AQL graph support instead.请改用AQL 图支持。
AQL can be invoked via db._query
from foxx services easily. AQL 可以通过
db._query
从db._query
服务轻松调用。
You can then further examine the results and reduce them to your needs in .js inside the foxx service.然后,您可以在 Foxx 服务内的 .js 中进一步检查结果并将它们减少到您的需要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.