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

Add the ability to reverse the stream or a collection

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.4.10
    • None
    • process

    Description

      I had a Gremlin user ask me yesterday if there was a way to have the results of a `path` step be reversed. Today you cannot do that using `from` and `to` steps as the `from` label must appear before the `to` label in a path. In thinking about this, perhaps adding a `reverse` option to order (on top of `asc`,`desc` and `shuffle`) would be a nice addition to Gremlin. So you could write something like:

      g.V().out().out().path().order(local).by(reverse)

      For this specific user they were union-ing a set of paths in different directions and wanted to normalize them to all be in the same direction when presented as results.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gfxman Kelvin R. Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: