Skip to content

Commit 269ff5b

Browse files
committed
feat: update traversal on apache tinkerpop
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
1 parent 711516e commit 269ff5b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/communication/TraversalExecutor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,13 @@ static GraphTraversal<Vertex, Vertex> getPredicate(CriteriaCondition condition)
4343
return __.has(name, P.eq(value));
4444
}
4545
case LIKE -> {
46-
TextP.
47-
return __.has(name, P.test(v -> v instanceof String && ((String) v).matches(regex)));
46+
return __.has(name, TextP.regex(value == null ? "" : value.toString()));
4847
}
4948
case ENDS_WITH -> {
5049
return __.has(name, TextP.endingWith(value == null ? "" : value.toString()));
5150
}
5251
case STARTS_WITH -> {
53-
__.has(name, TextP.startingWith(value == null ? "" : value.toString()));
52+
return __.has(name, TextP.startingWith(value == null ? "" : value.toString()));
5453
}
5554
case CONTAINS -> {
5655
return __.has(name, TextP.containing(value == null ? "" : value.toString()));

0 commit comments

Comments
 (0)