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:
mark(name) : Mark a segment in the stream processor, with a name, that can receive jumps
jump(dest, condition, emit) : If a condition is true, send traveler to mark. If emit is true, also send a copy down the processing chain. If condition is None, always do jump.
set(field, value) : Set values within the travelers memory. Can be used to store cycle counts
increment(field, value) : Increment field, ie data[field] = data[field] + value. Can be used to increment counter every cycle
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:
mark(name)
: Mark a segment in the stream processor, with aname
, that can receive jumpsjump(dest, condition, emit)
: If a condition is true, send traveler tomark
. Ifemit
is true, also send a copy down the processing chain. If condition isNone
, always do jump.set(field, value)
: Set values within the travelers memory. Can be used to store cycle countsincrement(field, value)
: Increment field, iedata[field] = data[field] + value
. Can be used to increment counter every cycleExample queries: