I am trying to perform a join between the vertices in the Test1 class and the ones that are adjacent to them, but I'm getting a parsing error since the keyword join
is not allowed. I am trying to show both IDs of the source and destination nodes along the relation Path
, and to get the names of the two vertices
select @rid as P, name as N from Test1 join
(select @rid as R, name as M from (select expand(out('Path')) from Test1))
on t.P=u.R
Update:
I tried the following solution, but all the elements are packed in a collection, while in my case I would like to perform a cartesian product:
select @rid, out('Path').@rid as rid2, name, out('Path').name as name2 from Test1
select in.name as name1, out.name as name2, in.@rid as id1, out.@rid as id2 from Path