forked from orientechnologies/orientdb
-
Notifications
You must be signed in to change notification settings - Fork 0
SQL Delete Edge
lvca edited this page Dec 14, 2012
·
1 revision
The SQL Delete Edge command deletes one or more edges from the database. Use this command if you work against graphs. The "Delete edge" command takes care to remove all the cross references to the edge in both "in" and "out" vertices.
DELETE EDGE <rid>|FROM <rid>|TO <rid>|<[<class>] [WHERE <conditions>]> [LIMIT <MaxRecords>]
The WHERE clause is common to the other SQL commands.
Delete edges where date is a property which might exist in one of more edges between the two vertices:
DELETE EDGE from #11:101 TO #11:117 Where date >= "2012-01-15"
Deletes edges filtering also by Edge's class:
DELETE EDGE FROM #11:101 TO #11:117 WHERE @class = 'owns' and comment like "regex of forbidden words"
This is the faster alternative to DELETE EDGE WHERE @class = 'owns' and date < "2011-11"
:
DELETE EDGE Owns WHERE date < "2011-11"
Deletes edges where in.price shows the condition on 'to vertex' for the edge
DELETE EDGE Owns WHERE date < "2011-11" and in.price >= 202.43