OrientDB:如何删除特定的轻量级边缘?

OrientDB: How to remove specific lightweight edge?

我在 rails' gem oriented 上使用 ruby,它允许您使用 Java API 与东方的数据库。

假设我有三个顶点 v0 (rid #10:0)v1 (rid #10:1)v2 (rid #10:2),然后我添加连接它们的边,如下所示:

connection = Oriented.connection
graph = connection.graph

v0 = graph.getVertex("#10:0")
v1 = graph.getVertex("#10:1")
v2 = graph.getVertex("#10:2")

graph.addEdge(nil, v0, v1, 'owns')
graph.addEdge(nil, v0, v2, 'owns')

所以现在我的数据库如下所示:

rid   | in_owns | out_owns
------|---------|-------------
#10:0 |         | #10:1, #10:2
#10:1 | #10:0   |
#10:2 | #10:0   |

现在我想删除#10:0 和#10:1 之间的边,最好使用 Java 的 API 来完成,oriented 似乎支持(可以找不到在交易中 运行 SQL 查询的方法)

轻量级边缘就像来自 TInkerPop Java API 的常规边缘,因此当您浏览它们并且想要删除其中之一时,请使用 TinkerPop API:

OrientEdge.remove();