convert gremlin to java

29 views
Skip to first unread message

parvat

unread,
Jul 20, 2016, 5:29:58 AM7/20/16
to OrientDB
this is my gremlin query i want to convert to java equivalent

b=g.V("name","test").out('BELONGS').in('HAS').as('x').in('HAS').in('HAS').filter{it.name=='pavani'}.path.toList()

alessand...@gmail.com

unread,
Jul 20, 2016, 6:27:32 AM7/20/16
to OrientDB
Hi,
could you post you structure ?

Best regards,
Alessandro

parvat

unread,
Jul 20, 2016, 6:30:31 AM7/20/16
to OrientDB
Can you tell me how we can capture nodes while filtering

alessand...@gmail.com

unread,
Jul 20, 2016, 6:56:01 AM7/20/16
to OrientDB
What do you mean with how we can capture nodes while filtering ?

parvat

unread,
Jul 20, 2016, 7:00:42 AM7/20/16
to OrientDB
Yes

alessand...@gmail.com

unread,
Jul 20, 2016, 9:38:10 AM7/20/16
to OrientDB
With OSQL you can use this query

SELECT dijkstra($a, $b,"","BOTH")
LET $a
= (select from V where name = "test"),
    $b
= (select from V where name = "pavani")

Hope it helps.
Reply all
Reply to author
Forward
0 new messages