Hi Marco,
How many levels do you need? You could also do:

select expand( out().both() ) from #15:0

Namely exists from #15:0 in "out" only and then collect all the node on
both "in" and "out".

Lvc@



On 14 June 2014 08:55, Marco Bonamente <[email protected]> wrote:

> Hi all,
>
> I have a question.
> Which is the best way to get all the vertex and edge starting from the
> vertex #15:0 ?
>
>
> <https://lh3.googleusercontent.com/-3oWI_VQL-yM/U5vxILCvdYI/AAAAAAAAAo8/Z1fpGZpi7IA/s1600/graph.jpg>
>
> I have tried this query
>
> *traverse all() from #15:0 where $depth <= 3*
>
> but doesn't get the vertex #15:1 so i changed with this one:
>
> *traverse E.out,V.out() from *
> *   (traverse V.in(), all() from *
> *         (select * from *
> *                (traverse all() from  #15:0 where $depth <= 2)*
> *          ) where $depth <= 1*
> *   ) where $depth <= 3*
>
> and works but i think is quite complicated.
>
>
>
> thanks all
> Marco
>
> --
>
> ---
> 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.

Reply via email to