You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/03/03 22:02:00 UTC

[jira] [Commented] (TINKERPOP-1446) Add a StringFactory for Path which prefixes with type.

    [ https://issues.apache.org/jira/browse/TINKERPOP-1446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16384867#comment-16384867 ] 

ASF GitHub Bot commented on TINKERPOP-1446:
-------------------------------------------

GitHub user spmallette opened a pull request:

    https://github.com/apache/tinkerpop/pull/810

    TINKERPOP-1446 Added standard string representation for Path objects

    https://issues.apache.org/jira/browse/TINKERPOP-1446
    
    Only applying this to 3.4.x as people might be relying on the old string representations of `Path` objects for some reason. 
    
    All tests pass with `docker/build.sh -t -n -i`
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1446

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/810.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #810
    
----
commit c7bf69d98c229dcc5c2f23a17c88d317ae73be6e
Author: Stephen Mallette <sp...@...>
Date:   2018-03-03T17:25:00Z

    TINKERPOP-1446 Added standard string representation for Path objects

----


> Add a StringFactory for Path which prefixes with type.
> ------------------------------------------------------
>
>                 Key: TINKERPOP-1446
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1446
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: structure
>    Affects Versions: 3.2.2
>            Reporter: Marko A. Rodriguez
>            Assignee: stephen mallette
>            Priority: Trivial
>
> Here are our various {{StringFactory}} looks:
> {code}
> >>> 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]
> {code}
> 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:
> {code}
> path[v[1], 'hello', 3]
> {code}
> This will make it easy to distinguish it from a list as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)