[英]How to use graphs in Foxx?
I have created a graph in ArangoDB. 我已经在ArangoDB中创建了一个图形。 It is possible to access the graph from Foxx?
是否可以从Foxx访问图形?
I can create graph in following way: 我可以通过以下方式创建图形:
var graph_module = require("@arangodb/general-graph");
var graph = graph_module._create("myGraph");
But there is not a method to load graph from ArangoDB to Foxx. 但是没有一种方法可以将图形从ArangoDB加载到Foxx。
You can load the graph using the _graph
function: 您可以使用
_graph
函数加载图形:
graph = graph_module._graph("myGraph");
The code works the same in arangosh and in Foxx. 该代码在arangosh和Foxx中的工作原理相同。
It's also described in the documentation: https://docs.arangodb.com/3.3/Manual/Graphs/GeneralGraphs/Management.html#load-a-graph 文档中也对此进行了描述: https : //docs.arangodb.com/3.3/Manual/Graphs/GeneralGraphs/Management.html#load-a-graph
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.