You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2019/09/10 11:22:51 UTC

[GitHub] [tinkerpop] jorgebay commented on a change in pull request #1189: TINKERPOP-2284 Added elementMap() step

jorgebay commented on a change in pull request #1189: TINKERPOP-2284 Added elementMap() step
URL: https://github.com/apache/tinkerpop/pull/1189#discussion_r322684031
 
 

 ##########
 File path: docs/src/reference/the-traversal.asciidoc
 ##########
 @@ -829,6 +829,37 @@ g.V()
 
 * link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#drop--++[`drop()`]
 
+[[elementmap-step]]
+=== ElementMap Step
+
+The `elementMap()`-step yields a `Map` representation of the structure of an element.
+
+[gremlin-groovy,modern]
+----
+g.V().elementMap()
+g.V().elementMap('age')
+g.V().elementMap('age','blah')
+g.E().elementMap()
+----
+
+It is important to note that the map of a vertex assumes that cardinality for each key is `single` and if it is `list`
+then only the first item encountered will be returned. As `single` is the more common cardinality for properties this
 
 Review comment:
   Good call!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services