options work fine, thanks Frank. What if I want to traverse whole graph? I
can specify something like IN 1..1000 but this is not too elegant.
On Friday, June 17, 2016 at 9:59:43 AM UTC+2, Frank Celler wrote:
>
> Roman,
>
> the general syntax is
>
> FOR vertex[, edge[, path]]
> IN [min[..max]]
> OUTBOUND|INBOUND|ANY startVertex
> GRAPH graphName
> [OPTIONS options]
>
> the options allow you to specify the uniqueness, so to get unique vertices
> and edges you can use
>
> FOR v IN any 'vDevice/1895775' GRAPH 'linkGraph' OPTIONS {
> 'uniqueVertices': 'global', 'uniqueEdges': 'global' }
>
> A detailed description of all options can be found here:
> https://docs.arangodb.com/devel/AQL/Graphs/Traversals.html
>
> Hope that helps
> Frank
>
>
>
> Am Freitag, 17. Juni 2016 09:49:47 UTC+2 schrieb Roman:
>>
>> Hi I have troubles to migrate GRAPH_TRAVERSAL function to new 3.0 syntax.
>>
>> for g in GRAPH_TRAVERSAL('linkGraph', {sn: "1.1.1.1"},"any", {uniqueness:
>> {vertices: "global", edges: "global" },filterVertices :
>> "myfunctions::deviceFilter"})[**].vertex.sn return g
>>
>> arDb.createFunction('myfunctions::deviceFilter',
>> String(function(config, vertex, path) {
>> if (vertex.void === true) {
>> return ['prune', 'exclude'];
>> }
>> if (typeof vertex.sn === 'undefined') {return 'exclude';}
>> })
>> );
>>
>> I tried something like this:
>>
>> FOR v IN any 'vDevice/1895775' GRAPH 'linkGraph'
>>
>> but when I add min..max, where max is some higher number, then query is
>> aborted, I guess because of cycles in graph. I have no idea how to add
>> uniqeness.
>>
>> Thanks
>>
>> Roman
>>
>
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.