diff --git a/docs/manual-EN/2.query-language/1.data-types/data-types.md b/docs/manual-EN/2.query-language/1.data-types/data-types.md index d61e8b2ffdb..76f8fe4e04c 100644 --- a/docs/manual-EN/2.query-language/1.data-types/data-types.md +++ b/docs/manual-EN/2.query-language/1.data-types/data-types.md @@ -6,19 +6,19 @@ The built-in data types supported by **Nebula Graph** are as follows: ### Integer -An integer is declared with keyword `int` , which is 64-bit *signed*, the range is [-9223372036854775808, 9223372036854775807], and there is no overflow in int64-based calculation. Integer constants support multiple formats: +An integer is declared with keyword `int` , which is 64-bit *signed*, the range is [-9223372036854775808, 9223372036854775807]. Integer constants support multiple formats: 1. Decimal, for example `123456` -1. Hexadecimal, for example `0xdeadbeaf` -1. Octal, for example `01234567` +2. Hexadecimal, for example `0xdeadbeaf` +3. Octal, for example `01234567` ### Double Floating Point -Double floating point data type is used for storing double precision floating point values. Keyword used for double floating point data type is `double`. There are no upper and lower ranges. --> +Double floating point data type is used for storing double precision floating point values. Keyword used for double floating point data type is `double`. There are no upper and lower ranges. ## Boolean diff --git a/docs/manual-EN/2.query-language/2.functions-and-operators/built-in-functions.md b/docs/manual-EN/2.query-language/2.functions-and-operators/built-in-functions.md index 2a719aadda4..b83118e2f87 100644 --- a/docs/manual-EN/2.query-language/2.functions-and-operators/built-in-functions.md +++ b/docs/manual-EN/2.query-language/2.functions-and-operators/built-in-functions.md @@ -12,7 +12,7 @@ double ceil(double x) | Return the smallest integer greater than or equal to the double round(double x) | Return integral value nearest to the argument, returns a number farther away from 0 if the parameter is in the middle| double sqrt(double x) | Return the square root of the argument | double cbrt(double x) | Return the cubic root of the argument | -double hypot(double x, double x) | Return the hypotenuse of a right-angled triangle | +double hypot(double x, double y) | Return the hypotenuse of a right-angled triangle | double pow(double x, double y) | Compute the power of the argument | double exp(double x) | Return the value of e raised to the x power | double exp2(double x) | Return 2 raised to the argument | diff --git a/docs/manual-EN/2.query-language/2.functions-and-operators/comparison-functions-and-operators.md b/docs/manual-EN/2.query-language/2.functions-and-operators/comparison-functions-and-operators.md index 47eb00f756f..10a4844738b 100644 --- a/docs/manual-EN/2.query-language/2.functions-and-operators/comparison-functions-and-operators.md +++ b/docs/manual-EN/2.query-language/2.functions-and-operators/comparison-functions-and-operators.md @@ -61,11 +61,11 @@ Less than: ```ngql nebula> YIELD 2.0 < 1.9; -======================= -| (2.000000<1.900000) | -======================= -|false | ------------------------ +========================================= +| (2.000000000000000<1.900000000000000) | +========================================= +| false | +----------------------------------------- ``` * ≤ diff --git a/docs/manual-EN/2.query-language/2.functions-and-operators/group-by-function.md b/docs/manual-EN/2.query-language/2.functions-and-operators/group-by-function.md index 55759443ddb..6249f6f572b 100644 --- a/docs/manual-EN/2.query-language/2.functions-and-operators/group-by-function.md +++ b/docs/manual-EN/2.query-language/2.functions-and-operators/group-by-function.md @@ -1,6 +1,6 @@ -# Aggregate (Group By) Function +# Group By -The `GROUP BY` functions are similar with SQL. It can only be applied in the `YIELD` syntax. +`GROUP BY` is similar with SQL. It can only be applied in the `YIELD` syntax. |Name | Description | |:----|:----:| diff --git a/docs/manual-EN/2.query-language/2.functions-and-operators/operator-precedence.md b/docs/manual-EN/2.query-language/2.functions-and-operators/operator-precedence.md index 916ffff6d48..3d36aec192f 100644 --- a/docs/manual-EN/2.query-language/2.functions-and-operators/operator-precedence.md +++ b/docs/manual-EN/2.query-language/2.functions-and-operators/operator-precedence.md @@ -3,8 +3,8 @@ The following list shows the precedence of nGQL operators in descending order. Operators that are shown together on a line have the same precedence. ```ngql +- (negative number) ! -- (unary minus) *, /, % -, + == , >=, >, <=, <, <>, != diff --git a/docs/manual-EN/2.query-language/3.language-structure/comment-syntax.md b/docs/manual-EN/2.query-language/3.language-structure/comment-syntax.md index 716b705bb83..07d2f83908f 100644 --- a/docs/manual-EN/2.query-language/3.language-structure/comment-syntax.md +++ b/docs/manual-EN/2.query-language/3.language-structure/comment-syntax.md @@ -3,23 +3,24 @@ **Nebula Graph** supports four comment styles: * From a # character to the end of the line. -* From a --  sequence to the end of the line. +* From a --  sequence to the end of the line. When using '--' as a comment, you need to add a space after it, i.e. '-- '. + * From a // sequence to the end of the line, as in the C programming language. -* From a /* sequence to the following */ sequence. This syntax enables a comment to extend over multiple lines because the beginning and closing sequences need not be on the same line. +* From a `/*  */` sequence. This syntax enables a comment to extend over multiple lines because the beginning and closing sequences need not be on the same line. Nested comments are not supported. The following example demonstrates all these comment styles: ```ngql nebula> -- Do nothing this line -nebula> YIELD 1+1 # This comment continues to the end of line -nebula> YIELD 1+1 -- This comment continues to the end of line -nebula> YIELD 1+1 // This comment continues to the end of line -nebula> YIELD 1 /* This is an in-line comment */ + 1 -nebula> YIELD 11 + \ +nebula> YIELD 1+1; # This comment continues to the end of line +nebula> YIELD 1+1; -- This comment continues to the end of line +nebula> YIELD 1+1; // This comment continues to the end of line +nebula> YIELD 1 /* This is an in-line comment */ + 1; +nebula> YIELD 11 + \ /* Multiple-line comment \ Use backslash as line break. \ -*/ 12 +*/ 12; ``` The backslash `\` in a line indicates a line break. diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/create-space-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/create-space-syntax.md index 67361d73230..581650b044a 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/create-space-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/create-space-syntax.md @@ -21,7 +21,7 @@ You can use the `If NOT EXISTS` keywords when creating spaces. This keyword auto ## Customized Space Options -When creating a space, the following two customized options can be given: +When creating a space, the following four customized options can be given: * _partition_num_ diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md index e8a1d4a450e..bafa1f96f6b 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-space-syntax.md @@ -6,7 +6,7 @@ DROP SPACE [IF EXISTS] 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. +DROP SPACE deletes everything 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. diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md index 12017bf9096..1ff24e97a47 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/drop-tag-syntax.md @@ -8,7 +8,7 @@ You must have the DROP privilege for the tag. > Be careful with this statement. -**Note:** When dropping a tag, **Nebula Graph** only checks whether the tag is associated with any indexes. If so the deletion is rejected. +**Note:** When dropping a tag, **Nebula Graph** will only check whether the tag is associated with any indexes. If so the deletion is rejected. Please refer to [Index Documentation](index.md) on details about index. diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-configs-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-configs-syntax.md index ec633aef5a7..849a84e9b42 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-configs-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-configs-syntax.md @@ -9,16 +9,20 @@ SHOW CONFIGS [graph|meta|storage] For example: ```ngql -nebula> SHOW CONFIGS meta; -============================================================================================================================ -| module | name | type | mode | value | -============================================================================================================================ -| META | v | INT64 | IMMUTABLE | 4 | ----------------------------------------------------------------------------------------------------------------------------- -| META | help | BOOL | IMMUTABLE | False | ----------------------------------------------------------------------------------------------------------------------------- -| META | port | INT64 | IMMUTABLE | 45500 | ----------------------------------------------------------------------------------------------------------------------------- +nebula> SHOW CONFIGS graph; +============================================================== +| module | name | type | mode | value | +============================================================== +| GRAPH | v | INT64 | MUTABLE | 0 | +-------------------------------------------------------------- +| GRAPH | minloglevel | INT64 | MUTABLE | 2 | +-------------------------------------------------------------- +| GRAPH | slow_op_threshhold_ms | INT64 | MUTABLE | 50 | +-------------------------------------------------------------- +| GRAPH | heartbeat_interval_secs | INT64 | MUTABLE | 3 | +-------------------------------------------------------------- +| GRAPH | meta_client_retry_times | INT64 | MUTABLE | 3 | +-------------------------------------------------------------- ``` For more information about `SHOW CONFIGS [graph|meta|storage]`, please refer to [configs syntax](../../../../3.build-develop-and-administration/3.configurations/2.configs-syntax.md). diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-create-space-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-create-space-syntax.md index c6efdf1a4de..cc25dbc4736 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-create-space-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-create-space-syntax.md @@ -11,6 +11,6 @@ nebula> SHOW CREATE SPACE NBA; ========================================================================================================= | Space | Create Space | ========================================================================================================= -| gods | CREATE SPACE gods (partition_num = 1, replica_factor = 1, charset = utf8, collate = utf8_bin) | +| NBA | CREATE SPACE gods (partition_num = 1, replica_factor = 1, charset = utf8, collate = utf8_bin) | --------------------------------------------------------------------------------------------------------- ``` diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-indexes-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-indexes-syntax.md index b4de3824201..8828e7e6e79 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-indexes-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-indexes-syntax.md @@ -5,3 +5,18 @@ SHOW {TAG | EDGE} INDEXES ``` `SHOW INDEXES` returns the defined tag/edg-type index information. `SHOW INDEXES` returns the following fields: index ID and index name. + +For example: + +```ngql +nebula> SHOW TAG INDEXES; +============================= +| Index ID | Index Name | +============================= +| 6 | player_index_1 | +----------------------------- +| 7 | player_index_0 | +----------------------------- +``` + +See [Index](../../1.data-definition-statements/index.md) on how to create indexes. diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-parts-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-parts-syntax.md index a7c1556df10..db0c2da975d 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-parts-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-parts-syntax.md @@ -4,7 +4,7 @@ SHOW PARTS ``` -`SHOW PARTS` lists the partition information of the given SPACE. +`SHOW PARTS` lists the partition information of the given SPACE. `` is optional, if not specified, all parts information is returned. ```ngql nebula> SHOW PARTS 1; diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-roles-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-roles-syntax.md index 8e166e41bd3..e8a262b38e3 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-roles-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-roles-syntax.md @@ -1,7 +1,23 @@ # SHOW ROLES Syntax ```ngql -SHOW ROLES IN > +SHOW ROLES IN ``` `SHOW ROLES` statement displays the roles that are assigned to a user account. `SHOW ROLES` output has these columns: account and role type. + +If the user is `GOD` or `ADMIN`, **Nebula Graph** shows all roles limited to its authorized space. +If the user is `DBA`, `USER` or `GUEST`, **Nebula Graph** shows only his own role. + +For example: + +```ngql +nebula> SHOW ROLES in NBA; +======================= +| Account | Role Type | +======================= +| userA | ADMIN | +----------------------- +``` + +See [Create User](../../../../3.build-develop-and-administration/4.account-management-statements/create-user-syntax.md) to create user. See [Grant Role](../../../../3.build-develop-and-administration/4.account-management-statements/grant-role-syntax.md) to grant roles to a user. diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-snapshots-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-snapshots-syntax.md index 176f5006f83..e8448b77506 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-snapshots-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-snapshots-syntax.md @@ -5,3 +5,20 @@ SHOW SNAPSHOTS ``` `SHOW SNAPSHOTS` statement lists all the snapshots. + +For example: + +```ngql +nebula> SHOW SNAPSHOTS; +=========================================================== +| Name | Status | Hosts | +=========================================================== +| SNAPSHOT_2019_12_04_10_54_36 | VALID | 127.0.0.1:77833 | +----------------------------------------------------------- +| SNAPSHOT_2019_12_04_10_54_42 | VALID | 127.0.0.1:77833 | +----------------------------------------------------------- +| SNAPSHOT_2019_12_04_10_54_44 | VALID | 127.0.0.1:77833 | +----------------------------------------------------------- +``` + +See [here](../../../../3.build-develop-and-administration/5.storage-service-administration/cluster-snapshot.md) to create snapshots. diff --git a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-spaces-syntax.md b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-spaces-syntax.md index f5d4c8631a4..3db0f9ac63c 100644 --- a/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-spaces-syntax.md +++ b/docs/manual-EN/2.query-language/4.statement-syntax/3.utility-statements/show-statements/show-spaces-syntax.md @@ -5,3 +5,16 @@ SHOW SPACES ``` `SHOW SPACES` lists the SPACES on the **Nebula Graph** cluster. + +For example: + +```ngql +nebula> SHOW SPACES; +======== +| Name | +======== +| NBA | +-------- +``` + +See [here](../../1.data-definition-statements/create-space-syntax.md) to creat spaces. diff --git a/mkdocs.yml b/mkdocs.yml index 161cae8080b..35ce5c849e2 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -75,7 +75,7 @@ nav: - Bitwise Operators: manual-EN/2.query-language/2.functions-and-operators/bitwise-operators.md - Built in Functions: manual-EN/2.query-language/2.functions-and-operators/built-in-functions.md - Comparison Functions and Operators: manual-EN/2.query-language/2.functions-and-operators/comparison-functions-and-operators.md - - Aggregate GROUP BY Functions: manual-EN/2.query-language/2.functions-and-operators/group-by-function.md + - GROUP BY: manual-EN/2.query-language/2.functions-and-operators/group-by-function.md - LIMIT Syntax: manual-EN/2.query-language/2.functions-and-operators/limit-syntax.md - Logical Operators: manual-EN/2.query-language/2.functions-and-operators/logical-operators.md - Operator Precedence: manual-EN/2.query-language/2.functions-and-operators/operator-precedence.md