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

Add a StringFactory for Path which prefixes with type.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Implemented
    • 3.2.2
    • 3.4.0
    • structure
    • None

    Description

      Here are our various StringFactory looks:

      >>> Vertex(10)
      v[10]
      >>> Edge(2,Vertex(1),"knows",Vertex(2))
      e[2][1-knows->2]
      >>> Property("name","marko")
      p[name->marko]
      >>> VertexProperty(7,"name","marko")
      vp[name->marko]
      >>> Path([],[Vertex(1),"hello",3])
      [v[1], 'hello', 3]
      

      NOTE: this is the same string representation for Gremlin-Java as well.

      Given that Path is a core interface, I believe it should have a toString() like the other structure interfaces. I propose:

      path[v[1], 'hello', 3]
      

      This will make it easy to distinguish it from a list as well.

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              okram Marko A. Rodriguez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: