diff --git a/gqlalchemy/query_builders/declarative_base.py b/gqlalchemy/query_builders/declarative_base.py index e97094a1..11531fac 100644 --- a/gqlalchemy/query_builders/declarative_base.py +++ b/gqlalchemy/query_builders/declarative_base.py @@ -92,6 +92,7 @@ class Operator(Enum): LEQ_THAN = "<=" NOT_EQUAL = "!=" INCREMENT = "+=" + SIMILAR = "=~" class Order(Enum): diff --git a/tests/query_builders/test_query_builders.py b/tests/query_builders/test_query_builders.py index 7e4ae429..c4f9f4c6 100644 --- a/tests/query_builders/test_query_builders.py +++ b/tests/query_builders/test_query_builders.py @@ -306,7 +306,7 @@ def test_multiple_merges(self, vendor): mock.assert_called_with(expected_query) - @pytest.mark.parametrize("operator", ["=", "<>", "<", "!=", ">", "<=", ">="]) + @pytest.mark.parametrize("operator", ["=", "<>", "<", "!=", ">", "<=", ">=", "=~"]) def test_where_without_operator_enum(self, vendor, operator): query_builder = ( vendor[1] @@ -318,7 +318,6 @@ def test_where_without_operator_enum(self, vendor, operator): .return_() ) expected_query = f" MATCH (n:L1)-[:TO]->(m:L2) WHERE n.name {operator} 'best_name' RETURN * " - with patch.object(vendor[0], "execute_and_fetch", return_value=None) as mock: query_builder.execute()