Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public default GraphTraversal<S, ?> incrementProperty(final String propertyKey,
- final GraphTraversal<?,?> valueTraversal) {
- return property(Cardinality.single, propertyKey,
- __.union(
- __.values(propertyKey),
- valueTraversal)
- .sum());
- }
- public default GraphTraversal<S, ?> decrementProperty(final String propertyKey,
- final GraphTraversal<?,?> valueTraversal) {
- return property(Cardinality.single, propertyKey,
- __.union(
- __.values(propertyKey),
- valueTraversal).math("_ * -1")
- .sum());
- }
Add Comment
Please, Sign In to add comment