diff --git a/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-edge-syntax.md b/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-edge-syntax.md index fd9d1349a84..ee46ee44ec4 100644 --- a/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-edge-syntax.md +++ b/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-edge-syntax.md @@ -1,11 +1,13 @@ # DROP EDGE 语法 ```ngql -DROP EDGE +DROP EDGE [IF EXISTS] ``` 仅支持有 DROP 权限的用户进行此操作。 +删除边可使用 `IF EXISTS` 关键字,这个关键字会自动检测对应的边是否存在,如果存在则删除,如果不存在则直接返回。 + 此操作将移除指定类型的所有边。 此操作仅删除 Schema 信息,硬盘中所有文件及目录均**未被直接删除**,数据会在下次 compaction 时删除。 diff --git a/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md b/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md index a6a892eafdd..d120c09be67 100644 --- a/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md +++ b/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md @@ -1,12 +1,15 @@ # DROP SPACE 语法 ```ngql -DROP SPACE +DROP SPACE [IF EXISTS] ``` 仅支持有 DROP 权限的用户进行此操作。 + DROP SPACE 将删除指定 space 内的所有点和边。 +删除图空间可使用 `IF EXISTS` 关键字,这个关键字会自动检测对应的图空间是否存在,如果存在则删除,如果不存在则直接返回。 + 其他 space 不受影响。 该语句不会立即删除存储引擎中的所有文件和目录(并释放磁盘空间)。删除操作取决于不同存储引擎的实现。 diff --git a/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md b/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md index 45d3cf73de8..5d719c79eb0 100644 --- a/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md +++ b/docs/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md @@ -1,12 +1,14 @@ # DROP TAG 语法 ```ngql -DROP TAG +DROP TAG [IF EXISTS] ``` 仅支持有 DROP 权限的用户进行此操作。 > 请谨慎进行此操作。 +删除标签可使用 `IF EXISTS` 关键字,这个关键字会自动检测对应的标签是否存在,如果存在则删除,如果不存在则直接返回。 + 一个节点可以有一个或多个标签(类型)。 删除所有标签后,节点将不可访问,同时与节点连接的边也不可使用。 diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-edge-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-edge-syntax.md index 0c732a1cfb7..80f834c3e08 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-edge-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-edge-syntax.md @@ -1,11 +1,13 @@ # Drop Edge Syntax ```ngql -DROP EDGE +DROP EDGE [IF EXISTS] ``` You must have the DROP privilege for the edge type. +You can use the `If EXISTS` keywords when dropping edges. This keyword automatically detects if the corresponding edge exists. If it exists, it will be deleted. Otherwise, no edge is deleted. + This statement removes all the edges (connections) within the specific edge type. This operation only deletes the Schema data, all the files and directories in the disk are NOT deleted directly, data is deleted in the next compaction. diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md index 3e9dd5c3aaa..d9967c81959 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md @@ -1,13 +1,15 @@ # Drop Space Syntax ```ngql -DROP SPACE +DROP SPACE [IF EXISTS] ``` You must have the DROP privilege for the graph space. DROP SPACE deletes everything (all the vertices, edges, indices, and properties) in the specific space. +You can use the `If EXISTS` keywords when dropping spaces. This keyword automatically detects if the corresponding space exists. If it exists, it will be deleted. Otherwise, no space is deleted. + Other spaces remain unchanged. This statement does not immediately remove all the files and directories in the storage engine (and release disk space). The deletion depends on the implementation of different storage engines. diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md index 37e85ac45b5..915e6e16c08 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md @@ -1,13 +1,15 @@ # Drop Tag Syntax ```ngql -DROP TAG +DROP TAG [IF EXISTS] ``` You must have the DROP privilege for the tag. > Be careful with this statement. +You can use the `If EXISTS` keywords when dropping tags. This keyword automatically detects if the corresponding tag exists. If it exists, it will be deleted. Otherwise, no tag is deleted. + A vertex can have either only one tag (types) or multiple tags (types). In the former case, such a vertex can NOT be accessible after the statement, and edges connected with such vertex may result in DANGLING.