Skip to content

Commit

Permalink
All-properties-shall-have-tags- (#1892)
Browse files Browse the repository at this point in the history
  • Loading branch information
abby-cyber authored Feb 3, 2023
1 parent fa265bc commit 445e29f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions docs-2.0/3.ngql-guide/1.nGQL-overview/3.graph-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,18 @@ Patterns can also describe a vertex that has multiple tags. For example:

Vertices and edges are the fundamental elements in a graph. In nGQL, properties are added to them for richer models.

In the patterns, the properties can be expressed as follows: some key-value pairs are enclosed in curly brackets and separated by commas. For example, a vertex with two properties will be like:
In the patterns, the properties can be expressed as follows: some key-value pairs are enclosed in curly brackets and separated by commas, and the tag or edge type to which a property belongs must be specified.

For example, a vertex with two properties will be like:

```ngql
(a {name: 'Andres', sport: 'Brazilian Ju-Jitsu'})
(a:player{name: "Tim Duncan", age: 42})
```

One of the edges that connect to this vertex can be like:

```ngql
(a)-[{blocked: false}]->(b)
(a)-[e:follow{degree: 95}]->(b)
```

## Patterns for edges
Expand Down
4 changes: 2 additions & 2 deletions docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ nebula> MATCH (v:player) \
In openCypher 9, `=` is the equality operator. However, in nGQL, `==` is the equality operator and `=` is the assignment operator (as in C++ or Java).


You also use properties without specifying a tag to get vertices directly. For example, to get all the vertices with the vertex property value Tim Duncan.
Use the `WHERE` clause to directly get all the vertices with the vertex property value Tim Duncan.

```ngql
nebula> MATCH (v) \
Expand Down Expand Up @@ -414,7 +414,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-[e:follow{degree:95}]->(v2) \
```


You also use properties without specifying an edge type to get edges directly. For example, to get all the edges with the edge property value 90.
Use the `WHERE` clause to directly get all the edges with the edge property value 90.

```ngql
nebula> MATCH ()-[e]->() \
Expand Down

0 comments on commit 445e29f

Please sign in to comment.