Received from [email protected] on Wed, Dec 23, 2015 at 06:12:32PM EST:
> Hi.
> 
> I am interesting at looking at the subgraph connected to a particular 
> vertex. So I'm interested in both the neighboring vertices and the 
> particular type(s) of edges that link to them. Is there a way to get those 
> in a same query?
> 
> Basically I am looking to run something like 
> select @class, expand(outV()) from (select expand(in()) from <vertex id>)
> 
> Except a version that works. This query, surprisingly enough, is identical 
> to 
> select expand(outV()) from (select expand(in()) from <vertex id>)

You could use the following Gremlin query; each row in t will contain the edge
and the source vertex:

t = new Table();
g.v("<vertex id>").inE().as('edge').outV().as('source').table(t)
-- 
Lev Givon
Bionet Group | Neurokernel Project
http://lebedov.github.io/
http://neurokernel.github.io/

-- 

--- 
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