You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "spmallette (GitHub)" <gi...@apache.org> on 2018/10/10 23:36:31 UTC
[GitHub] [tinkerpop] spmallette opened pull request #961:
TINKERPOP-2061 Added with() option for traversal configuration
https://issues.apache.org/jira/browse/TINKERPOP-2061
Basically just shorthands the direct use of `OptionStrategy` which is much more verbose and less nice to look at. See the upgrade doc changes in this PR for an example of usage.
All tests pass with `docker/build.sh -t -n -i`
VOTE +1
[ Full content available at: https://github.com/apache/tinkerpop/pull/961 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org
[GitHub] [tinkerpop] spmallette commented on pull request #961:
TINKERPOP-2061 Added with() option for traversal configuration
Posted by "spmallette (GitHub)" <gi...@apache.org>.
done
[ Full content available at: https://github.com/apache/tinkerpop/pull/961 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org
[GitHub] [tinkerpop] dkuppitz commented on pull request #961:
TINKERPOP-2061 Added with() option for traversal configuration
Posted by "dkuppitz (GitHub)" <gi...@apache.org>.
Perhaps a little bit more elegant:
```java
public default TraversalSource with(final String key, final Object value) {
final OptionsStrategy.Builder builder = OptionsStrategy.build();
getStrategies().getStrategy(OptionsStrategy.class)
.ifPresent(optionsStrategy -> optionsStrategy.getOptions().forEach(builder::with));
builder.with(key, value);
return withStrategies(builder.create());
}
```
[ Full content available at: https://github.com/apache/tinkerpop/pull/961 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org