Shorten class will erase all records of bunches characterized as a component of class. In OrientDB, each class has a related group with a similar name. In the event that you need to likewise eliminate all records from the class progressive system, you need to utilize the POLYMORPHIC watchword.
The accompanying assertion is the essential punctuation of Truncate Class order.
TRUNCATE CLASS <class> [ POLYMORPHIC ] [ UNSAFE ]
Following are the insights concerning the alternatives in the above sentence structure.
- <class> − Defines the class you need to shorten.
- POLYMORPHIC − Defines whether the order likewise shortens the chain of command.
- Risky − Defines the order powers truncation on vertex or edge class.
Example
The accompanying inquiry to shorten a class Profile.
orientdb> TRUNCATE CLASS Profile
In the event that the above inquiry is executed effectively, you will get the accompanying yield.
Class truncated successfully