← Back

Post Thread

TinkerGQL: Mixing declarative GQL with imperative Gremlin.

Pure Gremlin:

g.V().has('airport', 'code', 'YVR').
repeat(out('route').simplePath()).
emit(loops().is(gte(2))).
times(4).
groupcount().by('code').
order(local).by(values, desc).
limit(local, 10)


Gremlin with TinkerGQL

g.match("MATCH (a:airport {code: 'YVR'})-[: route]->{2,4} (b:airport)").
select('b').
groupCount().by('code'),
order(local).by(values, desc).
limit(local, 10)

The walk became a pattern. The computation stayed in Gremlin.

https://www.youtube.com/watch?v=VR91c8IBSQI
youtube.com

- YouTube

Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.

0 Replies
0 Reposts