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

Provide String-based withStrategy()/withoutStrategy() for language variant usage

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.2
    • 3.2.3
    • process
    • None

    Description

      Right now withStrategies() is not supported by Gremlin-Python. Why? Because strategies are created via Java and thus you can't do stuff like:

      g.withStrategies(SubgraphStrategy.build()...create())
      

      Now, we have strategies that we have made "native" to GraphTraversalSource by way of withXXX. For example: withSideEffect(), withSack(), withRemote(), withPath(), etc.

      In order to generally support any strategy created by a user for use from a language variant, we should support lambda based strategies. E.g.:

      g.withStrategies(lambda : "SubgraphStrategy.build()...create()")
      

      Like any other lambda, it is executed server side using the respective ScriptEngine.

      Next, withoutStrategies() should support String... so you can do:

      g.withoutStrategies("com.stuff.MyStrategy", "com.stuff.MyOtherStrategy")
      

      ..instead of having to pass in the Class object.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: