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

Use Parameters in more steps than just the MutationStep library.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.2.1
    • Fix Version/s: None
    • Component/s: process
    • Labels:
      None

      Description

      Parameters was introduced to provide more expressivity in the mutation API. With Parameters, a step parameter need not be a direct object, but could, instead, but a traversal which yields the direct object. For instance:

      g.V().as("a").out().addV("person").property("age",select("a").values("age"))
      

      That is, the new person age is the age of whatever vertex was labeled "a."

      This ability to parameterize steps with runtime traversals is powerful and should be used more throughout Gremlin. For instance, it would be cool to be able to do things like below:

      g.V().outE().as("e").inV().out(select("e").label())
      g.V().as("a").out().has("age",gt(select("a").values("age"))
      g.V().groupCount().by(label)
        .order(local).by(values,decr)
        .select(keys).unfold().limit(1)
        V().hasLabel(__.label())
      

      I think the steps that can best use Parameters include:

      • Mutating-steps (*done*)
      • HasStep
      • VertexStep (out(), in(), outE(), etc.)
      • ??

      Daniel Kuppitz What do you think given your experience?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                okram Marko A. Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: