Delete all edges by class name between two specific vertices with sql statement

时间:2015-07-28 16:17:46

标签: orientdb

Is there any orientdb sql command that would allow me to delete all edges by class name between two vertices ?

In my database, a user vertex can have some outer friend edges and some inner friend edges.

How can I delete an edge between two User vertices without knowing who accepted the friend request(in or out) at first ?

1 个答案:

答案 0 :(得分:0)

A simple where after the delete statement works :

delete 
   edge 
   IsFriendsWith 
where 
   (in = #33:1289948 and out = #33:1289949) 
   OR 
   (in = #33:1289949 and out = #33:1289948)