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

add schema function #968

Merged
merged 2 commits into from
Dec 7, 2021
Merged
Changes from 1 commit
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
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)。|
cooper-lzy marked this conversation as resolved.
Show resolved Hide resolved

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