-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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]show statements #1924
[doc]show statements #1924
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SHOW CHARSET 语法 | ||
|
||
```ngql | ||
SHOW CHARSET | ||
``` | ||
|
||
`SHOW CHARSET` 返回所有可用的字符集。目前支持两种类型:utf8、utf8mb4。其中默认字符集为 utf8。**Nebula Graph** 将 utf8 进行了扩展,utf8 同时支持 4 个字节的字符,因此,utf8 和 utf8mb4 是等价的。 | ||
|
||
```ngql | ||
nebula> SHOW CHARSET; | ||
======================================================== | ||
| Charset | Description | Default collation | Maxlen | | ||
======================================================== | ||
| utf8 | UTF-8 Unicode | utf8_bin | 4 | | ||
-------------------------------------------------------- | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The results of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for your kind remind |
||
|
||
`SHOW CHARSET` 输出以下列: | ||
|
||
- Charset | ||
字符集名称。 | ||
- Description | ||
字符集的描述。 | ||
- Default collation | ||
字符集的默认排序规则。 | ||
- Maxlen | ||
存储一个字符所需的最大字节数。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# SHOW COLLATION 语法 | ||
|
||
```ngql | ||
SHOW COLLATION | ||
``` | ||
|
||
`SHOW COLLATION` 语句列出 **Nebula Graph** 目前支持的所有排序规则。目前支持四种排序规则:utf8_bin、utf8_general_ci、utf8mb4_bin、utf8mb4_general_ci。字符集为 utf8 时,默认 collate 为 utf8_bin;字符集为 utf8mb4 时,默认 collate 为 utf8mb4_bin。utf8_general_ci 和 utf8mb4_general_ci 都是忽略大小写的比较,行为同 MySQL 一致。 | ||
|
||
amber-moe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```ngql | ||
nebula> SHOW COLLATION; | ||
======================= | ||
| Collation | Charset | | ||
======================= | ||
| utf8_bin | utf8 | | ||
----------------------- | ||
``` | ||
|
||
`SHOW COLLATION` 输出有以下列: | ||
|
||
- Collation | ||
排序规则名称。 | ||
- Charset | ||
与排序规则关联的字符集的名称。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SHOW CONFIGS 语法 | ||
|
||
```ngql | ||
SHOW CONFIGS [graph|meta|storage] | ||
``` | ||
|
||
`SHOW CONFIGS` 语句显示参数信息。 `SHOW CONFIGS` 输出以下列:module(模块信息)、name(参数名称)、type(参数类型)、mode(参数模式)和 value(参数值)。 | ||
|
||
更多关于 `SHOW CONFIGS [graph|meta|storage]` 的信息,参见 [configs syntax](../../../3.build-develop-and-administration/3.deploy-and-administrations/server-administration/configuration-statements/configs-syntax.md)。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SHOW CREATE SPACE 语法 | ||
|
||
```ngql | ||
SHOW CREATE SPACE <space_name> | ||
``` | ||
|
||
`SHOW CREATE SPACE` 返回指定 space 及其创建语法。如果 space 包含默认值,则同时返回默认值。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SHOW CREATE TAGS/EDGES 语法 | ||
|
||
```ngql | ||
SHOW CREATE {TAG <tag_name> | EDGE <edge_name>} | ||
``` | ||
|
||
`SHOW CREATE TAG` 和 `SHOW CREATE EDGE` 返回当前图空间中指定的 tag、edge type 及其创建语法。如果 tag 或 edge type 包含默认值,则同时返回默认值。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# SHOW HOSTS 语法 | ||
|
||
```ngql | ||
SHOW HOSTS | ||
``` | ||
|
||
`SHOW HOSTS` 列出元服务器注册的所有存储主机。`SHOW HOSTS` 输出以下列:IP 地址、端口号、状态(online/offline)、leader 数量、leader 分布、partition 分布。 | ||
|
||
```ngql | ||
nebula> SHOW HOSTS; | ||
============================================================================================= | ||
| Ip | Port | Status | Leader count | Leader distribution | Partition distribution | | ||
============================================================================================= | ||
| 172.28.2.1 | 44500 | online | 0 | No valid partition | No valid partition | | ||
--------------------------------------------------------------------------------------------- | ||
| 172.28.2.2 | 44500 | online | 2 | NBA: 1, gods: 1 | NBA: 1, gods: 1 | | ||
--------------------------------------------------------------------------------------------- | ||
| 172.28.2.3 | 44500 | online | 0 | No valid partition | No valid partition | | ||
--------------------------------------------------------------------------------------------- | ||
| Total | | | 2 | gods: 1, NBA: 1 | gods: 1, NBA: 1 | | ||
--------------------------------------------------------------------------------------------- | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SHOW INDEXES 语法 | ||
|
||
```ngql | ||
SHOW {TAG | EDGE} INDEXES | ||
``` | ||
|
||
`SHOW INDEXES` 用于列出已创建完成的标签或边类型的索引信息。`SHOW INDEXES` 返回以下字段:索引 ID 和 索引名称。 | ||
amber-moe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# SHOW PARTS 语法 | ||
|
||
```ngql | ||
SHOW PARTS <part_id> | ||
``` | ||
|
||
`SHOW PARTS` 列出指定 partition 的信息。 | ||
|
||
```ngql | ||
nebula> SHOW PARTS 1; | ||
============================================================== | ||
| Partition ID | Leader | Peers | Losts | | ||
============================================================== | ||
| 1 | 172.28.2.2:44500 | 172.28.2.2:44500 | | | ||
-------------------------------------------------------------- | ||
``` | ||
|
||
`SHOW PARTS` 输出以下列: | ||
|
||
- Partition ID | ||
- Leader | ||
- Peers | ||
- Losts |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SHOW ROLES 语法 | ||
|
||
```ngql | ||
SHOW ROLES IN <space_name>> | ||
``` | ||
|
||
`SHOW ROLES` 语句显示分配给用户账户的角色。`SHOW ROLES` 输出以下列:用户账户和角色类型。 | ||
amber-moe marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SHOW SNAPSHOTS 语法 | ||
|
||
```ngql | ||
SHOW SNAPSHOTS | ||
amber-moe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
`SHOW SNAPSHOTS` 语句返回所有快照。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SHOW SPACES 语法 | ||
|
||
```ngql | ||
SHOW SPACES | ||
``` | ||
|
||
`SHOW SPACES` 列出 **Nebula Graph** 集群中的所有图空间。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SHOW TAGS/EDGES 语法 | ||
|
||
```ngql | ||
SHOW {TAGS | EDGES} | ||
``` | ||
|
||
`SHOW TAGS` 和 `SHOW EDGES` 则返回当前图空间中被定义的 tag 和 edge type。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SHOW USERS 语法 | ||
|
||
```ngql | ||
SHOW USERS | ||
``` | ||
|
||
`SHOW USERS` 语句显示用户信息。 `SHOW USERS` 输出以下列:账户名。 | ||
amber-moe marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SHOW CHARSET Syntax | ||
|
||
```ngql | ||
SHOW CHARSET | ||
``` | ||
|
||
`SHOW CHARSET` displays the available character sets. Currently available types are: utf8 and utf8mb4. The default charset type is utf8. **Nebula Graph** extends the uft8 to support four byte characters. Therefore utf8 and utf8mb4 equivalent. | ||
|
||
```ngql | ||
nebula> SHOW CHARSET; | ||
======================================================== | ||
| Charset | Description | Default collation | Maxlen | | ||
======================================================== | ||
| utf8 | UTF-8 Unicode | utf8_bin | 4 | | ||
-------------------------------------------------------- | ||
``` | ||
|
||
`SHOW CHARSET` output has these columns: | ||
|
||
- Charset | ||
The character set name. | ||
- Description | ||
A description of the character set. | ||
- Default collation | ||
The default collation for the character set. | ||
- Maxlen | ||
The maximum number of bytes required to store one character. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# SHOW COLLATION Syntax | ||
|
||
```ngql | ||
SHOW COLLATION | ||
``` | ||
|
||
`SHOW COLLATION` displays the collations supported by **Nebula Graph**. Currently available types are: utf8_bin, utf8_general_ci, utf8mb4_bin and utf8mb4_general_ci. When the character set is utf8, the default collate is utf8_bin; when the character set is utf8mb4, the default collate is utf8mb4_bin. Both utf8_general_ci and utf8mb4_general_ci are case-insensitive comparisons and behave the same as MySQL. | ||
|
||
```ngql | ||
nebula> SHOW COLLATION; | ||
======================= | ||
| Collation | Charset | | ||
======================= | ||
| utf8_bin | utf8 | | ||
----------------------- | ||
``` | ||
|
||
`SHOW COLLATION` output has these columns: | ||
|
||
- Collation | ||
The collation name. | ||
- Charset | ||
The name of the character set with which the collation is associated. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SHOW CONFIGS Syntax | ||
|
||
```ngql | ||
SHOW CONFIGS [graph|meta|storage] | ||
``` | ||
|
||
`SHOW CONFIGS` lists the configuration information. `SHOW CONFIGS` output has these columns: module, name, type, mode and value. | ||
|
||
For more information about `SHOW CONFIGS [graph|meta|storage]`, please refer to [configs syntax](../../../3.build-develop-and-administration/3.deploy-and-administrations/server-administration/configuration-statements/configs-syntax.md). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SHOW CREATE SPACE Syntax | ||
|
||
```ngql | ||
SHOW CREATE SPACE <space_name> | ||
``` | ||
|
||
`SHOW CREATE SPACE` statement returns the specified graph space and its creation syntax. If the graph space contains a default value, the default value is also returned. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SHOW CREATE TAGS/EDGES Syntax | ||
|
||
```ngql | ||
SHOW CREATE {TAG <tag_name> | EDGE <edge_name>} | ||
``` | ||
|
||
`SHOW CREATE TAG` and `SHOW CREATE EDGE` return the specified tag or edge type and their creation syntax in a given space. If the tag or edge type contains a default value, the default value is also returned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHOW CHARSET
语句列出Nebula Graph 目前支持的所有字符集。目前支持两种字符集:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ok here.