krlawrence / graph

Practical Gremlin - An Apache TinkerPop Tutorial
Apache License 2.0
836 stars 253 forks source link

Discuss null improvements and add example of project() on valueMap() #171

Open krlawrence opened 4 years ago

krlawrence commented 4 years ago

Discuss the fact that a null value can now flow through a traversal which alleviates the need to often do coalesce(x, constant(0)) type tricks.

gremlin> g.V('3').project('x').by('IDoNotExist')
==>[x:null]

Also add one or more examples along the following lines: (added in TP 3.4.5)

gremlin> g.V(0,1,2).valueMap().project('x').by('runways')
==>[x:null]
==>[x:[5]]
==>[x:[3]]