Traverse through vertices using SELECT query, just like MATCH. Is it possible?

48 Views Asked by At

Traverse through vertices using SELECT query, just like MATCH. Is it possible in OrientDB?

1

There are 1 best solutions below

0
Luigi Dell'Aquila On BEST ANSWER

SELECT statement allows you to traverse relationships using out()/in()/both() methods, eg. find friends of friends:

SELECT expand(out("FriendOf").out("FriendOf")) from Person WHERE name = 'John'

The SELECT in general is much less flexible than a MATCH, but it's powerful enough for basic use cases