graph icon indicating copy to clipboard operation
graph copied to clipboard

Practical Gremlin - An Apache TinkerPop Tutorial

Results 89 graph issues
Sort by recently updated
recently updated
newest added

The previously deprecated `Order.incr` and `Order.decr` were completely removed in TinkerPop 3.5.0. The manuscript needs to be updated to favor `Order.asc` and `Order.desc` and the note about the deprecation needs...

consistency
Fixed
improvements
important
v283

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...

New Gremlin features
improvements
additional examples
fix-in-second-edition

This seemingly simple task cannot be done using a `has` step and users get confused when trying to do something like this: ``` gremlin> g.addV('test').property('a',5).property('b',10) ==>v[53770] gremlin> g.V().hasLabel('test').as('x').where(gt('x')).by('b').by('a') ==>v[53767] ```...

improvements
additional-examples
fix-in-second-edition

Gremlin does not have a `reverse` step but a list can be reversed using the `index` step couples with `order` and `tail` It is possible to do this today using...

Fixed
additional-examples
v283

The book currently has examples of vertex cloning but does not have any examples of how to merge two vertices and re-map their edges.

enhancement
additional examples
fix-in-second-edition

Add an example where a value found in one vertex is used to do `startingWith` searches across other vertices. ``` gremlin> g.addV('key').property('prefix','Dal') ==>v[60873] gremlin> g.V().hasLabel('key').as('a').V().hasLabel('airport').where(startingWith('a')).by('city').by('prefix'). values('city') ==>Dallas ==>Dallas ==>Dalaman ==>Dalian...

improvements
additional-examples
fix-in-second-edition

For the example shown here: https://kelvinlawrence.net/book/Gremlin-Graph-Guide.html#upsert This would be simpler if written as below since the same property value is being set. ``` g.V(3).fold(). coalesce(unfold(), addV('airport')).property('runways',3) ``` It would also...

improvements

Should add an example that shows that this is possible ``` gremlin> g.V(0,3).project('city').by(coalesce(values('city'),constant('not found'))) ==>[city:not found] ==>[city:Austin] ```

improvements
additional examples

Since the data set was first created several cities have been added that have a name longer than the 20 characters allowed by the VARCHAR(20) in the airports table. Sqlite3...

corrections
Fixed
v283

Add an example near section 4.16 showing how to merge two valueMap results For example ``` gremlin> g.V(3,4).valueMap().unfold().group().by(keys).by(select(values).unfold().fold()) ==>[country:[US,US],code:[AUS,BNA],longest:[12250,11030],city:[Austin,Nashville],elev:[542,599],icao:[KAUS,KBNA],lon:[ -97.6698989868164,-86.6781997680664],type:[airport,airport],region:[US-TX,US-TN],runways:[2,4],lat:[30.1944999694824,3 6.1245002746582],desc:[Austin Bergstrom International Airport,Nashville International Airport]] ```

additional examples