Hi Mahesh,
I will give you two examples, one with documents and links and the other
with vertices and edges.
Ex1:
You have a class "Person" with a link property "father" that points to
another person
you can do
traverse father from (select from Person where name = 'Bill') while $depth
< 3
you will get Bill itself, his father and his grandfather.
You can also omit the $depth filter and get all the genealogical tree
Ex2:
more or less as the first one, you have a class Person extends V and a
class Friend extends E
you can do
select out("Friend") from (select from Person where name = 'Bill') while
$depth < 3
and you would get Bill itself (depth 0), his friends (depth 1) and his
friends of friends (depth 2)
I hope it can help
2015-04-20 12:05 GMT+02:00 Mahesh Wabale <[email protected]>:
> I read whole document , i doesn't understand the traverse command can anyone
> explain me this concept by giving example ?
>
> Also i am trying this command , but not understanding how it works internally
> .
>
> traverse friends from #10:1234 while $depth <= 3 strategy BREADTH_FIRST
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" 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.
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" 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.