From bb1921eca44307c95498c2a75c1ac7b0577271d9 Mon Sep 17 00:00:00 2001 From: Dongze Li Date: Tue, 4 Jul 2023 10:33:26 +0800 Subject: [PATCH] Update the elementMap-step's doc of GIE (#2966) --- .../tinkerpop/supported_gremlin_steps.md | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/interactive_engine/tinkerpop/supported_gremlin_steps.md b/docs/interactive_engine/tinkerpop/supported_gremlin_steps.md index 3066040e1af4..c32f41256a6c 100644 --- a/docs/interactive_engine/tinkerpop/supported_gremlin_steps.md +++ b/docs/interactive_engine/tinkerpop/supported_gremlin_steps.md @@ -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. @@ -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. @@ -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:
+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. @@ -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:
-propertyKeys - the properties to retrieve. -```bash -g.V().elementMap() -``` #### path() Map the traverser to its path history. ```bash