Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functions to retrieve traversed graph elements #2309

Closed
lvca opened this issue May 2, 2014 · 0 comments
Closed

New functions to retrieve traversed graph elements #2309

lvca opened this issue May 2, 2014 · 0 comments
Assignees
Milestone

Comments

@lvca
Copy link
Member

lvca commented May 2, 2014

We'd need 3 new functions:

  • traversedVertex, to return the traversed vertex
  • traversedEdge, to return the traversed edge
  • traversedElement, to return any of the traversed element

All functions should get 2 params:

  • index, as starting index. negative numbers means from the end, positive from the beginning of the stack. Example 0 = absolute first traversed vertex, -1 = relative last one
  • items, as optional, by default is 1, but specifying >1 collects the elements in a collection.

Example:

select $path, traversedVertex(-1) from ( traverse out() from #9:1 while $depth < 10 )
@lvca lvca added this to the 1.7 milestone May 2, 2014
@lvca lvca self-assigned this May 2, 2014
lvca added a commit that referenced this issue May 2, 2014
We'd need 3 new functions:

traversedVertex, to return the traversed vertex
traversedEdge, to return the traversed edge
traversedElement, to return any of the traversed element
All functions should get 2 params:

index, as starting index. negative numbers means from the end, positive
from the beginning of the stack. Example 0 = absolute first traversed
vertex, -1 = relative last one
items, as optional, by default is 1, but specifying >1 collects the
elements in a collection.
Example:

select $path, traversedVertex(-1) from ( traverse out() from #9:1 while
$depth < 10 )
@lvca lvca closed this as completed May 5, 2014
@lvca lvca removed the In Progress label Oct 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant