Kiran Bhagannavar
Kiran Bhagannavar

Reputation: 33

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

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

Upvotes: 0

Views: 46

Answers (1)

Luigi Dell'Aquila
Luigi Dell'Aquila

Reputation: 2814

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

Upvotes: 0

Related Questions