[英]Getting the IDs and the attributes of two adjacent nodes in OrientDB
我正在嘗試在Test1類的頂點和與之相鄰的頂點之間執行聯接,但是由於不允許使用關鍵字join
因此出現了解析錯誤。 我試圖顯示沿關系Path
的源節點和目標節點的ID,並獲取兩個頂點的名稱
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
更新:
我嘗試了以下解決方案,但是所有元素都打包在一個集合中,而在我的情況下,我想執行笛卡爾積:
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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.