Orientdb 简明教程
OrientDB - Truncate Class
Truncate class 将删除作为类一部分定义的群集的所有记录。在 OrientDB 中,每个类都有一个关联的群集,名称相同。如果您还想要从类层次结构中删除所有记录,您需要使用 POLYMORPHIC 关键字。
Truncate class will delete all records of clusters defined as part of class. In OrientDB, every class has an associated cluster with the same name. If you want to also remove all records from the class hierarchy, you need to use the POLYMORPHIC keyword.
以下语句是 Truncate Class 命令的基本语法。
The following statement is the basic syntax of Truncate Class command.
TRUNCATE CLASS <class> [ POLYMORPHIC ] [ UNSAFE ]
以下是上文中选项的详细信息。
Following are the details about the options in the above syntax.
<class> −定义您想要截断的类。
<class> − Defines the class you want to truncate.
POLYMORPHIC −定义此命令是否还截断了层次结构。
POLYMORPHIC − Defines whether the command also truncates the hierarchy.
UNSAFE - 定义了命令强制对顶点或边类执行截断。
UNSAFE − Defines the command forces truncation on vertex or edge class.