Comments on: ArangoDB 2.8: New Features and Enhancements https://arangodb.com/2016/01/arangodb-2-8/ The database for graph and beyond Wed, 17 Apr 2024 06:27:19 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: Michael Hackstein https://arangodb.com/2016/01/arangodb-2-8/#comment-228 Fri, 05 Feb 2016 14:07:00 +0000 http://www.arangodb.com/?p=11772#comment-228 In reply to Jens Petter Abrahamsen.

If you want to use DISTINCT this is exactly the way to go, DISTINCT is executed in the return step so you need to save the distinct set of vertices before executing the VISITOR on all of them.

If you do not want to use DISTINCT you can also write:
FOR v IN OUTBOUND @start @@edge FILTER … RETURN VISITOR(v)
which will be more efficient

]]>
By: Jens Petter Abrahamsen https://arangodb.com/2016/01/arangodb-2-8/#comment-227 Fri, 05 Feb 2016 12:23:00 +0000 http://www.arangodb.com/?p=11772#comment-227 In reply to Michael Hackstein.

About the visitor function, just to make it clear, are you saying that one would e.g. have code like:
let vertices = (AQL using outbound/inbound/any with optional DISTINCT and filter etc)
Then just run a regular for v in vertices VISITOR(v)

something like that?

]]>
By: Michael Hackstein https://arangodb.com/2016/01/arangodb-2-8/#comment-226 Thu, 04 Feb 2016 08:29:00 +0000 http://www.arangodb.com/?p=11772#comment-226 In reply to Jens Petter Abrahamsen.

Hi, the intention of the new traversal syntax is to be more simple and use less options than the function-style traversal. This simplification allows us internally to use several shortcuts and optimizations and allows for an easier entry point for a user. Also we think they cover a lot of use-cases already.

Therefore there not (yet) any plan for further options except the direction and the steps for these traversals. The “visitor” function should be implemented in the later AQL statements (which covers every visitor just returning or counting attributes). Duplicates can be removed using the DISTINCT modifier.

However if these features are not powerful enough you can still use the function-style traversals which are indeed more generic and powerful, but also more complicated to configure.

]]>
By: Jens Petter Abrahamsen https://arangodb.com/2016/01/arangodb-2-8/#comment-225 Fri, 29 Jan 2016 14:28:00 +0000 http://www.arangodb.com/?p=11772#comment-225 Does the new traversal syntax (INBOUND, OUTBOUND) support any options? E.g. how to treat duplicates, visitor function and such?

]]>