Search code examples
orientdb

Get Edge's Vertex IN and OUT RID


The following query produces what I want but it returns the @RID of the edges for IN and OUT. Is there any way I can convert them into the Vertex's IN and OUT?

SELECT FROM (
     TRAVERSE out('Child') FROM #21:0
)

Solution

  • Try this:

    SELECT @rid, name, in().name as in, out().name as out FROM (
         TRAVERSE out('Child') FROM #21:0
    )
    unwind in
    

    this is what you get:

    enter image description here


    Hope it helps

    Regards