Skip to content

Commit

Permalink
default value supports expression (#1838)
Browse files Browse the repository at this point in the history
Co-authored-by: dangleptr <37216992+dangleptr@users.noreply.github.com>
  • Loading branch information
Amber1990Zhang and dangleptr committed Feb 28, 2020
1 parent b9de9de commit 3208cab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -47,7 +47,7 @@ CREATE {TAG | EDGE} [IF NOT EXISTS] {<tag_name> | <edge_name>}
* **默认值约束**

您可以在创建标签/边时使用 `DEFAULT` 约束设置属性的默认值。如果没有指定其他值,那么会将默认值插入新的顶点或边。如果您不想使用默认值,也可以写一个用户指定的值。
您可以在创建标签/边时使用 `DEFAULT` 约束设置属性的默认值。如果没有指定其他值,那么会将默认值插入新的顶点或边。默认值可以为 **Nebula Graph** 支持的任一数据类型,且支持表达式。如果您不想使用默认值,也可以写一个用户指定的值。

> 暂时不支持使用 `Alter` 更改默认值。
Expand Down
Expand Up @@ -47,7 +47,7 @@ You can use the `If NOT EXISTS` keywords when creating tags or edges. This keywo
* **Default Constraint**

You can set the default value of a property when creating a tag/edge with the `DEFAULT` constraint. The default value will be added to all new vertices and edges IF no other value is specified. Also you can write a user-specified value if you don't want to use the default one.
You can set the default value of a property when creating a tag/edge with the `DEFAULT` constraint. The default value will be added to all new vertices and edges if no other value is specified. The default value can be any of the data type supported by **Nebula Graph** or expressions. Also you can write a user-specified value if you don't want to use the default one.

> Using `Alter` to change the default value is not supported.
Expand Down

0 comments on commit 3208cab

Please sign in to comment.