Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2713

Create an element() step that maps a Property to its Element.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • 3.6.0
    • 3.6.0
    • language
    • None

    Description

      There is currently no way to traverse from a Property to its Element in Gremlin. Add an element() operator (and ElementStep) that will accomplish this.

       

      // Vertex -> VertexProperty -> Vertex
      g.V(1).properties().limit(1).element() => v[1]
      
      // Edge -> Property -> Edge
      g.E(2).properties().limit(1).element() => e[2]
      
      // Vertex -> VertexProperty -> Property -> VertexProperty -> Vertex
      g.V(1).properties().properties().limit(1).element().element() => v[1] 

       

       

      Example use case for this would be service calls that return properties (e.g. full-text search), which could then be traversed to their owning element.

      Attachments

        Issue Links

          Activity

            People

              mikepersonick Mike Personick
              mikepersonick Mike Personick
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: