Skip to content

Commit

Permalink
update (#2567)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisChen2023 authored May 22, 2024
1 parent 9f5b25e commit 05826a8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs-2.0-en/3.ngql-guide/10.tag-statements/1.create-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CREATE TAG [IF NOT EXISTS] <tag_name>
|`IF NOT EXISTS`|Detects if the tag that you want to create exists. If it does not exist, a new one will be created. The tag existence detection here only compares the tag names (excluding properties).|
|`<tag_name>`|1. Each tag name in the graph space must be **unique**. <br>2. Tag names cannot be modified after they are set.<br/> 3. By default, the name only supports 1-4 byte UTF-8 encoded characters, including English letters (case sensitive), numbers, Chinese characters, etc. However, it cannot include special characters other than the underscore (_), and cannot start with a number.<br/> 4. To use special characters, reserved keywords, or start with a number, quote the entire name with backticks (\`) and do not include periods (`.`) within the pair of backticks (\`). For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md). <br/>**Note**:<br/>1. If you name a tag in Chinese and encounter a `SyntaxError`, you need to quote the Chinese characters with backticks (\`). <br/>2. To include a backtick (\`) in a tag name, use a backslash to escape the backtick, such as \\\`; to include a backslash, the backslash itself also needs to be escaped, such as \\\ . |
|`<prop_name>`|The name of the property. It must be unique for each tag. The rules for permitted property names are the same as those for tag names.|
|`<data_type>`|Shows the data type of each property. For a full description of the property data types, see [Data types](../3.data-types/1.numeric.md) and [Boolean](../3.data-types/2.boolean.md).|
|`<data_type>`|The data type of the property. The following data types are supported: [Numeric](../3.data-types/1.numeric.md), [Boolean](../3.data-types/2.boolean.md), [String](../3.data-types/3.string.md), [Date and time](../3.data-types/4.date-and-time.md), and [Geography](../3.data-types/10.geography.md).|
|`NULL | NOT NULL`|Specifies if the property supports `NULL | NOT NULL`. The default value is `NULL`. |
|`DEFAULT`|Specifies a default value for a property. The default value can be a literal value or an expression supported by NebulaGraph. If no value is specified, the default value is used when inserting a new vertex.|
|`COMMENT`|The remarks of a certain property or the tag itself. The maximum length is 256 bytes. By default, there will be no comments on a tag.|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CREATE EDGE [IF NOT EXISTS] <edge_type_name>
|`IF NOT EXISTS`|Detects if the edge type that you want to create exists. If it does not exist, a new one will be created. The edge type existence detection here only compares the edge type names (excluding properties).|
|`<edge_type_name>`|1. The edge type name must be **unique** in a graph space.<br/> 2. Once the edge type name is set, it can not be altered.<br/> 3. By default, the name only supports 1-4 byte UTF-8 encoded characters, including English letters (case sensitive), numbers, Chinese characters, etc. However, it cannot include special characters other than the underscore (_), and cannot start with a number.<br/> 4. To use special characters, reserved keywords, or start with a number, quote the entire name with backticks (\`) and do not include periods (`.`) within the pair of backticks (\`). For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md). <br/>**Note**:<br/>1. If you name an edge type in Chinese and encounter a `SyntaxError`, you need to quote the Chinese characters with backticks (\`). <br/>2. To include a backtick (\`) in an edge type name, use a backslash to escape the backtick, such as \\\`; to include a backslash, the backslash itself also needs to be escaped, such as \\\ . |
|`<prop_name>`|The name of the property. It must be unique for each edge type. The rules for permitted property names are the same as those for edge type names.|
|`<data_type>`|Shows the data type of each property. For a full description of the property data types, see [Data types](../3.data-types/1.numeric.md) and [Boolean](../3.data-types/2.boolean.md).|
|`<data_type>`|The data type of the property. The following data types are supported: [Numeric](../3.data-types/1.numeric.md), [Boolean](../3.data-types/2.boolean.md), [String](../3.data-types/3.string.md), [Date and time](../3.data-types/4.date-and-time.md), and [Geography](../3.data-types/10.geography.md).|
|`NULL | NOT NULL`|Specifies if the property supports `NULL | NOT NULL`. The default value is `NULL`. `DEFAULT` must be specified if `NOT NULL` is set.|
|`DEFAULT`|Specifies a default value for a property. The default value can be a literal value or an expression supported by NebulaGraph. If no value is specified, the default value is used when inserting a new edge.|
|`COMMENT`|The remarks of a certain property or the edge type itself. The maximum length is 256 bytes. By default, there will be no comments on an edge type.|
Expand Down
2 changes: 1 addition & 1 deletion docs-2.0-zh/3.ngql-guide/10.tag-statements/1.create-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CREATE TAG [IF NOT EXISTS] <tag_name>
|`IF NOT EXISTS`|检测待创建的 Tag 是否存在,只有不存在时,才会创建 Tag。仅检测 Tag 的名称,不会检测具体属性。|
|`<tag_name>`|1、每个图空间内的 Tag 必须是唯一的。<br>2、Tag 名称设置后无法修改。<br>3、默认情况下,仅支持 1~4 字节的 UTF-8 编码字符,包括英文字母(区分大小写)、数字、中文等。不能包含下划线(_)以外的特殊字符,且不能以数字开头。<br>4、如果需要使用特殊字符、保留关键字或者以数字开头,请使用反引号(\`)包围整个名称。反引号中不能包含英文句号(`.`)。详情参见[关键字和保留字](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md)。<br/>**注意**:<br/>1、如果以中文命名 Tag,报`SyntaxError`错误时,需使用反引号(\`)包围中文字符。<br/>2、名称中如需包含反引号(\`),使用反斜杠(\)来转义反引号(\`),如:\\\`;如需包含反斜杠(\),反斜杠(\)本身也需转义,如:\\\。 |
|`<prop_name>`|属性名称。每个 Tag 中的属性名称必须唯一。属性的命名规则与 Tag 相同。|
|`<data_type>`|属性的数据类型,目前支持[数值](../3.data-types/1.numeric.md)[布尔](../3.data-types/2.boolean.md)[字符串](../3.data-types/3.string.md)以及[日期与时间](../3.data-types/4.date-and-time.md)|
|`<data_type>`|属性的数据类型,目前支持[数值](../3.data-types/1.numeric.md)[布尔](../3.data-types/2.boolean.md)[字符串](../3.data-types/3.string.md)[日期与时间](../3.data-types/4.date-and-time.md)以及[地理空间](../3.data-types/10.geography.md)|
|`NULL | NOT NULL`|指定属性值是否支持为`NULL`。默认值为`NULL`。指定`NOT NULL`且没有指定`DEFAULT`值时,插入数据必须指定值;同时指定`NOT NULL``DEFAULT`值时,插入数据如果没有指定值,则默认插入`DEFAULT`值。|
|`DEFAULT`|指定属性的默认值。默认值可以是一个文字值或 {{nebula.name}} 支持的表达式。如果插入点时没有指定某个属性的值,则使用默认值。|
|`COMMENT`|对单个属性或 Tag 的描述。最大为 256 字节。默认无描述。|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CREATE EDGE [IF NOT EXISTS] <edge_type_name>
|`IF NOT EXISTS`|检测待创建的 Edge type 是否存在,只有不存在时,才会创建 Edge type。仅检测 Edge type 的名称,不会检测具体属性。|
|`<edge_type_name>`|1、每个图空间内的 Edge type 必须是唯一的。<br/> 2、Edge type 名称设置后无法修改。<br/>3、默认情况下,仅支持 1~4 字节的 UTF-8 编码字符,包括英文字母(区分大小写)、数字、中文等。不能包含下划线(_)以外的特殊字符,且不能以数字开头。<br>4、如果需要使用特殊字符、保留关键字或者以数字开头,请使用反引号(\`)包围整个名称。反引号中不能包含英文句号(`.`)。详情参见[关键字和保留字](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md)。<br/>**注意**:<br/>1、如果以中文命名 Edge type,报`SyntaxError`错误时,需使用反引号(\`)包围中文字符。<br/>2、名称中如需包含反引号(\`),使用反斜杠(\)来转义反引号(\`),如:\\\`;如需包含反斜杠(\),反斜杠(\)本身也需转义,如:\\\。|
|`<prop_name>`|属性名称。每个 Edge type 中的属性名称必须唯一。属性的命名规则与 Edge type 相同。|
|`<data_type>`|属性的数据类型,目前支持[数值](../3.data-types/1.numeric.md)[布尔](../3.data-types/2.boolean.md)[字符串](../3.data-types/3.string.md)以及[日期与时间](../3.data-types/4.date-and-time.md)|
|`<data_type>`|属性的数据类型,目前支持[数值](../3.data-types/1.numeric.md)[布尔](../3.data-types/2.boolean.md)[字符串](../3.data-types/3.string.md)[日期与时间](../3.data-types/4.date-and-time.md)以及[地理空间](../3.data-types/10.geography.md)|
|`NULL | NOT NULL`|指定属性值是否支持为`NULL`。默认值为`NULL`。当指定属性值为`NOT NULL`时,必需指定属性的默认值,也就是`DEFAULT`的值。|
|`DEFAULT`|指定属性的默认值。默认值可以是一个文字值或 {{nebula.name}} 支持的表达式。如果插入边时没有指定某个属性的值,则使用默认值。|
|`COMMENT`|对单个属性或 Edge type 的描述。最大为 256 字节。默认无描述。|
Expand Down

0 comments on commit 05826a8

Please sign in to comment.