[
https://issues.apache.org/jira/browse/TINKERPOP-2284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stephen mallette closed TINKERPOP-2284.
---------------------------------------
Fix Version/s: 3.4.4
3.5.0
Assignee: stephen mallette
Resolution: Done
> Make it easier to return more structure of graph elements
> ---------------------------------------------------------
>
> Key: TINKERPOP-2284
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2284
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.3.8
> Reporter: stephen mallette
> Assignee: stephen mallette
> Priority: Major
> Fix For: 3.5.0, 3.4.4
>
>
> There are times where you want the structural elements of an {{Edge}} beyond
> {{id}} and {{label}} when you {{valueMap(true)}}, which forces something like:
> {code}
> gremlin> g.E(12).union(valueMap(true),
> ......1> project('inV','outV','inVLabel','outVLabel').
> ......2> by(inV().id()).
> ......3> by(outV().id()).
> ......4> by(inV().label()).
> ......5> by(outV().label())).unfold().
> ......6> group().
> ......7> by(keys).
> ......8> by(select(values))
> ==>[inV:3,id:12,inVLabel:software,weight:0.2,outVLabel:person,label:created,outV:6]
> {code}
> We could continue to overload {{valueMap()}} and do stuff like
> {{with(adjacents)}} or other such things, but perhaps we should just leave
> that step alone since it is so widely used. Maybe we just need a new step?
> How about {{elementMap()}} which preserves the structure of any graph
> element, meaning:
> * {{Vertex}} - include {{id}} and {{label}} plus properties as single
> cardinality - multiproperties could be included using {{with()}}??)
> * {{Edge}} - include {{id}}, {{label}}, {{inVId}}, {{outVId}}, {{outVLabel}},
> {{inVLabel}} (basically full reference elements for vertices plus properties
> * {{VertexProperty}} - include {{id}} and {{label}} plus properties
> If we had a step like that then the above would become:
> {code}
> g.E(12).elementMap()
> {code}
> other ways?
> I think the key thing here is that prior to "reference elements" users relied
> on the full {{Vertex}} or {{Edge}} to get all data and given that we don't
> have that anymore we need a way to allow users to easily convert the entire
> structure of a graph element to its {{Map}} counterpart.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)