Skip to content

Commit

Permalink
Update the elementMap-step's doc of GIE (#2966)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidongze0629 committed Jul 4, 2023
1 parent cb27df4 commit bb1921e
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions docs/interactive_engine/tinkerpop/supported_gremlin_steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ g.V().constant(1)
g.V().constant("marko")
g.V().constant(1.0)
```
#### [valueMap()](https://tinkerpop.apache.org/docs/current/reference/#valuemap-step)
The valueMap()-step is meant to map the graph element to a map of the property entries according to their actual properties. If no property keys are provided, then all property values are retrieved.
Expand All @@ -307,6 +308,7 @@ g.V().valueMap()
g.V().valueMap("name")
g.V().valueMap("name", "age")
```
#### [values()](https://tinkerpop.apache.org/docs/current/reference/#values-step)
The values()-step is meant to map the graph element to the values of the associated properties given the provide property keys. Here we just allow only one property key as the argument to the `values()` to implement the step as a map instead of a flat-map, which may be a little different from the standard Gremlin.
Expand All @@ -315,6 +317,19 @@ propertyKey - the property to retrieve its value from.
```bash
g.V().values("name")
```

#### [elementMap()](https://tinkerpop.apache.org/docs/current/reference/#elementmap-step)
The elementMap()-step is meant to map the graph element to a map of T.id, T.label and the property values according to the given keys. If no property keys are provided, then all property values are retrieved.
```
Parameters: </br>
propertyKeys - the properties to retrieve.
```bash
g.V().elementMap()
g.V().elementMap("name")
g.V().elementMap("name", "age")
```
#### [select()](https://tinkerpop.apache.org/docs/current/reference/#select-step)
The select()-step is meant to map the traverser to the object specified by the selectKey or to a map projection of sideEffect values.
Expand Down Expand Up @@ -749,14 +764,6 @@ Map the current object to itself.
g.V().identity()
g.V().union(identity(), out().out())
```
#### elementMap()
Map the graph element to a map of T.id, T.label and the property values according to the given keys. If no property keys are provided, then all property values are retrieved.
Parameters: </br>
propertyKeys - the properties to retrieve.
```bash
g.V().elementMap()
```
#### path()
Map the traverser to its path history.
```bash
Expand Down

0 comments on commit bb1921e

Please sign in to comment.