diff --git a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md new file mode 100644 index 00000000000..9985994545e --- /dev/null +++ b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md @@ -0,0 +1,513 @@ +# nGQL cheatsheet + +## Functions + +- [Math functions](../3.ngql-guide/6.functions-and-expressions/1.math.md) + + | Function | Description | + | :-------------------------------------- | :----------------------------------------------------------- | + | double abs(double x) | Returns the absolute value of the argument. | + | double floor(double x) | Returns the largest integer value smaller than or equal to the argument. (Rounds down) | + | double ceil(double x) | Returns the smallest integer greater than or equal to the argument. (Rounds up) | + | double round(double x) | Returns the integer value nearest to the argument. Returns a number farther away from 0 if the argument is in the middle. | + | double sqrt(double x) | Returns the square root of the argument. | + | double cbrt(double x) | sReturns the cubic root of the argument. | + | double hypot(double x, double y) | Returns the hypotenuse of a right-angled triangle. | + | double pow(double x, double y) | Returns the result of $x^y$. | + | double exp(double x) | Returns the result of $e^x$. | + | double exp2(double x) | Returns the result of $2^x$. | + | double log(double x) | Returns the base-e logarithm of the argument. | + | double log2(double x) | Returns the base-2 logarithm of the argument. | + | double log10(double x) | Returns the base-10 logarithm of the argument. | + | double sin(double x) | Returns the sine of the argument. | + | double asin(double x) | Returns the inverse sine of the argument. | + | double cos(double x) | Returns the cosine of the argument. | + | double acos(double x) | Returns the inverse cosine of the argument. | + | double tan(double x) | Returns the tangent of the argument. | + | double atan(double x) | Returns the inverse tangent of the argument. | + | double rand() | Returns a random floating point number in the range from 0 (inclusive) to 1 (exclusive); i.e.[0,1). | + | int rand32(int min, int max) | Returns a random 32-bit integer in `[min, max)`.
If you set only one argument, it is parsed as `max` and `min` is `0` by default.
If you set no argument, the system returns a random signed 32-bit integer. | + | int rand64(int min, int max) | Returns a random 64-bit integer in `[min, max)`.
If you set only one argument, it is parsed as `max` and `min` is `0` by default.
If you set no argument, the system returns a random signed 64-bit integer. | + | collect() | Puts all the collected values into a list. | + | avg() | Returns the average value of the argument. | + | count() | Returns the number of records. | + | max() | Returns the maximum value. | + | min() | Returns the minimum value. | + | std() | Returns the population standard deviation. | + | sum() | Returns the sum value. | + | bit_and() | Bitwise AND. | + | bit_or() | Bitwise OR. | + | bit_xor() | Bitwise XOR. | + | int size() | Returns the number of elements in a list or a map. | + | int range(int start, int end, int step) | Returns a list of integers from `[start,end]` in the specified steps. `step` is 1 by default. | + | int sign(double x) | Returns the signum of the given number.
If the number is 0, the system returns 0.
If the number is negative, the system returns -1.
If the number is positive, the system returns 1. | + | double e() | Returns the base of the natural logarithm, e (2.718281828459045). | + | double pi() | Returns the mathematical constant pi (3.141592653589793). | + | double radians() | Converts degrees to radians. `radians(180)` returns `3.141592653589793`. | + + + +- [String functions](../3.ngql-guide/6.functions-and-expressions/2.string.md) + + Function| Description | + ---- | ----| + int strcasecmp(string a, string b) | Compares string a and b without case sensitivity. When a = b, the return value is 0. When a > b, the return value is greater than 0. When a < b, the return value is less than 0. | + string lower(string a) | Returns the argument in lowercase. | + string toLower(string a) | The same as `lower()`. | + string upper(string a) | Returns the argument in uppercase. | + string toUpper(string a) | The same as `upper()`. | + int length(string a) | Returns the length of the given string in bytes. | + string trim(string a) | Removes leading and trailing spaces. | + string ltrim(string a) | Removes leading spaces. | + string rtrim(string a) | Removes trailing spaces. | + string left(string a, int count) | Returns a substring consisting of `count` characters from the left side of string a. If string a is shorter than `count`, the system returns string a. | + string right(string a, int count) | Returns a substring consisting of `count` characters from the right side of string a. If string a is shorter than `count`, the system returns string a. | + string lpad(string a, int size, string letters) | Left-pads string a with string `letters` and returns a substring with the length of `size`. | + string rpad(string a, int size, string letters)| Right-pads string a with string `letters` and returns a substring with the length of `size`. | + string substr(string a, int pos, int count) | Returns a substring extracting `count` characters starting from the specified position `pos` of string a. | + string substring(string a, int pos, int count) | The same as `substr()`. | + string reverse(string) | Returns a string in reverse order. + string replace(string a, string b, string c) | Replaces string b in string a with string c. | + list split(string a, string b) | Splits string a at string b and returns a list of strings. | + string toString() | Takes in any data type and converts it into a string. | + int hash() | Takes in any data type and encodes it into a hash value. | | + + + +* [Data and time functions](../3.ngql-guide/6.functions-and-expressions/3.date-and-time.md) + + Function| Description | + ---- | ----| + int now() | Returns the current date and time of the system time zone. | + timestamp timestamp() | Returns the current date and time of the system time zone. | + date date() | Returns the current UTC date based on the current system. | + time time() | Returns the current UTC time based on the current system. | + datetime datetime() | Returns the current UTC date and time based on the current system. | + + + +* [Schema functions](../3.ngql-guide/6.functions-and-expressions/4.schema.md) + + |Function| Description | + |---- | ----| + |id(vertex) | Returns the ID of a vertex. The data type of the result is the same as the vertex ID.| + |map properties(vertex) | Returns the properties of a vertex.| + |map properties(edge) | Returns the properties of an edge.| + |string type(edge) | Returns the edge type of an edge.| + |src(edge)|Returns the source vertex ID of an edge. The data type of the result is the same as the vertex ID.| + |dst(edge)|Returns the destination vertex ID of an edge. The data type of the result is the same as the vertex ID.| + |int rank(edge) | Returns the rank value of an edge.| + + + +* [List functions](../3.ngql-guide/6.functions-and-expressions/6.list.md) + + | Function| Description | + | ---- | ----| + | keys(expr) | Returns a list containing the string representations for all the property names of vertices, edges, or maps. | + | labels(vertex) | Returns the list containing all the tags of a vertex. | + | nodes(path) | Returns the list containing all the vertices in a path. | + | range(start, end [, step]) | Returns the list containing all the fixed-length steps in `[start,end]`. `step` is 1 by default. | + | relationships(path) | Returns the list containing all the relationships in a path. | + | reverse(list) | Returns the list reversing the order of all elements in the original list. | + | tail(list) | Returns all the elements of the original list, excluding the first one. | + | head(list) | Returns the first element of a list. | + | last(list) | Returns the last element of a list. | + | coalesce(list) | Returns the first not null value in a list. | + | reduce() | See [reduce() function](../3.ngql-guide/6.functions-and-expressions/11.reduce.md)。 | + + + +* [count() function](../3.ngql-guide/6.functions-and-expressions/7.count.md) + + | Function| Description | + | :------ | :------------------------------------------------------ | + | count() |Syntax: `count({expr \| *})` .
`count()`returns the number of rows (including NULL).
`count(expr)`returns the number of non-NULL values that meet the expression.
count() and size() are different. | + + + +* [collect() function](../3.ngql-guide/6.functions-and-expressions/10.collect.md) + + | Function| Description | + | :-------- | :----------------------------------------------------------- | + | collect() |The collect() function returns a list containing the values returned by an expression. Using this function aggregates data by merging multiple records or values into a single list. | + + + +* [reduce() function](../3.ngql-guide/6.functions-and-expressions/11.reduce.md) + + | Function | Syntax | Description | + | :------- | :-------------------------------------------------------- | ------------------------------------------------------------ | + | reduce() | `reduce( = , IN | )` | The `reduce()` function applies an expression to each element in a list one by one, chains the result to the next iteration by taking it as the initial value, and returns the final result. | + + + +* [hash() function](../3.ngql-guide/6.functions-and-expressions/12.hash.md) + + | Function| Description | + | :----- | :----------------------------------------------------------- | + | hash() | The `hash()` function returns the hash value of the argument. The argument can be a number, a string, a list, a boolean, null, or an expression that evaluates to a value of the preceding data types. The source code of the `hash()` function (MurmurHash2), seed (`0xc70f6907UL`), and other parameters can be found in [`MurmurHash2.h`](https://github.com/vesoft-inc/nebula/blob/master/src/common/base/MurmurHash2.h). | + + + +* [concat() function](../3.ngql-guide/6.functions-and-expressions/13.concat.md) + + | Function| Description | + | :------- | :----------------------------------------------------------- | + | concat() | The `concat()` function requires at least two or more strings. All the parameters are concatenated into one string.
Syntax: `concat(string1,string2,...)` | + + + +* [concat_ws() function](../3.ngql-guide/6.functions-and-expressions/13.concat.md) + + | Function| Description | + | ----------- | ------------------------------------------------------------ | + | concat_ws() | The `concat_ws()` function connects two or more strings with a predefined separator. | + + + +* [Predicate functions](../3.ngql-guide/6.functions-and-expressions/8.predicate.md) + + Predicate functions return `true` or `false`. They are most commonly used in `WHERE` clauses. + + ``` + ( IN WHERE ) + ``` + + | Functions | Description | + |:----- | :------------------: | + | exists() | Returns `true` if the specified property exists in the vertex, edge or map. Otherwise, returns `false`. | + | any() | Returns `true` if the specified predicate holds for at least one element in the given list. Otherwise, returns `false`. | + | all() | Returns `true` if the specified predicate holds for all elements in the given list. Otherwise, returns `false`. | + | none() | Returns `true` if the specified predicate holds for no element in the given list. Otherwise, returns `false`. | + | single() | Returns `true` if the specified predicate holds for exactly one of the elements in the given list. Otherwise, returns `false`. | + + + +* [CASE expressions](../3.ngql-guide/6.functions-and-expressions/5.case-expressions.md) + + The `CASE` expression uses conditions to filter the result of an nGQL query statement. It is usually used in the `YIELD` and `RETURN` clauses. The `CASE` expression will traverse all the conditions. When the first condition is met, the `CASE` expression stops reading the conditions and returns the result. If no conditions are met, it returns the result in the `ELSE` clause. If there is no `ELSE` clause and no conditions are met, it returns `NULL`. + + Syntax: + + ``` + CASE + WHEN THEN + [WHEN ...] + [ELSE ] + END + ``` + +|Parameter|Description| +|-|-| +|`comparer`|A value or a valid expression that outputs a value. This value is used to compare with the `value`.| +|`value`|It will be compared with the `comparer`. If the `value` matches the `comparer`, then this condition is met.| +|`result`|The `result` is returned by the `CASE` expression if the `value` matches the `comparer`.| +|`default`|The `default` is returned by the `CASE` expression if no conditions are met.| + + + +## General queries statements + +* [MATCH](../3.ngql-guide/7.general-query-statements/2.match.md) + + ``` + MATCH [] RETURN + ``` + + | Pattern | Example | Description | + | --------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | + | Match vertices | `(v)` | You can use a user-defined variable in a pair of parentheses to represent a vertex in a pattern. For example: `(v)`. | + | Match tags | `MATCH (v:player) RETURN v` | You can specify a tag with `:` after the vertex in a pattern. | + | Match vertex properties | `MATCH (v:player{name:"Tim Duncan"}) RETURN v` | You can specify a vertex property with `{: }` after the tag in a pattern. | + | Match a VID. | `MATCH (v) WHERE id(v) == 'player101' RETURN v` | You can use the VID to match a vertex. The `id()` function can retrieve the VID of a vertex. | + | Match multiple VIDs. | `MATCH (v:player { name: 'Tim Duncan' })--(v2) WHERE id(v2) IN ["player101", "player102"] RETURN v2` | To match multiple VIDs, use `WHERE id(v) IN [vid_list]`. | + | Match connected vertices | `MATCH (v:player{name:"Tim Duncan"})--(v2) RETURN v2.name AS Name` | You can use the `--` symbol to represent edges of both directions and match vertices connected by these edges. You can add a `>` or `<` to the `--` symbol to specify the direction of an edge. | + | Match paths | `MATCH p=(v:player{name:"Tim Duncan"})-->(v2) RETURN p` | Connected vertices and edges form a path. You can use a user-defined variable to name a path as follows. | + | Match edges | `MATCH (v:player{name:"Tim Duncan"})-[e]-(v2) RETURN e` | Besides using `--`, `-->`, or `<--` to indicate a nameless edge, you can use a user-defined variable in a pair of square brackets to represent a named edge. For example: `-[e]-`. | + | Match an edge type | `MATCH ()-[e:follow]-() RETURN e` |Just like vertices, you can specify an edge type with `:` in a pattern. For example: `-[e:follow]-`. | + | Match edge type properties | ` MATCH (v:player{name:"Tim Duncan"})-[e:follow{degree:95}]->(v2) RETURN e` | You can specify edge type properties with `{: }` in a pattern. For example: `[e:follow{likeness:95}]`. | + | Match multiple edge types | `MATCH (v:player{name:"Tim Duncan"})-[e:follow \| :serve]->(v2) RETURN e` | The `|` symbol can help matching multiple edge types. For example: `[e:follow|:serve]`. The English colon (:) before the first edge type cannot be omitted, but the English colon before the subsequent edge type can be omitted, such as `[e:follow|serve]`. | + | Match multiple edges | `MATCH (v:player{name:"Tim Duncan"})-[]->(v2)<-[e:serve]-(v3) RETURN v2, v3` | You can extend a pattern to match multiple edges in a path. | + | Match fixed-length paths | `MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*2]->(v2) RETURN DISTINCT v2 AS Friends` | You can use the `:*` pattern to match a fixed-length path. `hop` must be a non-negative integer. | + | Match variable-length paths | `MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) RETURN v2 AS Friends` | `minHop`: Optional. It represents the minimum length of the path. `minHop`: must be a non-negative integer. The default value is 1.
`maxHop`: Required. It represents the maximum length of the path. `maxHop` must be a non-negative integer. It has no default value. | + | Match variable-length paths with multiple edge types | `MATCH p=(v:player{name:"Tim Duncan"})-[e:follow \| serve*2]->(v2) RETURN DISTINCT v2` | You can specify multiple edge types in a fixed-length or variable-length pattern. In this case, `hop`, `minHop`, and `maxHop` take effect on all edge types. | + | Retrieve vertex or edge information | `MATCH (v:player{name:"Tim Duncan"}) RETURN v`
`MATCH (v:player{name:"Tim Duncan"})-[e]->(v2) RETURN e` | Use `RETURN { | }` to retrieve all the information of a vertex or an edge. | + | Retrieve VIDs | `MATCH (v:player{name:"Tim Duncan"}) RETURN id(v)` | Use the `id()` function to retrieve VIDs. | + | Retrieve tags | `MATCH (v:player{name:"Tim Duncan"}) RETURN labels(v)` | Use the `labels()` function to retrieve the list of tags on a vertex.
To retrieve the nth element in the `labels(v)` list, use `labels(v)[n-1]`. | + | Retrieve a single property on a vertex or an edge | `MATCH (v:player{name:"Tim Duncan"}) RETURN v.age` | Use `RETURN { | }.` to retrieve a single property.
Use `AS` to specify an alias for a property. | + | Retrieve all properties on a vertex or an edge | `MATCH p=(v:player{name:"Tim Duncan"})-[]->(v2) RETURN properties(v2)` | Use the `properties()` function to retrieve all properties on a vertex or an edge. | + | Retrieve edge types | `MATCH p=(v:player{name:"Tim Duncan"})-[e]->() RETURN DISTINCT type(e)` | Use the `type()` function to retrieve the matched edge types. | + | Retrieve paths | `MATCH p=(v:player{name:"Tim Duncan"})-[*3]->() RETURN p` | Use `RETURN ` to retrieve all the information of the matched paths. | + | Retrieve vertices in a path | `MATCH p=(v:player{name:"Tim Duncan"})-[]->(v2) RETURN nodes(p)` | Use the `nodes()` function to retrieve all vertices in a path. | + | Retrieve edges in a path | `MATCH p=(v:player{name:"Tim Duncan"})-[]->(v2) RETURN relationships(p)` | Use the `relationships()` function to retrieve all edges in a path. | + | Retrieve path length | `MATCH p=(v:player{name:"Tim Duncan">})-[*..2]->(v2) RETURN p AS Paths, length(p) AS Length` | Use the `length()` function to retrieve the length of a path. | + + + +* [LOOKUP](../3.ngql-guide/7.general-query-statements/5.lookup.md) + + ``` + LOOKUP ON { | } + [WHERE [AND ...]] + [YIELD [AS ]] + ``` + + | Pattern | Example | Description | + | ------------------- | ------------------------------------------------------------ | ---------------------------------------------- | + | Retrieve vertices | `LOOKUP ON player WHERE player.name == "Tony Parker" YIELD player.name AS name, player.age AS age` | The following example returns vertices whose `name` is `Tony Parker` and the tag is `player`. | + | Retrieve edges | `LOOKUP ON follow WHERE follow.degree == 90 YIELD follow.degree` | Returns edges whose `degree` is `90` and the edge type is `follow`. | + | List vertices with a tag | `LOOKUP ON player` | Shows how to retrieve the VID of all vertices tagged with `player`. | + | List edges with an edge types | `LOOKUP ON like` | Shows how to retrieve the source Vertex IDs, destination vertex IDs, and ranks of all edges of the `like` edge type. | + | Count the numbers of vertices or edges | `LOOKUP ON player \| YIELD COUNT(*) AS Player_Number` | Shows how to count the number of vertices tagged with `player`. | + | Count the numbers of edges | `LOOKUP ON like \| YIELD COUNT(*) AS Like_Number` | Shows how to count the number of edges of the `like` edge type. | + + + +* [GO](../3.ngql-guide/7.general-query-statements/3.go.md) + + ``` + GO [[ TO] STEPS ] FROM + OVER [{REVERSELY | BIDIRECT}] + [ WHERE ] + [YIELD [DISTINCT] ] + [| GROUP BY {col_name | expr | position} YIELD ] + [| ORDER BY [{ASC | DESC}]] + [| LIMIT [,] ] + ``` + + | Example | Description | + | ------------------------------------------------------------ | ------------------------------------------------------- | + | `GO FROM "player102" OVER serve` | Returns the teams that player 102 serves. | + | `GO 2 STEPS FROM "player102" OVER follow` | Returns the friends of player 102 with 2 hops. | + | `GO FROM "player100", "player102" OVER serve WHERE properties(edge).start_year > 1995 YIELD DISTINCT properties($$).name AS team_name, properties(edge).start_year AS start_year, properties($^).name AS player_name` | Adds a filter for the traversal. | + | `GO FROM "player100" OVER follow, serve YIELD properties(edge).degree, properties(edge).start_year` | The following example traverses along with multiple edge types. If there is no value for a property, the output is `UNKNOWN_PROP`. | + | `GO FROM "player100" OVER follow REVERSELY YIELD src(edge) AS destination` | The following example returns the neighbor vertices in the incoming direction of player 100. | + | `GO FROM "player100" OVER follow REVERSELY YIELD src(edge) AS id \| GO FROM $-.id OVER serve WHERE properties($^).age > 20 YIELD properties($^).name AS FriendOf, properties($$).name AS Team` | The following example retrieves the friends of player 100 and the teams that they serve. | + | `GO FROM "player102" OVER follow YIELD dst(edge) AS both` | The following example returns all the neighbor vertices of player 102. | + | `GO 2 STEPS FROM "player100" OVER follow YIELD src(edge) AS src, dst(edge) AS dst, properties($$).age AS age \| GROUP BY $-.dst YIELD $-.dst AS dst, collect_set($-.src) AS src, collect($-.age) AS age` | The following example the outputs according to age. | + + + +* [FETCH](../3.ngql-guide/7.general-query-statements/4.fetch.md) + + ``` + FETCH PROP ON {[, tag_name ...] | *} + [, vid ...] + [YIELD [AS ]] + ``` + + | Example | Description | + | ------------------------------------------------------------ | ------------------------------------------------------------ | + | `FETCH PROP ON player "player100"` | Specify a tag in the `FETCH` statement to fetch the vertex properties by that tag. | + | `FETCH PROP ON player "player100" YIELD player.name AS name` | Use a `YIELD` clause to specify the properties to be returned. | + | `FETCH PROP ON player "player101", "player102", "player103"` | Specify multiple VIDs (vertex IDs) to fetch properties of multiple vertices. Separate the VIDs with commas. | + | `FETCH PROP ON player, t1 "player100", "player103"` | Specify multiple tags in the `FETCH` statement to fetch the vertex properties by the tags. Separate the tags with commas. | + | `FETCH PROP ON * "player100", "player106", "team200"` | Set an asterisk symbol `*` to fetch properties by all tags in the current graph space. | + | `FETCH PROP ON serve "player102" -> "player106" YIELD dst(edge)` | Syntax: `FETCH PROP ON -> [@] [, -> ...] [YIELD ]` | + | `FETCH PROP ON serve "player100" -> "team204"` | The following statement fetches all the properties of the `serve` edge that connects vertex `"player100"` and vertex `"team204"`. | + | `FETCH PROP ON serve "player100" -> "team204" YIELD serve.start_year` | Use a `YIELD` clause to fetch specific properties of an edge. | + | `FETCH PROP ON serve "player100" -> "team204", "player133" -> "team202"` | Specify multiple edge patterns (` -> [@]`) to fetch properties of multiple edges. Separate the edge patterns with commas. | + | `FETCH PROP ON serve "player100" -> "team204"@1` | To fetch on an edge whose rank is not 0, set its rank in the FETCH statement. | + | `GO FROM "player101" OVER follow YIELD follow._src AS s, follow._dst AS d \| FETCH PROP ON follow $-.s -> $-.d YIELD follow.degree` | The following statement returns the `degree` values of the `follow` edges that start from vertex `"player101"`. | + | `$var = GO FROM "player101" OVER follow YIELD follow._src AS s, follow._dst AS d; FETCH PROP ON follow $var.s -> $var.d YIELD follow.degree` | You can use user-defined variables to construct similar queries. | + + + +* [UNWIND](../3.ngql-guide/7.general-query-statements/7.unwind.md) + + ``` + UNWIND AS + ``` + + | Example | Description | + | ------------------------------------------------------------ | ------------------------------------------------------------ | + | `UNWIND [1,2,3] AS n RETURN n` | The following example splits the list `[1,2,3]` into three rows. | + | `WITH [1,1,2,2,3,3] AS n UNWIND n AS r WITH DISTINCT r AS r ORDER BY r RETURN collect(r)` | 1. Splits the list `[1,1,2,2,3,3]` into rows. 2. Removes duplicated rows. 3. Sorts the rows. 4. Transforms the rows to a list. | + | `MATCH p=(v:player{name:"Tim Duncan"})--(v2) WITH nodes(p) AS n UNWIND n AS r WITH DISTINCT r AS r RETURN collect(r)` | 1. Outputs the vertices on the matched path into a list. 2. Splits the list into rows. 3. Removes duplicated rows. 4. Transforms the rows to a list. | + + + +* SHOW + + | Statement | Syntax | Example | Description | + | ------------------------------------------------------------ | ------------------------------------------------- | ------------------------------------ | -------------------------------------------------------- | + | [SHOW CHARSET](../3.ngql-guide/7.general-query-statements/6.show/1.show-charset.md) | `SHOW CHARSET` | `SHOW CHARSET` | Shows the available character sets. | + | [SHOW COLLATION](../3.ngql-guide/7.general-query-statements/6.show/2.show-collation.md) | `SHOW COLLATION` | `SHOW COLLATION` | Shows the collations supported by Nebula Graph. | + | [SHOW CREATE SPACE](../3.ngql-guide/7.general-query-statements/6.show/4.show-create-space.md) | `SHOW CREATE SPACE ` | `SHOW CREATE SPACE basketballplayer` | Shows the creating statement of the specified graph space. | + | [SHOW CREATE TAG/EDGE](../3.ngql-guide/7.general-query-statements/6.show/5.show-create-tags-edges.md) | `SHOW CREATE {TAG \| EDGE }` | `SHOW CREATE TAG player` | Shows the basic information of the specified tag. | + | [SHOW HOSTS](../3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md) | `SHOW HOSTS [GRAPH \| STORAGE \| META]` | `SHOW HOSTS`
`SHOW HOSTS GRAPH` | Shows the host and version information of Graph Service, Storage Service, and Meta Service. | + | [SHOW INDEX STATUS](../3.ngql-guide/7.general-query-statements/6.show/7.show-index-status.md) | `SHOW {TAG \| EDGE} INDEX STATUS` | `SHOW TAG INDEX STATUS` | Shows the status of jobs that rebuild native indexes, which helps check whether a native index is successfully rebuilt or not. | + | [SHOW INDEXES](../3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md) | `SHOW {TAG \| EDGE} INDEXES` | `SHOW TAG INDEXES` | Shows the names of existing native indexes. | + | [SHOW PARTS](../3.ngql-guide/7.general-query-statements/6.show/9.show-parts.md) | `SHOW PARTS []` | `SHOW PARTS` | Shows the information of a specified partition or all partitions in a graph space. | + | [SHOW ROLES](../3.ngql-guide/7.general-query-statements/6.show/10.show-roles.md) | `SHOW ROLES IN ` | `SHOW ROLES in basketballplayer` | Shows the roles that are assigned to a user account. | + | [SHOW SNAPSHOTS](../3.ngql-guide/7.general-query-statements/6.show/11.show-snapshots.md) | `SHOW SNAPSHOTS` | `SHOW SNAPSHOTS` | Shows the information of all the snapshots. + | [SHOW SPACES](../3.ngql-guide/7.general-query-statements/6.show/12.show-spaces.md) | `SHOW SPACES` | `SHOW SPACES` | Shows existing graph spaces in Nebula Graph. | + | [SHOW STATS](../3.ngql-guide/7.general-query-statements/6.show/14.show-stats.md) | `SHOW STATS` | `SHOW STATS` | Shows the statistics of the graph space collected by the latest `STATS` job. | + | [SHOW TAGS/EDGES](../3.ngql-guide/7.general-query-statements/6.show/15.show-tags-edges.md) | `SHOW TAGS \| EDGES` | `SHOW TAGS`、`SHOW EDGES` | Shows all the tags in the current graph space. | + | [SHOW USERS](../3.ngql-guide/7.general-query-statements/6.show/16.show-users.md) | `SHOW USERS` | `SHOW USERS` | Shows the user information. | + | [SHOW SESSIONS](../3.ngql-guide/7.general-query-statements/6.show/17.show-sessions.md) | `SHOW SESSIONS ` | ` SHOW SESSIONS` | Shows the information of all the sessions. | + | [SHOW SESSIONS](../3.ngql-guide/7.general-query-statements/6.show/17.show-sessions.md) | `SHOW SESSION ` | `SHOW SESSION 1623304491050858` | Shows a specified session with its ID. | + | [SHOW QUERIES](../3.ngql-guide/7.general-query-statements/6.show/18.show-queries.md) | `SHOW [ALL] QUERIES` | `SHOW QUERIES` | Shows the information of working queries in the current session. | + | [SHOW META LEADER](../3.ngql-guide/7.general-query-statements/6.show/19.show-meta-leader.md) | `SHOW META LEADER` | `SHOW META LEADER` | Shows the information of the leader in the current Meta cluster. | + + + +## Clauses and options + +| Clause | Syntax | Example | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| [GROUP BY](../3.ngql-guide/8.clauses-and-options/group-by.md) | ` GROUP BY YIELD , ` | `GO FROM "player100" OVER follow BIDIRECT YIELD $$.player.name as Name \| GROUP BY $-.Name YIELD $-.Name as Player, count(*) AS Name_Count` | Finds all the vertices connected directly to vertex `"player100"`, groups the result set by player names, and counts how many times the name shows up in the result set. | +| [LIMIT](../3.ngql-guide/8.clauses-and-options/limit.md) | `YIELD [\| LIMIT [,] ]` | `O FROM "player100" OVER follow REVERSELY YIELD $$.player.name AS Friend, $$.player.age AS Age \| ORDER BY $-.Age, $-.Friend \| LIMIT 1, 3` | Returns the 3 rows of data starting from the second row of the sorted output. | +| [SKIP](../3.ngql-guide/8.clauses-and-options/limit.md) | `RETURN [SKIP ] [LIMIT ]` | `MATCH (v:player{name:"Tim Duncan"}) --> (v2) RETURN v2.name AS Name, v2.age AS Age ORDER BY Age DESC SKIP 1` | `SKIP` can be used alone to set the offset and return the data after the specified position. | +| [ORDER BY](../3.ngql-guide/8.clauses-and-options/order-by.md) | ` ORDER BY [ASC \| DESC] [, [ASC \| DESC] ...]` | `FETCH PROP ON player "player100", "player101", "player102", "player103" YIELD player.age AS age, player.name AS name \| ORDER BY $-.age ASC, $-.name DESC` | The `ORDER BY` clause specifies the order of the rows in the output. | +| [RETURN](../3.ngql-guide/8.clauses-and-options/return.md) | `RETURN {\|\|.\|.\|...}` | `MATCH (v:player) RETURN v.name, v.age LIMIT 3` | Returns the first three rows with values of the vertex properties `name` and `age`. | +| [TTL](../3.ngql-guide/8.clauses-and-options/ttl-options.md) | ``CREATE TAG ( , , ...) ttl_duration= , ttl_col = `` | `CREATE TAG t2(a int, b int, c string) ttl_duration= 100, ttl_col = "a"` | Create a tag and set the TTL options. | +| [WHERE](../3.ngql-guide/8.clauses-and-options/where.md) | `WHERE {. {>\|==\|<\|...} ...}` | `MATCH (v:player) WHERE v.name == "Tim Duncan" XOR (v.age < 30 AND v.name == "Yao Ming") OR NOT (v.name == "Yao Ming" OR v.name == "Tim Duncan") RETURN v.name, v.age` | The `WHERE` clause filters the output by conditions. The `WHERE` clause usually works in Native nGQL `GO` and `LOOKUP` statements, and OpenCypher `MATCH` and `WITH` statements. | +| [YIELD](../3.ngql-guide/8.clauses-and-options/yield.md) | `YIELD [DISTINCT] [AS ] [, [AS ] ...] [WHERE ];` | `GO FROM "player100" OVER follow YIELD dst(edge) AS ID \| FETCH PROP ON player $-.ID YIELD player.age AS Age \| YIELD AVG($-.Age) as Avg_age, count(*)as Num_friends` | Finds the players that "player100" follows and calculates their average age. | +| [WITH](../3.ngql-guide/8.clauses-and-options/with.md) | `MATCH $expressions WITH {nodes()\|labels()\|...}` | `MATCH p=(v:player{name:"Tim Duncan"})--() WITH nodes(p) AS n UNWIND n AS n1 RETURN DISTINCT n1` | The `WITH` clause can retrieve the output from a query part, process it, and pass it to the next query part as the input. | + + + +## Space statements + +| Statement | Syntax | Example | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ----------------------------------------------------- | ------------------------------------------------------------ | +| [CREATE SPACE](../3.ngql-guide/9.space-statements/1.create-space.md) | `CREATE SPACE [IF NOT EXISTS] ( [partition_num = ,] [replica_factor = ,] vid_type = {FIXED_STRING()\| INT[64]} ) [COMMENT = '']` | `CREATE SPACE my_space_1 (vid_type=FIXED_STRING(30))` | Creates a graph space with | +| [CREATE SPACE](../3.ngql-guide/9.space-statements/1.create-space.md) | `CREATE SPACE AS ` | `CREATE SPACE my_space_4 as my_space_3` | Clone a graph space. | +| [USE](../3.ngql-guide/9.space-statements/2.use-space.md) | `USE ` | `USE space1` | Specifies a graph space as the current working graph space for subsequent queries. | +| [SHOW SPACES](../3.ngql-guide/9.space-statements/3.show-spaces.md) | `SHOW SPACES` | `SHOW SPACES` | Lists all the graph spaces in the Nebula Graph examples. | +| [DESCRIBE SPACE](../3.ngql-guide/9.space-statements/4.describe-space.md) | `DESC[RIBE] SPACE ` | `DESCRIBE SPACE basketballplayer` | Returns the information about the specified graph space.息。 | +| [DROP SPACE](../3.ngql-guide/9.space-statements/5.drop-space.md) | `DROP SPACE [IF EXISTS] ` | `DROP SPACE basketballplayer` | Deletes everything in the specified graph space. | + + + +## TAG statements + +| Statement | Syntax | Example | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| [CREATE TAG](../3.ngql-guide/10.tag-statements/1.create-tag.md) | `CREATE TAG [IF NOT EXISTS] ( [NULL \| NOT NULL] [DEFAULT ] [COMMENT ''] [{, [NULL \| NOT NULL] [DEFAULT ] [COMMENT '']} ...] ) [TTL_DURATION = ] [TTL_COL = ] [COMMENT = ''] ` | `CREATE TAG woman(name string, age int, married bool, salary double, create_time timestamp) TTL_DURATION = 100, TTL_COL = "create_time"` | Creates a tag with the given name in a graph space. | +| [DROP TAG](../3.ngql-guide/10.tag-statements/2.drop-tag.md) | `DROP TAG [IF EXISTS] ` | `CREATE TAG test(p1 string, p2 int)` | Drops a tag with the given name in the current working graph space. | +| [ALTER TAG](../3.ngql-guide/10.tag-statements/3.alter-tag.md) | `ALTER TAG [, alter_definition] ...] [ttl_definition [, ttl_definition] ... ] [COMMENT = '']` | `ALTER TAG t1 ADD (p3 int, p4 string)` | Alters the structure of a tag with the given name in a graph space. You can add or drop properties, and change the data type of an existing property. You can also set a [TTL](../3.ngql-guide/8.clauses-and-options/ttl-options.md(Time-To-Live)on a property, or change its TTL duration. | +| [SHOW TAGS](../3.ngql-guide/10.tag-statements/4.show-tags.md) | `SHOW TAGS` | `SHOW TAGS` | Shows the name of all tags in the current graph space. | +| [DESCRIBE TAG](../3.ngql-guide/10.tag-statements/5.describe-tag.md) | `DESC[RIBE] TAG ` | `DESCRIBE TAG player` | Returns the information about a tag with the given name in a graph space, such as field names, data type, and so on. | +| [DELETE TAG](../3.ngql-guide/10.tag-statements/6.delete-tag.md) | `DELETE TAG FROM ` | `DELETE TAG test1 FROM "test"` | Deletes a tag with the given name on a specified vertex. | + + + +## Edge type statements + +| Statement | Syntax | Example | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | --------------------------------------------------- | +| [CREATE EDGE](../3.ngql-guide/11.edge-type-statements/1.create-edge.md) | `CREATE EDGE [IF NOT EXISTS] ( [NULL \| NOT NULL] [DEFAULT ] [COMMENT ''] [{, [NULL \| NOT NULL] [DEFAULT ] [COMMENT '']} ...] ) [TTL_DURATION = ] [TTL_COL = ] [COMMENT = ''] ` | `CREATE EDGE e1(p1 string, p2 int, p3 timestamp) TTL_DURATION = 100, TTL_COL = "p2"` | Creates an edge type with the given name in a graph space.type。 | +| [DROP EDGE](../3.ngql-guide/11.edge-type-statements/2.drop-edge.md) | `DROP EDGE [IF EXISTS] ` | `DROP EDGE e1` | Drops an edge type with the given name in a graph space. | +| [ALTER EDGE](../3.ngql-guide/11.edge-type-statements/3.alter-edge.md) | `ALTER EDGE [, alter_definition] ...] [ttl_definition [, ttl_definition] ... ] [COMMENT = '']` | `ALTER EDGE e1 ADD (p3 int, p4 string)` | Alters the structure of an edge type with the given name in a graph space. | +| [SHOW EDGES](../3.ngql-guide/11.edge-type-statements/4.show-edges.md) | `SHOW EDGES` | `SHOW EDGES` | Shows all edge types in the current graph space. | +| [DESCRIBE EDGE](../3.ngql-guide/11.edge-type-statements/5.describe-edge.md) | `DESC[RIBE] EDGE ` | `DESCRIBE EDGE follow` | Returns the information about an edge type with the given name in a graph space, such as field names, data type, and so on. | + + + +## Vertex statements + +| Statement | Syntax | Example | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| [INSERT VERTEX](../3.ngql-guide/12.vertex-statements/1.insert-vertex.md) | `INSERT VERTEX [IF NOT EXISTS] () [, (), ...] {VALUES \| VALUE} VID: ([, ])` | `INSERT VERTEX t2 (name, age) VALUES "13":("n3", 12), "14":("n4", 8)` | Inserts one or more vertices into a graph space in Nebula Graph. | +| [DELETE VERTEX](../3.ngql-guide/12.vertex-statements/4.delete-vertex.md) | `DELETE VERTEX [, ...]` | `DELETE VERTEX "team1"` | Deletes vertices and the related incoming and outgoing edges of the vertices. | +| [UPDATE VERTEX](../3.ngql-guide/12.vertex-statements/2.update-vertex.md) | `UPDATE VERTEX ON SET [WHEN ] [YIELD ]` | `UPDATE VERTEX ON player "player101" SET age = age + 2 ` | Updates properties on tags of a vertex. | +| [UPSERT VERTEX](../3.ngql-guide/12.vertex-statements/3.upsert-vertex.md) | `UPSERT VERTEX ON SET [WHEN ] [YIELD ]` | `UPSERT VERTEX ON player "player667" SET age = 31` | The `UPSERT` statement is a combination of `UPDATE` and `INSERT`. You can use `UPSERT VERTEX` to update the properties of a vertex if it exists or insert a new vertex if it does not exist. | + + + +## Edge statements + +| Statement | Syntax | Example | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| [INSERT EDGE](../3.ngql-guide/13.edge-statements/1.insert-edge.md) | `INSERT EDGE [IF NOT EXISTS] ( ) {VALUES \| VALUE} -> [@] : ( ) [, -> [@] : ( ), ...]` | `INSERT EDGE e2 (name, age) VALUES "11"->"13":("n1", 1)` | Inserts an edge or multiple edges into a graph space from a source vertex (given by src_vid) to a destination vertex (given by dst_vid) with a specific rank in Nebula Graph. | +| [DELETE EDGE](../3.ngql-guide/12.vertex-statements/3.upsert-vertex.md) | `DELETE EDGE -> [@] [, -> [@] ...]` | `DELETE EDGE serve "player100" -> "team204"@0` | Deletes one edge or multiple edges at a time. | +| [UPDATE EDGE](../3.ngql-guide/13.edge-statements/2.update-edge.md) | `UPDATE EDGE ON -> [@] SET [WHEN ] [YIELD ]` | `UPDATE EDGE ON serve "player100" -> "team204"@0 SET start_year = start_year + 1` | Updates properties on an edge. | +| [UPSERT EDGE](../3.ngql-guide/12.vertex-statements/3.upsert-vertex.md) | `UPSERT EDGE ON -> [@rank] SET [WHEN ] [YIELD ]` | `UPSERT EDGE on serve "player666" -> "team200"@0 SET end_year = 2021` | The `UPSERT` statement is a combination of `UPDATE` and `INSERT`. You can use `UPSERT EDGE` to update the properties of an edge if it exists or insert a new edge if it does not exist. | + + + +## Index + +* Native index + + > You can use native indexes together with `LOOKUP` and `MATCH` statements. + + | Statement | Syntax | Example | Description | + | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------- | ------------------------------------------------------------ | + | [CREATE INDEX](../3.ngql-guide/14.native-index-statements/1.create-native-index.md) | `CREATE {TAG \| EDGE} INDEX [IF NOT EXISTS] ON { \| } ([]) [COMMENT = '']` | `CREATE TAG INDEX player_index on player()` | Add native indexes for the existing tags, edge types, or properties. | + | [SHOW CREATE INDEX](../3.ngql-guide/14.native-index-statements/2.1.show-create-index.md) | `SHOW CREATE {TAG \| EDGE} INDEX ` | `show create tag index index_2` | Shows the statement used when creating a tag or an edge type. It contains detailed information about the index, such as its associated properties. | + | [SHOW INDEXES](../3.ngql-guide/14.native-index-statements/2.show-native-indexes.md) | `SHOW {TAG \| EDGE} INDEXES` | `SHOW TAG INDEXES` | Shows the defined tag or edge type indexes names in the current graph space. | + | [DESCRIBE INDEX](../3.ngql-guide/14.native-index-statements/3.describe-native-index.md) | `DESCRIBE {TAG \| EDGE} INDEX ` | `DESCRIBE TAG INDEX player_index_0` | Gets the information about the index with a given name, including the property name (Field) and the property type (Type) of the index. | + | [REBUILD INDEX](../3.ngql-guide/14.native-index-statements/4.rebuild-native-index.md) | `REBUILD {TAG \| EDGE} INDEX []` | `REBUILD TAG INDEX single_person_index` | Rebuilds the created tag or edge type index. If data is updated or inserted before the creation of the index, you must rebuild the indexes **manually** to make sure that the indexes contain the previously added data. | + | [SHOW INDEX STATUS](../3.ngql-guide/14.native-index-statements/5.show-native-index-status.md) | `SHOW {TAG \| EDGE} INDEX STATUS` | `SHOW TAG INDEX STATUS` | Returns the name of the created tag or edge type index and its status. | + | [DROP INDEX](../3.ngql-guide/14.native-index-statements/6.drop-native-index.md) | `DROP {TAG \| EDGE} INDEX [IF EXISTS] ` | `DROP TAG INDEX player_index_0` | Removes an existing index from the current graph space. | + + + +* [Full-tex index](../4.deployment-and-installation/6.deploy-text-based-index/2.deploy-es.md) + + | Syntax | Example | Description | + | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | + | `SIGN IN TEXT SERVICE [( [,, ]), (), ...]` | `SIGN IN TEXT SERVICE (127.0.0.1:9200)` | The full-text indexes is implemented based on [Elasticsearch](https://en.wikipedia.org/wiki/Elasticsearch). After deploying an Elasticsearch cluster, you can use the `SIGN IN` statement to log in to the Elasticsearch client. | + | `SHOW TEXT SEARCH CLIENTS` | `SHOW TEXT SEARCH CLIENTS` | Shows text search clients. | + | `SIGN OUT TEXT SERVICE` | `SIGN OUT TEXT SERVICE` |Signs out to the text search clients. | + | `CREATE FULLTEXT {TAG \| EDGE} INDEX ON { \| } ([])` | `CREATE FULLTEXT TAG INDEX nebula_index_1 ON player(name)` | Creates full-text indexes. | + | `SHOW FULLTEXT INDEXES` | `SHOW FULLTEXT INDEXES` | Show full-text indexes. | + | `REBUILD FULLTEXT INDEX` | `REBUILD FULLTEXT INDEX` | Rebuild full-text indexes. | + | `DROP FULLTEXT INDEX ` | `DROP FULLTEXT INDEX nebula_index_1` | Drop full-text indexes. | + | `LOOKUP ON { \| } WHERE [YIELD ]` | `LOOKUP ON player WHERE FUZZY(player.name, "Tim Dunncan", AUTO, OR) YIELD player.name` | Use query options. | + + + +## Subgraph and path statements + +| Type | Syntax | Example | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| [GET SUBGRAPH](../3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md) | `GET SUBGRAPH [WITH PROP] [ STEPS] FROM {, ...} [{IN \| OUT \| BOTH} , ...] [YIELD [VERTICES AS ] [,EDGES AS ]] ` | `GET SUBGRAPH 1 STEPS FROM "player100" YIELD VERTICES AS nodes, EDGES AS relationships` | Retrieves information of vertices and edges reachable from the source vertices of the specified edge types and returns information of the subgraph. | +| [FIND PATH](../3.ngql-guide/16.subgraph-and-path/2.find-path.md) | `FIND { SHORTEST \| ALL \| NOLOOP } PATH [WITH PROP] FROM TO
OVER [REVERSELY \| BIDIRECT] [] [UPTO STEPS] [\| ORDER BY $-.path] [\| LIMIT ]` | `FIND SHORTEST PATH FROM "player102" TO "team204" OVER *` | Finds the paths between the selected source vertices and destination vertices. A returned path is like `()-[:@]->(` | `EXPLAIN format="row" SHOW TAGS`
`EXPLAIN format="dot" SHOW TAGS` | Helps output the execution plan of an nGQL statement without executing the statement. | +| [PROFILE](../3.ngql-guide/17.query-tuning-statements/1.explain-and-profile.md) | `PROFILE [format="row" \| "dot"] ` | `PROFILE format="row" SHOW TAGS`
`EXPLAIN format="dot" SHOW TAGS` | Executes the statement, then outputs the execution plan as well as the execution profile. | + + + +## Operation and maintenance statements + +* [BALANCE](../3.ngql-guide/18.operation-and-maintenance-statements/2.balance-syntax.md) + + |Syntax|Description| + |-|-| + |`BALANCE DATA`|Starts a task to balance the distribution of storage partitions in a Nebula Graph cluster or a Group. It returns the task ID (`balance_id`). | + |`BALANCE DATA `|Shows the status of the `BALANCE DATA` task.| + |`BALANCE DATA STOP`|Stops the `BALANCE DATA` task.| + |`BALANCE DATA REMOVE `|Scales in the Nebula Graph cluster and detaches specific storage hosts.| + |`BALANCE LEADER`|Balances the distribution of storage raft leaders in a Nebula Graph cluster or a Group.| + +* [Job statements](../3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md) + + |Syntax|Description| + | -------------------- | ------------------------------------------------------------ | + | `SUBMIT JOB COMPACT` | Triggers the long-term RocksDB `compact` operation. | + | `SUBMIT JOB FLUSH` | Writes the RocksDB memfile in the memory to the hard disk. | + | `SUBMIT JOB STATS` | Starts a job that makes the statistics of the current graph space. Once this job succeeds, you can use the `SHOW STATS` statement to list the statistics. | + | `SHOW JOB ` | Shows the information about a specific job and all its tasks in the current graph space. The Meta Service parses a `SUBMIT JOB` request into multiple tasks and assigns them to the nebula-storaged processes. | + | `SHOW JOBS` | Lists all the unexpired jobs in the current graph space. | + | `STOP JOB` | Stops jobs that are not finished in the current graph space. | + | `RECOVER JOB` | Re-executes the failed jobs in the current graph space and returns the number of recovered jobs. | + +* [Kill queries](../3.ngql-guide/18.operation-and-maintenance-statements/6.kill-query.md) + + | Syntax | Example | Description | + | --------------------------------------------------- | ----------------------------------------------- | -------------------------------------------- | + | `KILL QUERY (session=, plan=)` | `KILL QUERY(SESSION=1625553545984255,PLAN=163)` | Terminates the query being executed, and is often used to terminate slow queries. | + + diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md b/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md index 07259f017f1..8c88d734278 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md @@ -62,7 +62,7 @@ The `WHERE` clause in a `LOOKUP` statement does not support the following operat - The `XOR` and `NOT` operations are not supported. -## Retrieve Vertices +## Retrieve vertices The following example returns vertices whose `name` is `Tony Parker` and the tag is `player`. @@ -127,7 +127,7 @@ nebula> LOOKUP ON player \ +---------------+------------------+----------------+--------------+ ``` -## Retrieve Edges +## Retrieve edges The following example returns edges whose `degree` is `90` and the edge type is `follow`. diff --git a/mkdocs.yml b/mkdocs.yml index ddb4f579605..9fef8178ef9 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -131,6 +131,7 @@ nav: - Step 2 Manage Nebula Graph Service: 2.quick-start/5.start-stop-service.md - Step 3 Connect to Nebula Graph: 2.quick-start/3.connect-to-nebula-graph.md - Step 4 Use nGQL (CRUD): 2.quick-start/4.nebula-graph-crud.md + - nGQL cheatsheet: 2.quick-start/6.cheatsheet-for-ngql.md - nGQL guide: - nGQL overview: