Skip to content
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

on-call #66

Merged
merged 4 commits into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/manual-EN/2.query-language/1.data-types/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

<!-- ### Floating Point

Floating point data type is used for storing single precision floating point values. Keyword used for floating point data type is `float`, which is only meaningful for schema definitions and the number of bytes stored. Floating point literal constants are treated as double precision floating point numbers during parsing and arithmetic operations.
Floating point data type is used for storing single precision floating point values. Keyword used for floating point data type is `float`, which is only meaningful for schema definitions and the number of bytes stored. Floating point literal constants are treated as double precision floating point numbers during parsing and arithmetic operations. -->

### 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ Less than:

```ngql
nebula> YIELD 2.0 < 1.9;
=======================
| (2.000000<1.900000) |
=======================
|false |
-----------------------
=========================================
| (2.000000000000000<1.900000000000000) |
=========================================
| false |
-----------------------------------------
```

* &le;
Expand Down
Original file line number Diff line number Diff line change
@@ -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 |
|:----|:----:|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*, /, %
-, +
== , >=, >, <=, <, <>, !=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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_

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DROP SPACE [IF EXISTS] <space_name>

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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
---------------------------------------------------------------------------------------------------------
```
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SHOW PARTS <part_id>
```

`SHOW PARTS` lists the partition information of the given SPACE.
`SHOW PARTS` lists the partition information of the given SPACE. `<part_id>` is optional, if not specified, all parts information is returned.

```ngql
nebula> SHOW PARTS 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
# SHOW ROLES Syntax

```ngql
SHOW ROLES IN <space_name>>
SHOW ROLES IN <space_name>
```

`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.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down