Tinkerpop 3 Lambda support in Java

Orient 3.1.0-M2

Does OrientDB support the Lambda class in the Tinkerpop 3 support in Java? In other words, can we run server side lambdas like so:

JAVA

g.traversal().V()
        .hasLabel("Country")
        // remote (server side) gremlin lambda to filter the results
        .filter(Lambda.predicate("it.get().value('Name').startsWith('A')"))
        .properties("Name").forEachRemaining(System.out::println);

This returns 0 results. However if I use a client side (Java) lambda, it works but this is not ideal. Also, is there better Tinkerpop 3 support available?

Have you found an alternative solution? I really need a sql LIKE behavior in gremlin… Currently Im using gremlin javascript library but I have not found a solution.

Hi @isaactzab

AFAIK gremlin-js with GLV does not support lambda. To achieve LIKE behaviour in TP 3.4.x there is the support for predicate TextP which would allow you to do containing, startingWith etc

https://tinkerpop.apache.org/docs/current/reference/#a-note-on-predicates

But OrientDB 3.0.x does ship only Apache Tinkerpop 3.3.x. Version 3.4.x will be shipped with OrientDB 3.1.x