Hi Suraj, it will return an OElement per path, containing a property named "thePath" that is a list of RIDs. If you need expanded data, you can use nested projections https://orientdb.com/docs/3.0.x/sql/SQL-Projections.html#nested-projections
Thanks Luigi Il giorno mar 28 ago 2018 alle ore 17:24 Suraj Shankar < [email protected]> ha scritto: > Thanks a lot luigi. Just one more question adding to it. If I execute this > command from java code, how can I work with the results? Like the > individual nodes ? What will be the return type once I execute from > command() statement? > > On Tue, Aug 28, 2018 at 1:07 AM, Luigi Dell'Aquila < > [email protected]> wrote: > >> hi Suraj, >> >> The TRAVERSE statement automatically skips already traversed nodes, this >> is why you don't see all the parents >> >> You can use a MATCH with "while" condition instead: >> >> MATCH >> {class:nodesLeaf, as:a} <-contains- {as:b, while:(true), >> pathAlias:b_path} >> RETURN b_path || b as thePath >> >> I hope it helps >> >> Thanks >> >> Luigi >> >> Il giorno mar 28 ago 2018 alle ore 09:52 Suraj Shankar < >> [email protected]> ha scritto: >> >>> >>> My query is >>> traverse in(“contains”) from (select from nodesLeaf) strategy >>> depth_first >>> >>> On Tue, Aug 28, 2018 at 12:37 AM, Suraj Shankar < >>> [email protected]> wrote: >>> >>>> Yes I am using the traverse command in sql >>>> >>>> On Tue, Aug 28, 2018 at 12:37 AM, Luigi Dell'Aquila < >>>> [email protected]> wrote: >>>> >>>>> Hi Suraj, >>>>> >>>>> how do you do the traversal? in SQL? >>>>> >>>>> Thanks >>>>> >>>>> Luigi >>>>> >>>>> >>>>> Il giorno mar 28 ago 2018 alle ore 09:31 Suraj Shankar < >>>>> [email protected]> ha scritto: >>>>> >>>>>> HI All, >>>>>> I have a graph as following : >>>>>> 1->1.1 >>>>>> 1->1.2 >>>>>> 2->2.1 >>>>>> 2->2.2 >>>>>> 2->2.3 >>>>>> >>>>>> Now when i start at any of the leaf nodes and traverse using in >>>>>> nodes, i get >>>>>> 1.1,1 >>>>>> 1.2 >>>>>> 2.1,2 >>>>>> 2.2 >>>>>> 2.3 >>>>>> However i want the parent node as well in all the paths. How can i >>>>>> perform this? >>>>>> >>>>>> -- >>>>>> >>>>>> --- >>>>>> 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. >>>>>> >>>>> -- >>>>> >>>>> --- >>>>> 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. >>>>> >>>> -- >>> >>> --- >>> 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. >>> >> -- >> >> --- >> 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. >> > -- > > --- > 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. > -- --- 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.
