You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by kr...@apache.org on 2022/01/07 21:42:10 UTC
[tinkerpop] 08/15: Add regex predicates to Python client
This is an automated email from the ASF dual-hosted git repository.
krlawrence pushed a commit to branch TINKERPOP-2652
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 7ec6bd48cc8cffdd85a61967e70441fb56e8d430
Author: Kelvin Lawrence <gf...@yahoo.com>
AuthorDate: Thu Nov 18 19:32:40 2021 -0600
Add regex predicates to Python client
---
.../src/main/python/gremlin_python/process/traversal.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gremlin-python/src/main/python/gremlin_python/process/traversal.py b/gremlin-python/src/main/python/gremlin_python/process/traversal.py
index f7bd31d..f8bb83c 100644
--- a/gremlin-python/src/main/python/gremlin_python/process/traversal.py
+++ b/gremlin-python/src/main/python/gremlin_python/process/traversal.py
@@ -384,6 +384,14 @@ class TextP(P):
def startingWith(*args):
return TextP("startingWith", *args)
+ @staticmethod
+ def regex(*args):
+ return TextP("regex", *args)
+
+ @staticmethod
+ def notRegex(*args):
+ return TextP("notRegex", *args)
+
def __eq__(self, other):
return isinstance(other, self.__class__) and self.operator == other.operator and self.value == other.value and self.other == other.other