2016-05-02 79 views

回答

1

您可以使用

select *,out.asString(),in.asString() from (traverse * from V) fetchplan [*] in_*:-2 out_*: -2 

enter image description here

enter image description here

希望它能幫助。

+0

你能解釋爲什麼你在最後添加fetchplan嗎? –

+1

我添加fetchplan,不像從Michelin第二個查詢中的Studio IN('myedge')和OUT(「myedge」)那樣從頂點顯示。 使用NodeJS,您可以省略fetchplan。 –

0

您可以使用這一排除顯示爲記錄的邊緣:

traverse * from V while @class NOT IN (select distinct(@class) from E) 

enter image description here

enter image description here

您可以使用這一排除從每條記錄的邊緣,但它會告訴你的邊緣爲記錄:

select from (traverse * from V) fetchplan [*] in_*:-2 out_*: -2 

enter image description here

而這兩個查詢的組合:

select from (traverse * from V while @class NOT IN (select distinct(@class) from E)) fetchplan [*] in_*:-2 out_*: -2 

enter image description here

希望它可以幫助

+0

你在OrientDB Studio中執行的第二個查詢是完美的,其他兩個我沒有得到任何邊緣。但是當我從我的NodeJS服務器執行第二個查詢時,我再次獲得邊緣對象和56MB數據中的引用。 –