Erase Vertex order is utilized to eliminate vertices from the information base. While erasing, it checks and keeps up the consistency with the edges and eliminates every single cross-reference (with the edges) to the erased vertex.
The accompanying assertion is the fundamental grammar of Delete Vertex Command.
DELETE VERTEX <vertex> [WHERE <conditions>]
[LIMIT <MaxRecords>>] [BATCH <batch-size>]
Following are the insights regarding the choices in the above grammar.
- <vertex> − Defines the vertex that you need to eliminate, utilizing its Class, Record ID, or through a sub-inquiry.
- WHERE − Filters condition to figure out which records the order eliminates.
- Breaking point − Defines the most extreme number of records to be eliminated.
- Bunch − Defines the number of records the order eliminates at an at once, to break enormous exchanges into more modest squares to save money on memory use.
Example
Attempt the accompanying order to figure out how to erase single vertex or numerous vertices.
Execute the accompanying order to eliminate the vertex '#14:1'.
orientdb> DELETE VERTEX #14:1
On the off chance that the above order is executed effectively, you will get the accompanying yield.
Delete record(s) '1' in 0.005000 sec(s)
Execute the accompanying order to eliminate all vertices from the class 'Client' set apart with the property 'isSpam'.
orientdb> DELETE VERTEX Customer WHERE isSpam = TRUE
In the event that the above order is executed effectively, you will get the accompanying yield.
Delete record(s) '3' in 0.005000 sec(s)