Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.5.2
-
None
-
None
Description
If you want to maintain a collection of things in a sack you can use addAll to combine lists/maps:
gremlin> g.V(3).valueMap('city').sack(assign).by(fold()).V(4).sack(addAll).by(fold()).sack()
==>[[city:[Austin]],v[4]]
It would be nice to be able to do that without having to manually by(fold()) and simply assume that if an object is not a collection it is meant to go into one by virtual of using addAll. Or perhaps addAll should be reserved for combining collections and we should have a add operator that will add to a collection. There are multiple ways it could probably be done.