If I understand you correctly, I think you are looking for something like:  
SELECT *, $depth FROM (TRAVERSE both() FROM #12:1)  --- that should give 
you 3 records:  
(@rid: #12:1, in: #12:0, out: #12:2, depth:0)
(@rid: #12:0, in: null, out: #12:1, depth: 1)
(@rid: #12:2, in: #12:1, out: null, depth: 1)

If you didn't want #12:2 in the above result, then substitute in() for 
both()

I think your query did not work because #12:0 does not have an "in edge" 
(only an out edge to #12:1)


On Thursday, July 3, 2014 9:51:14 AM UTC-4, Andrew wrote:
>
> Hi Luca, 
>
> This command works but it will only return the adjacent vertexes. 
>
> Let's say, if I want to get all the incoming vertices of V3, I'm expecting 
> V1 and V2.   But select in() from #12:2 will only give me V2.  That's why I 
> want to use *traverse *command. 
> Please advise.
>
>
> Regards
> Andrew
>
>
>
>
>
>
>
>
> On Thursday, July 3, 2014 2:56:49 AM UTC-4, Lvc@ wrote:
>>
>> Try this:
>>
>> Select in() from #12:1
>>
>> Luca
>>
>> Sent from Mobile device
>> Il 02/lug/2014 22:07 "Andrew" <[email protected]> ha scritto:
>>
>>> BTW, I'm using version 1.7.4
>>>
>>> -- 
>>>
>>> --- 
>>> 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