You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This generates a map of keys and all the occurrences of Person vertices in they key's value as array that share the same last name.
In normal TinkerPop, I can do this:
g.V().hasLabel('Person').group().by('LastName').unfold()// Make last name its own array, so we can process them later individually as groups.select(values)// Get rid of the key, flatten the object.map(coalesce(unfold().has('PropertyX','valueWeWantToPrefer'),// Prefer to choose based on thisunfold().has('PropertyX','default')// Else choose this vertex))
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a pretty basic query similar to this:
This generates a map of keys and all the occurrences of Person vertices in they key's value as array that share the same last name.
In normal TinkerPop, I can do this:
How can I achieve the unfold().select(values) behaviour with Gremlinq? Gremlinq does not allow Unfold() operation on Maps. even though it is possible in TinkerPop https://tinkerpop.apache.org/docs/3.7.1/reference/#unfold-step
Also, I can't figure out how to implement the select(values) step...
Beta Was this translation helpful? Give feedback.
All reactions