Disabling strategies via string in remote driver

Is there a way to disable a strategy in a providers implementation without a reference to the class? For example, let's say StrategyA is in the providers implementation and I am in Python without access to this. Is there no way to do g.withoutStrategies("com.provider.strategies.StrategyA").V().<etc>()? I see string inputs mentioned in the changelog but it doesn't seem to work?
Solution:
in Java, i think you can use TraversalStrategyProxy directly inside of withStrategies() but there is nothing analogous for withoutStrategies(). We probably should have a better way to do both of these things in the Gremlin language which really doesn't have a notion of classes and such.
Jump to solution
4 Replies
Valentyn Kahamlyk
possible workaround 1: create StrategyA in Python something like class StrategyA(TraversalStrategy): def init(self): TraversalStrategy.init(self, fqcn='com.provider.strategies.StrategyA') and use it in withoutStrategies
Valentyn Kahamlyk
GitHub
tinkerpop/gremlin-python/src/main/python/radish/gremlin.py at 8bfdf...
Apache TinkerPop - a graph computing framework. Contribute to apache/tinkerpop development by creating an account on GitHub.
Solution
spmallette
spmallette10mo ago
in Java, i think you can use TraversalStrategyProxy directly inside of withStrategies() but there is nothing analogous for withoutStrategies(). We probably should have a better way to do both of these things in the Gremlin language which really doesn't have a notion of classes and such.
Lyndon
Lyndon10mo ago
Okay thanks both, yeah would be kind of nice to have a simpler way
Want results from more Discord servers?
Add your server