How I can get tree ? #934
Replies: 4 comments 4 replies
-
From the provided required result type (
Is my assumption correct? If not, there's unfortunately no tree step support in Gremlinq. |
Beta Was this translation helpful? Give feedback.
-
What exactly is missing ? |
Beta Was this translation helpful? Give feedback.
-
@jayaemekar Have a look at e.g. this unit test to get an idea of how to use Project...By... correctly. |
Beta Was this translation helpful? Give feedback.
-
Hi, this project() by() out() fold() pattern is 10x more expensive for same result as tree() operation would be. With cosmos, we are using this mentioned pattern, and for example an query to find managers for employees costs 375 RU's. Similar query with tree() operation costs 40 RUs... |
Beta Was this translation helpful? Give feedback.
-
I checked the code and didn`t find implementation of Tree Step.
Let`s say we have Employee Vertex and a Manages Edge ..,
If i want to get all the tree of one Manager with TreeStep would be something like ...
what I need is vertexes with "parent Id" or use the ".tree()" step
g.V('empid','pk').hasLabel('empVertex').repeat(out('ChildMemberEdge').hasLabel('empvertex')).emit().tree()
but I don't find how to do that with gremlinQ
The return type I guess should be ValueTask<(EmployeeVertex, IEnumerable)[]>
Beta Was this translation helpful? Give feedback.
All reactions