Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc]add if exists in dropping schema #1511

Merged
merged 2 commits into from
Jan 7, 2020
Merged

[doc]add if exists in dropping schema #1511

merged 2 commits into from
Jan 7, 2020

Conversation

amber-moe
Copy link
Contributor

@amber-moe amber-moe commented Dec 25, 2019

What changes were proposed in this pull request?

Add IF EXISTS keywords in dropping schema.

```

仅支持有 DROP 权限的用户进行此操作。

删除边可使用 `IF EXISTS` 关键字,这个关键字会自动检测对应的边是否存在,如果存在则删除,如果不存在则直接返回。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

强调一下不存在不会再返回错误。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得没有必要强调,直接返回就表明什么操作都不用做了。强调错误反而会让人误解。

DROP SPACE 将删除指定 space 内的所有点和边。

删除图空间可使用 `IF EXISTS` 关键字,这个关键字会自动检测对应的图空间是否存在,如果存在则删除,如果不存在则直接返回。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

```

仅支持有 DROP 权限的用户进行此操作。
> 请谨慎进行此操作。

删除标签可使用 `IF EXISTS` 关键字,这个关键字会自动检测对应的标签是否存在,如果存在则删除,如果不存在则直接返回。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

```

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

```

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

```

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@dutor dutor added the ready-for-testing PR: ready for the CI test label Jan 7, 2020
@nebula-community-bot
Copy link
Member

Unit testing passed.

@Shylock-Hg
Copy link
Contributor

@yixinglu Seems trigger CI unexpected.

@dutor dutor merged commit 8a69880 into vesoft-inc:master Jan 7, 2020
@amber-moe amber-moe deleted the if-exists branch January 7, 2020 07:14
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
yixinglu pushed a commit to yixinglu/nebula that referenced this pull request Jan 31, 2023
* Return an semantic error if no tag is found for a property while validating a match.

* Return an semantic error if no tag is found for a property while validating a match.

* Add a tck case for the fixed bug.

* commented out unused codes.

* add tag in tck cases

* fixing tck

* updated tck cases to add missing cases that are supposed to be there.

* Return an semantic error if no tag is found for a property while validating a match.

* Add a tck case for the fixed bug.

* commented out unused codes.

* add tag in tck cases

* fixing tck

* updated tck cases to add missing cases that are supposed to be there.

* update

* update tck case.

Co-authored-by: Sophie <[email protected]>

Co-authored-by: Cheng Xuntao <[email protected]>
Co-authored-by: Sophie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants