Skip to content

Commit

Permalink
add schema function (#968)
Browse files Browse the repository at this point in the history
* add schema function

* Update 4.schema.md
  • Loading branch information
cooper-lzy authored Dec 7, 2021
1 parent 401fa37 commit da846cd
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docs-2.0/3.ngql-guide/6.functions-and-expressions/4.schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,24 @@ Nebula Graph supports the following schema functions.
- The following functions are available in both the WHERE and YIELD clauses in GO statements.
- The following functions are only available in the YIELD clauses in LOOKUP and YIELD statements.

| Function | Description |
|------------------------+---------------------------------------------------------------------------------------------------------|
| 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. |
| int rank(edge) | Returns the rank value of an edge. |
|vertex | Returns the information of vertices, including VIDs, tags, properties, and values.|
|edge | Returns the information of edges, including edge types, source vertices, destination vertices, ranks, properties, and values.|
|vertices | Returns the information of vertices in a subgraph. For more information, see [GET SUBGRAPH](../16.subgraph-and-path/1.get-subgraph.md)|
|edges | Returns the information of edges in a subgraph. For more information, see [GET SUBGRAPH](../16.subgraph-and-path/1.get-subgraph.md)|
|path | Returns the information of a path. For more information, see [FIND PATH](../16.subgraph-and-path/2.find-path.md)|

!!! note

Since vertex, edge, vertices, edges, and path are keywords, you need to use `AS <alias>` to set the alias, such as `GO FROM "player100" OVER follow YIELD edge AS e;`.

## For statements compatible with openCypher

Expand Down

0 comments on commit da846cd

Please sign in to comment.