OrientDB Query full Graph without Edge Objects

235 Views Asked by At

I want to know if there is a way I can Query the full Graph in OrientDB with TRAVERSE * FROM V without getting the Edges as Objects. Because with the References in all the Objects I get more than 50MB data from a 10 Vertex Graph. I use the orientjs Driver. My Data looks like this: OrientDB data I used the Json-Stringify-Safe to convert the Json to a String.

2

There are 2 best solutions below

2
On BEST ANSWER

You can use

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

enter image description here

enter image description here

Hope it helps.

1
On

You can use this one to exclude the edges shown as records:

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

BEFORE

enter image description here

AFTER

enter image description here

You can use this one to exclude the edges from each record but it will show you the edges as records:

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

enter image description here

And this is the mix of both queries:

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

enter image description here

Hope it helps