Erase edge order is utilized to eliminate the information base. This is likeness the erase order, with the expansion of checking and keeping up consistency with vertices by eliminating all cross-references to the edge from both 'in' and 'out' vertex properties.
The accompanying assertion is the fundamental sentence structure of Delete Edge order.
DELETE EDGE
( <rid>
|
[<rid> (, <rid>)*]
|
( [ FROM (<rid> | <select_statement> ) ] [ TO ( <rid> | <select_statement> ) ] )
|
[<class>]
(
[WHERE <conditions>]
[LIMIT <MaxRecords>]
[BATCH <batch-size>]
))
Following are the insights regarding the choices in the above sentence structure.
- FROM − Defines the beginning stage vertex of the edge to erase.
- To − Defines the completion direct vertex of the edge toward erase.
- WHERE − Defines the sifting conditions.
- Cutoff − Defines the most extreme number of edges to erase.
- Cluster − Defines the square size for the activity.
Example
Attempt the accompanying guides to figure out how to erase edges.
Execute the accompanying question to erase the edge between two vertices (#11:2, #11:10). Yet, there may be an opportunity that may exist at least one edges between two vertices. With the goal that we are utilizing the date property for legitimate usefulness. This question will erase the edges which are made on '2015-01-15' and later.
orientdb {db = demo}> DELETE EDGE FROM #11:2 TO #11:10 WHERE date >= "2012-01-15"
On the off chance that the above question is executed effectively, you will get the accompanying yield.
Delete record(s) '2' in 0.00200 sec(s)
Execute the accompanying question to erase edges beginning from the vertex '#11:5' to the vertex '#11:10' and which are identified with 'class = Customer'.
orientdb {db = demo}> DELETE EDGE FROM #11:5 TO #11:10 WHERE @class = 'Customer'
In the event that the above question is executed effectively, you will get the accompanying yield.
Delete record(s) '2' in 0.00200 sec(s)