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 2021/11/19 01:32:53 UTC

[tinkerpop] branch TINKERPOP-2652 updated: 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


The following commit(s) were added to refs/heads/TINKERPOP-2652 by this push:
     new a972308  Add regex predicates to Python client
a972308 is described below

commit a972308fee5e87b22e87575576064aedc724efc7
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 0db602d..3b7627e 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