If I execute this query I receive list of traversed vertices. This list
contains all the vertices from needed subgraph without duplication.
But I am thinking about if it is possible to receive exactly graph instead
of list. Because I need to build graph in my code from the received list of
vertices.
I mean for example in my case I receive only one root vertex 'Ethan' which
has three edges 'child of' to 'Mary', 'Kate', Peter. So I can retrieve this
nodes without calls to DB. Then vertex 'Mary' has only one edge (may be
three but the rest two require call to db) to 'Michael' instead of three
edges in the real graph (to 'Luck', 'Michael', and 'John'). Then from
Michael I can touch 'Shaun' and NY team and so on.
Is it possible in the OrientDB? I think this feature should be natural for
graph databases.
понедельник, 14 июля 2014 г., 18:57:33 UTC+3 пользователь Artem Orobets
написал:
>
> Hi Vladimir,
>
> Prefer using of graph functions instead of underlying fields.
>
> So it is better to rewrite query as following
>
> select unionAll($a, $b) let $a = (TRAVERSE out('root for'), out('child
> of') FROM [Linda_ID, Shaun_ID, Jeff_ID]), $b = (TRAVERSE in('child of')
> FROM [Linda_ID, Shaun_ID, Jeff_ID])
>
>
> Best regards,
> Artem Orobets
>
> *Orient Technologies the Company behind OrientDB*
>
>
> 2014-07-14 18:39 GMT+03:00 Vladimir Ziankevich <[email protected]
> <javascript:>>:
>
>> Of course my picture is just small part. Just demonstrative example.
>>
>> понедельник, 14 июля 2014 г., 17:43:53 UTC+3 пользователь Andrey Kovalev
>> написал:
>>
>>> According to your picture it should work (theoretically).
>>> 'New York islanders' vertex has only incoming edges of type 'root_for'.
>>> Then we need to traverse only by outcoming edges of type 'child_of' and
>>> finally arrive to 'New York raingers' by incoming connection of type
>>> 'root_for'. And we start traversing from 'New York islanders' vertex. If
>>> your picture is only a part of a bigger graph then probably query is not
>>> valid.
>>>
>>> On Monday, 14 July 2014 15:36:39 UTC+1, Vladimir Ziankevich wrote:
>>>>
>>>> But If I travers by V.in_root_for, V.out_root_for does not it mean
>>>> that I get all the vertices of the graph rather than subset? Because of
>>>> this query has no limitations all the vertices will be traversed.
>>>>
>>>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.