Python - 如何在 ArangoDB 中创建边

Python - How to create edges in ArangoDB

我正在使用 pyArango 来处理数据库操作。我已经创建了一个图形,现在我想在图形中添加一条边。

那么 pyArango 中有哪些方法适合执行上述任务

您可以使用图表的 link() 函数:

http://bioinfo.iric.ca/~daoudat/pyArango/graph.html#pyArango.graph.Graph.link

edge = g.link("myEdgesCollection", doc1, doc2, {})

或边缘文档的links()/save()函数: http://bioinfo.iric.ca/~daoudat/pyArango/document.html#pyArango.document.Edge.links

edge.links(doc1, doc2)