Create an edge from the current vertex to another vertex in a side effect
Continue operating on the original vertex
From what I can tell, the only parts of this that are missing from this package are the anonymous id() traversal (which I have a work-around for), and the sideEffect(...) traversal (which I can't seem to work around).
Implementation
If we ignore the part of the gremlin spec that deals with passing arbitrary lambdas to sideEffect(), and focus on just passing anonymous traversals, this doesn't seem like it would be very difficult to implement. I imagine that the implementation might look something like the following for the traversal builder, although I haven't tested it:
Requirement
I'm looking for a way to replicate the following gremlin-groovy query (and similarly structured queries) in gremlin-rs:
In plain English, the requirement is as follows:
From what I can tell, the only parts of this that are missing from this package are the anonymous
id()
traversal (which I have a work-around for), and thesideEffect(...)
traversal (which I can't seem to work around).Implementation
If we ignore the part of the gremlin spec that deals with passing arbitrary lambdas to
sideEffect()
, and focus on just passing anonymous traversals, this doesn't seem like it would be very difficult to implement. I imagine that the implementation might look something like the following for the traversal builder, although I haven't tested it:Please let me know your thoughts on this addition. If is well received, I will attempt to implement it myself & submit a PR.