0

I freshly installed ArangoDB 3.0.2 via Homebrew

When I ran the find leaf nodes query I found in the documentation, this error occurred:

Query: usage of unknown function 'TRAVERSAL()' (while parsing)

Could somebody please explain why I got this error? Thank you very much in advance.

FYI: I did run that query successfully in ArangoDB 2.8.

1
  • If your question is answered, please accept and up-vote the answer. Thanks! Commented Aug 22, 2016 at 19:20

1 Answer 1

1

All graph-related functions were removed from AQL in 3.0.
The faster and more flexible AQL graph traversal can be used instead.

There are migration recipes available, see e.g. https://github.com/arangodb/docs/blob/28b266f143232beb17e5c35cd545d4f3909a1815/3.0/cookbook/aql-migrating-edge-functions-to3.md

Not all cookbook recipes are up-to-date, the one you tried was written for 2.x and does not work anymore in 3.x. @dothebart just removed the obsolete graph recipes from the cookbook, they will be gone after the next build to stop confusing users.

The following query should give you the same result for the example data (all leaf nodes = capitals only), but without the need for a user-defined AQL function:

FOR v IN 0..10 INBOUND "v/world" e
    // leaf node = no inbound edges.
    // We can use LIMIT 1 to optimize the traversal (we don't care how many edges)
    FILTER LENGTH(FOR vv IN INBOUND v e LIMIT 1 RETURN 1) == 0
    RETURN CONCAT(v.name, " (", v.type, ")")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.