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

Created topic: Nebula Graph CRUD #163

Merged
merged 11 commits into from
Oct 27, 2020
28 changes: 14 additions & 14 deletions docs_2.0/manual_EN/3.quick-start/4.nebua-graph-crud.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ From the **Status** column of the table in the return message, you can see that
### nGQL syntax

```nGQL
CREATE {TAG | EDGE} {<tag_name> | <edge_type>}(<property_name_1> <data_type>
[, <property_name_2> <data_type> ...]);
CREATE {TAG | EDGE} {<tag_name> | <edge_type>}(<property_name> <data_type>
[, <property_name> <data_type> ...]);
```

### Examples
Expand Down Expand Up @@ -167,20 +167,20 @@ You can use the `INSERT` statement to insert vertices or edges based on existing
* Insert vertices:

```nGQL
INSERT VERTEX <tag> (<property_name_1>[, <property_name_2>...])
[, <tag> (<property_name_3>[, <property_name_4>...]), ...]
{VALUES | VALUE} <vid>: (<property_value_1>[, <property_value_2>...])
[, <vid>: (<property_value_3>[, <property_value_4>...];
INSERT VERTEX <tag> (<property_name>[, <property_name>...])
[, <tag> (<property_name>[, <property_name>...]), ...]
{VALUES | VALUE} <vid>: (<property_value>[, <property_value>...])
[, <vid>: (<property_value>[, <property_value>...];
```

`VID` is short for vertex ID. It must be a unique string value in a graph space.

* Insert edges:

```nGQL
INSERT EDGE <edge type> (<property_name_1>[, <property_name_2>...])
{VALUES | VALUE} <source_vid> -> <destination_vid>[@<rank>] : (<property_value_1>[, <property_value_2>...])
[, <source_vid> -> <destination_vid>[@<rank> : (<property_name_1>[, <property_name_2>...]), ...]
INSERT EDGE <edge type> (<property_name>[, <property_name>...])
{VALUES | VALUE} <src_vid> -> <dst_vid>[@<rank>] : (<property_value>[, <property_value>...])
[, <src_vid> -> <dst_vid>[@<rank> : (<property_name>[, <property_name>...]), ...]
```

### Examples
Expand Down Expand Up @@ -264,8 +264,8 @@ You can use the statements [GO](TODO) [TODO], [FETCH](TODO) [TODO], and [LOOKUP]
* Fetch properties on edges:

```nGQL
FETCH PROP ON <edge_type> <source_vid> -> <target_vid>[@<rank>]
[, <source_vid> -> <target_vid> ...]
FETCH PROP ON <edge_type> <src_vid> -> <dst_vid>[@<rank>]
[, <src_vid> -> <dst_vid> ...]
[YIELD [DISTINCT] <return_list>]
```

Expand Down Expand Up @@ -311,7 +311,7 @@ You can use the statements [GO](TODO) [TODO], [FETCH](TODO) [TODO], and [LOOKUP]
|`$$`|Represents the target vertex.|
|`\`|A line-breaker.|

* Use `GO`: Search for the team served by the players who are followed by the player with VID player100. We can use a pipe or a temporary variable in the statement to combine queries.
* Use `GO`: Search for the team served by the players who are followed by the player with VID "player100". We can use a pipe or a temporary variable in the statement to combine queries.

* With a pipe:

Expand Down Expand Up @@ -462,8 +462,8 @@ DELETE VERTEX <vid1>[, <vid2>...]
* Delete edges:

```nGQL
DELETE EDGE <edge_type> <source_vid> -> <destination_vid>[@<rank>]
[, <source_vid> -> <destination_vid>...]
DELETE EDGE <edge_type> <src_vid> -> <dst_vid>[@<rank>]
[, <src_vid> -> <dst_vid>...]
```

### Examples
Expand Down