[英]Python - How to create edges in ArangoDB
I am using pyArango to handle by database operations. 我正在使用pyArango来处理数据库操作。 I have already created a graph and now I want add an edge in the graph.
我已经创建了一个图表,现在我想在图表中添加一个边缘。
So what are the methods from pyArango suitable for performing the mentioned task 那么pyArango适合执行上述任务的方法是什么
You can either use the link() function of a graph: 您可以使用图表的link()函数:
http://bioinfo.iric.ca/~daoudat/pyArango/graph.html#pyArango.graph.Graph.link http://bioinfo.iric.ca/~daoudat/pyArango/graph.html#pyArango.graph.Graph.link
edge = g.link("myEdgesCollection", doc1, doc2, {})
or the links()/save() function of an edge document: http://bioinfo.iric.ca/~daoudat/pyArango/document.html#pyArango.document.Edge.links 或边缘文档的links()/ save()函数: http : //bioinfo.iric.ca/~daoudat/pyArango/document.html#pyArango.document.Edge.links
edge.links(doc1, doc2)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.