简体   繁体   English

Python - 如何在ArangoDB中创建边

[英]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.

相关问题 在 Python 中,如何为 arangodb 创建边缘集合和文档? - In Python, how do I create an edge collection and document for an arangodb? 如何为节点创建边缘? - how to create edges for nodes? 如何根据节点之间的其他边有条件地在网络中创建边(使用 python Networkx 包)? - How to create edges in a network conditionally (using python Networkx package) based on other edges between nodes? "<i>How to create quantiles with non-unique bin edges?<\/i>如何创建具有非唯一 bin 边缘的分位数?<\/b> <i>Python or R<\/i> Python 或 R<\/b>" - How to create quantiles with non-unique bin edges? Python or R Python:如何从csv文件创建图形节点和边? - Python: How to create graph nodes and edges from csv file? 如何用点数组和边数组创建邻接矩阵,Python - How to create an adjancency matrix out of array of points and array of edges, Python 如何在opencv python中锐化边缘 - How to sharpen the edges in opencv python 如何使用Python创建可操纵的边缘检测滤镜或如何丢弃不符合所需角度的边缘 - How to create steerable Edge Detection filters using Python or discard edges that don't conform to desired angle 如何从边列表创建邻接列表 - How to create adjacency list from list of edges 如何通过使用边的属性创建子图 - How to create a subgraph by using edges' attributes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM