bmeg / grip

Graph Integration Platform
https://bmeg.github.io/grip
MIT License
24 stars 8 forks source link

Feature: Adding jump based repeat pattern to GripQL [WIP] #269

Closed kellrott closed 2 years ago

kellrott commented 2 years ago

This PR adds the ability to create dynamic length graph traversals using GripQL. This is done via a 'mark' and 'jump' based interface, similar to using a 'goto' statement, but for the stream processor.

While more primitive than the repeat mechanisms seen in Gremlin, this allows for a much more simple query compilation and implementation.

The PR adds 4 new operations:

Example queries:

q = G.query().V("Character:1").set("count", 0).as_("start").mark("a").out().increment("$start.count")
q = q.has(gripql.lt("$start.count", 2))
q = q.jump("a", None, True)