1
votes

I'm looking for query that will return vertices that are connected to specific vertex (with known rid) by specific edge class, problem is that the connected vertices can have different classes

my graph

in this example i need query that will give me #68:0, #72:5. What I need exactly, is the properties data for them and in orient studio browse mode it returns only links to them result

1

1 Answers

4
votes

Given a specific vertex rid and edge class you can use the out() function to get adjacent outgoing vertices and the expand() function to include all fields:

SELECT expand(out("has_conditionsElement")) FROM #44:62

You can also use in() for incoming vertices:

SELECT expand(in("has_conditionsElement")) FROM #44:62

Or both() for all directions:

SELECT expand(both("has_conditionsElement")) FROM #44:62

Source:

SQL-Functions > out()

SQL-Functions > in()

SQL-Functions > both()

SQL-Functions > expand()