AlexB
AlexB

Reputation: 3548

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

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 ?

Upvotes: 1

Views: 993

Answers (1)

AlexB
AlexB

Reputation: 3548

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)

Upvotes: 0

Related Questions