Skip to content

Commit

Permalink
schema support Chinese (#975)
Browse files Browse the repository at this point in the history
* schema support Chinese

* Update docs-2.0/3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md

Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com>

* Update docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md

Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com>

* Update docs-2.0/3.ngql-guide/11.edge-type-statements/1.create-edge.md

Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com>

* Update docs-2.0/3.ngql-guide/14.native-index-statements/1.create-native-index.md

Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com>

* Update docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md

Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com>

* Update docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md

Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com>

* Update docs-2.0/3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md

Co-authored-by: randomJoe211 <69501902+randomJoe211@users.noreply.github.com>

* Update keywords-and-reserved-words.md

* Update 1.create-tag.md

* Update docs-2.0/3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md

Co-authored-by: randomJoe211 <69501902+randomJoe211@users.noreply.github.com>

* Update 1.create-edge.md

* Update 1.create-tag.md

* Update 1.create-native-index.md

* Update 1.create-space.md

* Update 1.create-space.md

* update

Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com>
Co-authored-by: randomJoe211 <69501902+randomJoe211@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 13, 2021
1 parent 9ee034e commit 3413b84
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Execution succeeded
nebula> CREATE TAG SPACE(name string);
Execution succeeded
nebula> CREATE TAG 中文(简体 string);
Execution succeeded
```

- `TAG` is a reserved keyword. To use `TAG` as an identifier, you must quote it with backticks.
Expand Down
2 changes: 1 addition & 1 deletion docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CREATE TAG [IF NOT EXISTS] <tag_name>
|Parameter|Description|
|:---|:---|
|`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>`|The tag name must be **unique** in a graph space. Once the tag name is set, it can not be altered. The rules for permitted tag names are the same as those for graph space names. For prohibited names, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).|
|`<tag_name>`|The tag name must be **unique** in a graph space. Once the tag name is set, it can not be altered. The name of the tag supports 1 to 4 bytes UTF-8 encoded characters, such as English letters (case-sensitive), digits, and Chinese characters, but does not support special characters except underscores. For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).|
|`<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).|
|`NULL \| NOT NULL`|Specifies if the property supports `NULL | NOT NULL`. The default value is `NULL`.|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CREATE EDGE [IF NOT EXISTS] <edge_type_name>
|Parameter|Description|
|:---|:---|
|`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>`|The edge type name must be **unique** in a graph space. Once the edge type name is set, it can not be altered. The rules for permitted edge type names are the same as those for graph space names. For prohibited names, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).|
|`<edge_type_name>`|The edge type name must be **unique** in a graph space. Once the edge type name is set, it can not be altered. The name of the edge type supports 1 to 4 bytes UTF-8 encoded characters, such as English letters (case-sensitive), digits, and Chinese characters, but does not support special characters except underscores. For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).|
|`<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).|
|`NULL \| NOT NULL`|Specifies if the property supports `NULL | NOT NULL`. The default value is `NULL`.|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CREATE {TAG | EDGE} INDEX [IF NOT EXISTS] <index_name> ON {<tag_name> | <edge_na
|:---|:---|
|`TAG \| EDGE`|Specifies the index type that you want to create.|
|`IF NOT EXISTS`|Detects if the index that you want to create exists. If it does not exist, a new one will be created.|
|`<index_name>`|The name of the index. It must be unique in a graph space. A recommended way of naming is `i_tagName_propName`. The name of the index is case-sensitive and allows letters, numbers, or underlines. [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md) are not allowed.|
|`<index_name>`|The name of the index. It must be unique in a graph space. A recommended way of naming is `i_tagName_propName`. The name of the index supports 1 to 4 bytes UTF-8 encoded characters, such as English letters (case-sensitive), digits, and Chinese characters, but does not support special characters except underscores. For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).|
|`<tag_name> \| <edge_name>`|Specifies the name of the tag or edge associated with the index.|
|`<prop_name_list>`|To index a **variable-length** string property, you must use `prop_name(length)` to specify the index length. To index a tag or an edge type, ignore the `prop_name_list`.|
|`COMMENT`|The remarks of the index. The maximum length is 256 bytes. By default, there will be no comments on an index.|
Expand Down
4 changes: 2 additions & 2 deletions docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CREATE SPACE [IF NOT EXISTS] <graph_space_name> (
|Parameter|Description|
|:---|:---|
|`IF NOT EXISTS`|Detects if the related graph space exists. If it does not exist, a new one will be created. The graph space existence detection here only compares the graph space name (excluding properties).|
|`<graph_space_name>`|Uniquely identifies a graph space in a Nebula Graph instance. The name of the graph space is case-sensitive and allows letters, numbers, or underlines. [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md) are not allowed.|
|`<graph_space_name>`|Uniquely identifies a graph space in a Nebula Graph instance. The name of the graph space supports 1 to 4 bytes UTF-8 encoded characters, such as English letters (case-sensitive), digits, and Chinese characters, but does not support special characters except underscores. For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).|
|`partition_num`|Specifies the number of partitions in each replica. The suggested number is five times the number of the hard disks in the cluster. For example, if you have 3 hard disks in the cluster, we recommend that you set 15 partitions. The default value is 100.|
|`replica_factor`|Specifies the number of replicas in the cluster. The suggested number is 3 in a production environment and 1 in a test environment. The replica number must be an **odd number** for the need of quorum-based voting. The default value is 1.|
|`vid_type`|A required parameter. Specifies the VID type in a graph space. Available values are `FIXED_STRING(N)` and `INT64`. `INT` equals to `INT64`. `FIXED_STRING(<N>)` specifies the VID as a string, while `INT64` specifies it as an integer. `N` represents the maximum length of the VIDs. If you set a VID that is longer than `N` characters, Nebula Graph throws an error.|
Expand Down Expand Up @@ -58,7 +58,7 @@ CREATE SPACE <new_graph_space_name> AS <old_graph_space_name>;

| Parameter | Description |
| :--- | :--- |
| `<new_graph_space_name>` | The name of the graph space that is newly created. The name of the graph space is case-sensitive and allows letters, numbers, or underlines. [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md) are not allowed. When a new graph space is created, the schema of the old graph space `<old_graph_space_name>` will be cloned, including its parameters (the number of partitions and replicas, etc.), Tag, Edge type, and native indexes. |
| `<new_graph_space_name>` | The name of the graph space that is newly created. The name of the graph space supports 1 to 4 bytes UTF-8 encoded characters, such as English letters (case-sensitive), digits, and Chinese characters, but does not support special characters except underscores. For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md). When a new graph space is created, the schema of the old graph space `<old_graph_space_name>` will be cloned, including its parameters (the number of partitions and replicas, etc.), Tag, Edge type, and native indexes. |
| `<old_graph_space_name>` | The name of the graph space that already exists. |

## Examples
Expand Down

0 comments on commit 3413b84

Please sign in to comment.