diff --git a/src/Core/ExpressionParsing/PFactory/PFactory.cs b/src/Core/ExpressionParsing/PFactory/PFactory.cs index e744f1dbc..3aedfab2b 100644 --- a/src/Core/ExpressionParsing/PFactory/PFactory.cs +++ b/src/Core/ExpressionParsing/PFactory/PFactory.cs @@ -1,4 +1,6 @@ -using Gremlin.Net.Process.Traversal; +using System.Text.RegularExpressions; + +using Gremlin.Net.Process.Traversal; namespace ExRam.Gremlinq.Core.ExpressionParsing { @@ -8,7 +10,7 @@ private sealed class DefaultPFactory : IPFactory { private static readonly P PNeqNull = P.Neq(null); - public P TryGetP(ExpressionSemantics semantics, object? maybeValue, IGremlinQueryEnvironment environment) + public P? TryGetP(ExpressionSemantics semantics, object? maybeValue, IGremlinQueryEnvironment environment) { switch (semantics) { @@ -58,6 +60,32 @@ public P TryGetP(ExpressionSemantics semantics, object? maybeValue, IGremlinQuer } } } + else if (!environment.Options.GetValue(GremlinqOption.DisabledTextPredicates).HasFlag(DisabledTextPredicates.Regex)) + { + switch (stringExpressionSemantics) + { + case StringEqualsExpressionSemantics: + { + return TextP.Regex($"(?i)^{Regex.Escape(stringValue)}$"); + } + case IsPrefixOfExpressionSemantics: + { + return TextP.Regex($"(?i)^{string.Join('|', SubStrings(stringValue).Select(x => $"({Regex.Escape((string)x)})"))}$"); + } + case HasInfixExpressionSemantics: + { + return TextP.Regex($"(?i){Regex.Escape(stringValue)}"); + } + case StartsWithExpressionSemantics: + { + return TextP.Regex($"(?i)^{Regex.Escape(stringValue)}"); + } + case EndsWithExpressionSemantics: + { + return TextP.Regex($"(?i){Regex.Escape(stringValue)}$"); + } + } + } break; } @@ -95,7 +123,7 @@ public P TryGetP(ExpressionSemantics semantics, object? maybeValue, IGremlinQuer } } - throw new ExpressionNotSupportedException(); + return null; } private static object[] SubStrings(string value) diff --git a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 27a4b697f..56afe20fd 100644 --- a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',containing('456')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)456')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index feb533e4b..d99ed8802 100644 --- a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',endingWith('7890')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)7890$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index c87281ec0..c65674da2 100644 --- a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',within('','+','+4','+49','+491','+4912','+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index c87281ec0..c65674da2 100644 --- a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',within('','+','+4','+49','+491','+4912','+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index c87281ec0..c65674da2 100644 --- a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',within('','+','+4','+49','+491','+4912','+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt index 8cca9af81..0a3b5261c 100644 --- a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',startingWith('+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^\+49123$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..8cca9af81 --- /dev/null +++ b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +g.V().hasLabel('Country').has('CountryCallingCode',startingWith('+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..82ea1ff65 --- /dev/null +++ b/test/Core.Tests/Debugging/DefaultDebugGremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^\+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 63555bfb7..b8851cefb 100644 --- a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: containing, - Value: 456 + OperatorName: regex, + Value: (?i)456 } ] }, diff --git a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 9fad8c833..decd3f566 100644 --- a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 7fa7b37d0..cd6dc352e 100644 --- a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 7fa7b37d0..cd6dc352e 100644 --- a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 7fa7b37d0..cd6dc352e 100644 --- a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt index 68480a91a..41a212224 100644 --- a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_startsWith.verified.txt b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..68480a91a --- /dev/null +++ b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_startsWith.verified.txt @@ -0,0 +1,133 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..1ba66817c --- /dev/null +++ b/test/Core.Tests/Serialization/BytecodeQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,133 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 63555bfb7..b8851cefb 100644 --- a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: containing, - Value: 456 + OperatorName: regex, + Value: (?i)456 } ] }, diff --git a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 9fad8c833..decd3f566 100644 --- a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 7fa7b37d0..cd6dc352e 100644 --- a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 7fa7b37d0..cd6dc352e 100644 --- a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 7fa7b37d0..cd6dc352e 100644 --- a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_equals_case_insensitive.verified.txt b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_equals_case_insensitive.verified.txt index 68480a91a..41a212224 100644 --- a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_equals_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_startsWith.verified.txt b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..68480a91a --- /dev/null +++ b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_startsWith.verified.txt @@ -0,0 +1,133 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..1ba66817c --- /dev/null +++ b/test/Core.Tests/Serialization/EmptyProjectionValueProtectionSerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,133 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index fe9146b55..b0b0ae840 100644 --- a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -20,8 +20,8 @@ { "@type": "g:TextP", "@value": { - "predicate": "containing", - "value": "456" + "predicate": "regex", + "value": "(?i)456" } } ], diff --git a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index cdcc0045d..c1e75119f 100644 --- a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -20,8 +20,8 @@ { "@type": "g:TextP", "@value": { - "predicate": "endingWith", - "value": "7890" + "predicate": "regex", + "value": "(?i)7890$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 963d08bcb..183410aeb 100644 --- a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -18,18 +18,10 @@ "has", "CountryCallingCode", { - "@type": "g:P", + "@type": "g:TextP", "@value": { - "predicate": "within", - "value": [ - "", - "+", - "+4", - "+49", - "+491", - "+4912", - "+49123" - ] + "predicate": "regex", + "value": "(?i)^()|(\\+)|(\\+4)|(\\+49)|(\\+491)|(\\+4912)|(\\+49123)$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 963d08bcb..183410aeb 100644 --- a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -18,18 +18,10 @@ "has", "CountryCallingCode", { - "@type": "g:P", + "@type": "g:TextP", "@value": { - "predicate": "within", - "value": [ - "", - "+", - "+4", - "+49", - "+491", - "+4912", - "+49123" - ] + "predicate": "regex", + "value": "(?i)^()|(\\+)|(\\+4)|(\\+49)|(\\+491)|(\\+4912)|(\\+49123)$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 963d08bcb..183410aeb 100644 --- a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -18,18 +18,10 @@ "has", "CountryCallingCode", { - "@type": "g:P", + "@type": "g:TextP", "@value": { - "predicate": "within", - "value": [ - "", - "+", - "+4", - "+49", - "+491", - "+4912", - "+49123" - ] + "predicate": "regex", + "value": "(?i)^()|(\\+)|(\\+4)|(\\+49)|(\\+491)|(\\+4912)|(\\+49123)$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt index 3cb5c3898..a81197256 100644 --- a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt @@ -20,8 +20,8 @@ { "@type": "g:TextP", "@value": { - "predicate": "startingWith", - "value": "+49123" + "predicate": "regex", + "value": "(?i)^\\+49123$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..3cb5c3898 --- /dev/null +++ b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt @@ -0,0 +1,132 @@ +{ + "requestId": "00000000-0000-0000-0000-000000000000", + "op": "bytecode", + "processor": "traversal", + "args": { + "gremlin": { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "V" + ], + [ + "hasLabel", + "Country" + ], + [ + "has", + "CountryCallingCode", + { + "@type": "g:TextP", + "@value": { + "predicate": "startingWith", + "value": "+49123" + } + } + ], + [ + "project", + "id", + "label", + "properties" + ], + [ + "by", + { + "@type": "g:T", + "@value": "id" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "properties" + ], + [ + "group" + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "project", + "id", + "label", + "value", + "properties" + ], + [ + "by", + { + "@type": "g:T", + "@value": "id" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "value" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "valueMap" + ] + ] + } + } + ], + [ + "fold" + ] + ] + } + } + ] + ] + } + } + ] + ] + } + }, + "aliases": { + "g": "g" + } + } +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..b88070a7d --- /dev/null +++ b/test/Core.Tests/Serialization/Graphson2GremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,132 @@ +{ + "requestId": "00000000-0000-0000-0000-000000000000", + "op": "bytecode", + "processor": "traversal", + "args": { + "gremlin": { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "V" + ], + [ + "hasLabel", + "Country" + ], + [ + "has", + "CountryCallingCode", + { + "@type": "g:TextP", + "@value": { + "predicate": "regex", + "value": "(?i)^\\+49123" + } + } + ], + [ + "project", + "id", + "label", + "properties" + ], + [ + "by", + { + "@type": "g:T", + "@value": "id" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "properties" + ], + [ + "group" + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "project", + "id", + "label", + "value", + "properties" + ], + [ + "by", + { + "@type": "g:T", + "@value": "id" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "value" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "valueMap" + ] + ] + } + } + ], + [ + "fold" + ] + ] + } + } + ] + ] + } + } + ] + ] + } + }, + "aliases": { + "g": "g" + } + } +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index fe9146b55..b0b0ae840 100644 --- a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -20,8 +20,8 @@ { "@type": "g:TextP", "@value": { - "predicate": "containing", - "value": "456" + "predicate": "regex", + "value": "(?i)456" } } ], diff --git a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index cdcc0045d..c1e75119f 100644 --- a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -20,8 +20,8 @@ { "@type": "g:TextP", "@value": { - "predicate": "endingWith", - "value": "7890" + "predicate": "regex", + "value": "(?i)7890$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 76ad033ea..183410aeb 100644 --- a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -18,21 +18,10 @@ "has", "CountryCallingCode", { - "@type": "g:P", + "@type": "g:TextP", "@value": { - "predicate": "within", - "value": { - "@type": "g:List", - "@value": [ - "", - "+", - "+4", - "+49", - "+491", - "+4912", - "+49123" - ] - } + "predicate": "regex", + "value": "(?i)^()|(\\+)|(\\+4)|(\\+49)|(\\+491)|(\\+4912)|(\\+49123)$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 76ad033ea..183410aeb 100644 --- a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -18,21 +18,10 @@ "has", "CountryCallingCode", { - "@type": "g:P", + "@type": "g:TextP", "@value": { - "predicate": "within", - "value": { - "@type": "g:List", - "@value": [ - "", - "+", - "+4", - "+49", - "+491", - "+4912", - "+49123" - ] - } + "predicate": "regex", + "value": "(?i)^()|(\\+)|(\\+4)|(\\+49)|(\\+491)|(\\+4912)|(\\+49123)$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 76ad033ea..183410aeb 100644 --- a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -18,21 +18,10 @@ "has", "CountryCallingCode", { - "@type": "g:P", + "@type": "g:TextP", "@value": { - "predicate": "within", - "value": { - "@type": "g:List", - "@value": [ - "", - "+", - "+4", - "+49", - "+491", - "+4912", - "+49123" - ] - } + "predicate": "regex", + "value": "(?i)^()|(\\+)|(\\+4)|(\\+49)|(\\+491)|(\\+4912)|(\\+49123)$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt index 3cb5c3898..a81197256 100644 --- a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt @@ -20,8 +20,8 @@ { "@type": "g:TextP", "@value": { - "predicate": "startingWith", - "value": "+49123" + "predicate": "regex", + "value": "(?i)^\\+49123$" } } ], diff --git a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..3cb5c3898 --- /dev/null +++ b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt @@ -0,0 +1,132 @@ +{ + "requestId": "00000000-0000-0000-0000-000000000000", + "op": "bytecode", + "processor": "traversal", + "args": { + "gremlin": { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "V" + ], + [ + "hasLabel", + "Country" + ], + [ + "has", + "CountryCallingCode", + { + "@type": "g:TextP", + "@value": { + "predicate": "startingWith", + "value": "+49123" + } + } + ], + [ + "project", + "id", + "label", + "properties" + ], + [ + "by", + { + "@type": "g:T", + "@value": "id" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "properties" + ], + [ + "group" + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "project", + "id", + "label", + "value", + "properties" + ], + [ + "by", + { + "@type": "g:T", + "@value": "id" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "value" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "valueMap" + ] + ] + } + } + ], + [ + "fold" + ] + ] + } + } + ] + ] + } + } + ] + ] + } + }, + "aliases": { + "g": "g" + } + } +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..b88070a7d --- /dev/null +++ b/test/Core.Tests/Serialization/Graphson3GremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,132 @@ +{ + "requestId": "00000000-0000-0000-0000-000000000000", + "op": "bytecode", + "processor": "traversal", + "args": { + "gremlin": { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "V" + ], + [ + "hasLabel", + "Country" + ], + [ + "has", + "CountryCallingCode", + { + "@type": "g:TextP", + "@value": { + "predicate": "regex", + "value": "(?i)^\\+49123" + } + } + ], + [ + "project", + "id", + "label", + "properties" + ], + [ + "by", + { + "@type": "g:T", + "@value": "id" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "properties" + ], + [ + "group" + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "project", + "id", + "label", + "value", + "properties" + ], + [ + "by", + { + "@type": "g:T", + "@value": "id" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "label" + } + ], + [ + "by", + { + "@type": "g:T", + "@value": "value" + } + ], + [ + "by", + { + "@type": "g:Bytecode", + "@value": { + "step": [ + [ + "valueMap" + ] + ] + } + } + ], + [ + "fold" + ] + ] + } + } + ] + ] + } + } + ] + ] + } + }, + "aliases": { + "g": "g" + } + } +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 28a6858fd..79bde700c 100644 --- a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -3,11 +3,11 @@ "op": "eval", "processor": "", "args": { - "gremlin": "g.V().hasLabel(_a).has(_b,containing(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", + "gremlin": "g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", "bindings": { "_a": "Country", "_b": "CountryCallingCode", - "_c": "456", + "_c": "(?i)456", "_d": "id", "_e": "label", "_f": "properties", diff --git a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index b1f779a85..e6909cc6d 100644 --- a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -3,11 +3,11 @@ "op": "eval", "processor": "", "args": { - "gremlin": "g.V().hasLabel(_a).has(_b,endingWith(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", + "gremlin": "g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", "bindings": { "_a": "Country", "_b": "CountryCallingCode", - "_c": "7890", + "_c": "(?i)7890$", "_d": "id", "_e": "label", "_f": "properties", diff --git a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 655e53c89..171767003 100644 --- a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -3,21 +3,15 @@ "op": "eval", "processor": "", "args": { - "gremlin": "g.V().hasLabel(_a).has(_b,within(_c,_d,_e,_f,_g,_h,_i)).project(_j,_k,_l).by(id).by(label).by(__.properties().group().by(label).by(__.project(_j,_k,_m,_l).by(id).by(label).by(value).by(__.valueMap()).fold()))", + "gremlin": "g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", "bindings": { "_a": "Country", "_b": "CountryCallingCode", - "_c": "", - "_d": "+", - "_e": "+4", - "_f": "+49", - "_g": "+491", - "_h": "+4912", - "_i": "+49123", - "_j": "id", - "_k": "label", - "_l": "properties", - "_m": "value" + "_c": "(?i)^()|(\\+)|(\\+4)|(\\+49)|(\\+491)|(\\+4912)|(\\+49123)$", + "_d": "id", + "_e": "label", + "_f": "properties", + "_g": "value" }, "aliases": { "g": "g" diff --git a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 655e53c89..171767003 100644 --- a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -3,21 +3,15 @@ "op": "eval", "processor": "", "args": { - "gremlin": "g.V().hasLabel(_a).has(_b,within(_c,_d,_e,_f,_g,_h,_i)).project(_j,_k,_l).by(id).by(label).by(__.properties().group().by(label).by(__.project(_j,_k,_m,_l).by(id).by(label).by(value).by(__.valueMap()).fold()))", + "gremlin": "g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", "bindings": { "_a": "Country", "_b": "CountryCallingCode", - "_c": "", - "_d": "+", - "_e": "+4", - "_f": "+49", - "_g": "+491", - "_h": "+4912", - "_i": "+49123", - "_j": "id", - "_k": "label", - "_l": "properties", - "_m": "value" + "_c": "(?i)^()|(\\+)|(\\+4)|(\\+49)|(\\+491)|(\\+4912)|(\\+49123)$", + "_d": "id", + "_e": "label", + "_f": "properties", + "_g": "value" }, "aliases": { "g": "g" diff --git a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 655e53c89..171767003 100644 --- a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -3,21 +3,15 @@ "op": "eval", "processor": "", "args": { - "gremlin": "g.V().hasLabel(_a).has(_b,within(_c,_d,_e,_f,_g,_h,_i)).project(_j,_k,_l).by(id).by(label).by(__.properties().group().by(label).by(__.project(_j,_k,_m,_l).by(id).by(label).by(value).by(__.valueMap()).fold()))", + "gremlin": "g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", "bindings": { "_a": "Country", "_b": "CountryCallingCode", - "_c": "", - "_d": "+", - "_e": "+4", - "_f": "+49", - "_g": "+491", - "_h": "+4912", - "_i": "+49123", - "_j": "id", - "_k": "label", - "_l": "properties", - "_m": "value" + "_c": "(?i)^()|(\\+)|(\\+4)|(\\+49)|(\\+491)|(\\+4912)|(\\+49123)$", + "_d": "id", + "_e": "label", + "_f": "properties", + "_g": "value" }, "aliases": { "g": "g" diff --git a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt index 83309e277..e531cd442 100644 --- a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt @@ -3,11 +3,11 @@ "op": "eval", "processor": "", "args": { - "gremlin": "g.V().hasLabel(_a).has(_b,startingWith(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", + "gremlin": "g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", "bindings": { "_a": "Country", "_b": "CountryCallingCode", - "_c": "+49123", + "_c": "(?i)^\\+49123$", "_d": "id", "_e": "label", "_f": "properties", diff --git a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..83309e277 --- /dev/null +++ b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt @@ -0,0 +1,20 @@ +{ + "requestId": "00000000-0000-0000-0000-000000000000", + "op": "eval", + "processor": "", + "args": { + "gremlin": "g.V().hasLabel(_a).has(_b,startingWith(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", + "bindings": { + "_a": "Country", + "_b": "CountryCallingCode", + "_c": "+49123", + "_d": "id", + "_e": "label", + "_f": "properties", + "_g": "value" + }, + "aliases": { + "g": "g" + } + } +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..1d1d68683 --- /dev/null +++ b/test/Core.Tests/Serialization/Graphson3WithGroovyGremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,20 @@ +{ + "requestId": "00000000-0000-0000-0000-000000000000", + "op": "eval", + "processor": "", + "args": { + "gremlin": "g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold()))", + "bindings": { + "_a": "Country", + "_b": "CountryCallingCode", + "_c": "(?i)^\\+49123", + "_d": "id", + "_e": "label", + "_f": "properties", + "_g": "value" + }, + "aliases": { + "g": "g" + } + } +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index e390b3e69..b20fbacc7 100644 --- a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -1,9 +1,9 @@ { - Script: g.V().hasLabel(_a).has(_b,containing(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), + Script: g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), Bindings: { _a: Country, _b: CountryCallingCode, - _c: 456, + _c: (?i)456, _d: id, _e: label, _f: properties, diff --git a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 8930561ac..c40ae8721 100644 --- a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -1,9 +1,9 @@ { - Script: g.V().hasLabel(_a).has(_b,endingWith(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), + Script: g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), Bindings: { _a: Country, _b: CountryCallingCode, - _c: 7890, + _c: (?i)7890$, _d: id, _e: label, _f: properties, diff --git a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index f869a9fb5..fb941f3e1 100644 --- a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -1,18 +1,12 @@ { - Script: g.V().hasLabel(_a).has(_b,within(_c,_d,_e,_f,_g,_h,_i)).project(_j,_k,_l).by(id).by(label).by(__.properties().group().by(label).by(__.project(_j,_k,_m,_l).by(id).by(label).by(value).by(__.valueMap()).fold())), + Script: g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), Bindings: { _a: Country, _b: CountryCallingCode, - _c: , - _d: +, - _e: +4, - _f: +49, - _g: +491, - _h: +4912, - _i: +49123, - _j: id, - _k: label, - _l: properties, - _m: value + _c: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$, + _d: id, + _e: label, + _f: properties, + _g: value } } \ No newline at end of file diff --git a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index f869a9fb5..fb941f3e1 100644 --- a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -1,18 +1,12 @@ { - Script: g.V().hasLabel(_a).has(_b,within(_c,_d,_e,_f,_g,_h,_i)).project(_j,_k,_l).by(id).by(label).by(__.properties().group().by(label).by(__.project(_j,_k,_m,_l).by(id).by(label).by(value).by(__.valueMap()).fold())), + Script: g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), Bindings: { _a: Country, _b: CountryCallingCode, - _c: , - _d: +, - _e: +4, - _f: +49, - _g: +491, - _h: +4912, - _i: +49123, - _j: id, - _k: label, - _l: properties, - _m: value + _c: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$, + _d: id, + _e: label, + _f: properties, + _g: value } } \ No newline at end of file diff --git a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index f869a9fb5..fb941f3e1 100644 --- a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -1,18 +1,12 @@ { - Script: g.V().hasLabel(_a).has(_b,within(_c,_d,_e,_f,_g,_h,_i)).project(_j,_k,_l).by(id).by(label).by(__.properties().group().by(label).by(__.project(_j,_k,_m,_l).by(id).by(label).by(value).by(__.valueMap()).fold())), + Script: g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), Bindings: { _a: Country, _b: CountryCallingCode, - _c: , - _d: +, - _e: +4, - _f: +49, - _g: +491, - _h: +4912, - _i: +49123, - _j: id, - _k: label, - _l: properties, - _m: value + _c: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$, + _d: id, + _e: label, + _f: properties, + _g: value } } \ No newline at end of file diff --git a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt index 3b1d5a9ad..1fc501c92 100644 --- a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_equals_case_insensitive.verified.txt @@ -1,9 +1,9 @@ { - Script: g.V().hasLabel(_a).has(_b,startingWith(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), + Script: g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), Bindings: { _a: Country, _b: CountryCallingCode, - _c: +49123, + _c: (?i)^\+49123$, _d: id, _e: label, _f: properties, diff --git a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..3b1d5a9ad --- /dev/null +++ b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_startsWith.verified.txt @@ -0,0 +1,12 @@ +{ + Script: g.V().hasLabel(_a).has(_b,startingWith(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), + Bindings: { + _a: Country, + _b: CountryCallingCode, + _c: +49123, + _d: id, + _e: label, + _f: properties, + _g: value + } +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..f022e890a --- /dev/null +++ b/test/Core.Tests/Serialization/GroovyGremlinQuerySerializationTest.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,12 @@ +{ + Script: g.V().hasLabel(_a).has(_b,regex(_c)).project(_d,_e,_f).by(id).by(label).by(__.properties().group().by(label).by(__.project(_d,_e,_g,_f).by(id).by(label).by(value).by(__.valueMap()).fold())), + Bindings: { + _a: Country, + _b: CountryCallingCode, + _c: (?i)^\+49123, + _d: id, + _e: label, + _f: properties, + _g: value + } +} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/OuterProjectionTest.Where_string_property_startsWith.verified.txt b/test/Core.Tests/Serialization/OuterProjectionTest.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..35631fd87 --- /dev/null +++ b/test/Core.Tests/Serialization/OuterProjectionTest.Where_string_property_startsWith.verified.txt @@ -0,0 +1,33 @@ +[ + { + Projections: [ + id, + label, + properties + ] + }, + { + Key: { + RawKey: { + EnumName: T, + EnumValue: id + } + } + }, + { + Key: { + RawKey: { + EnumName: T, + EnumValue: label + } + } + }, + { + Traversal: { + Count: 4, + Projection: { + Name: ExRam.Gremlinq.Core.Projections.EmptyProjection + } + } + } +] \ No newline at end of file diff --git a/test/Core.Tests/Serialization/OuterProjectionTest.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Core.Tests/Serialization/OuterProjectionTest.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..35631fd87 --- /dev/null +++ b/test/Core.Tests/Serialization/OuterProjectionTest.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,33 @@ +[ + { + Projections: [ + id, + label, + properties + ] + }, + { + Key: { + RawKey: { + EnumName: T, + EnumValue: id + } + } + }, + { + Key: { + RawKey: { + EnumName: T, + EnumValue: label + } + } + }, + { + Traversal: { + Count: 4, + Projection: { + Name: ExRam.Gremlinq.Core.Projections.EmptyProjection + } + } + } +] \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_equals_case_insensitive.verified.txt index f8a932795..91cf0e377 100644 --- a/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_equals_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',startingWith('+49123')) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode','+49123') \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_startsWith.verified.txt b/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..f8a932795 --- /dev/null +++ b/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +g.V().hasLabel('Country').has('CountryCallingCode',startingWith('+49123')) \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..f8a932795 --- /dev/null +++ b/test/Providers.CosmosDb.Tests/DebugTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +g.V().hasLabel('Country').has('CountryCallingCode',startingWith('+49123')) \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/DeserializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.CosmosDb.Tests/DeserializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.CosmosDb.Tests/DeserializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/DeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.CosmosDb.Tests/DeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.CosmosDb.Tests/DeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt b/test/Providers.CosmosDb.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.CosmosDb.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.CosmosDb.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.CosmosDb.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt index de1a735ce..7cdc52b35 100644 --- a/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -11,6 +11,6 @@ _b: CountryCallingCode, _c: +49123 }, - gremlin: g.V().hasLabel(_a).has(_b,startingWith(_c)) + gremlin: g.V().hasLabel(_a).has(_b,_c) } } \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..de1a735ce --- /dev/null +++ b/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,16 @@ +{ + RequestId: Guid_1, + Operation: eval, + Processor: , + Arguments: { + aliases: { + g: g + }, + bindings: { + _a: Country, + _b: CountryCallingCode, + _c: +49123 + }, + gremlin: g.V().hasLabel(_a).has(_b,startingWith(_c)) + } +} \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..de1a735ce --- /dev/null +++ b/test/Providers.CosmosDb.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,16 @@ +{ + RequestId: Guid_1, + Operation: eval, + Processor: , + Arguments: { + aliases: { + g: g + }, + bindings: { + _a: Country, + _b: CountryCallingCode, + _c: +49123 + }, + gremlin: g.V().hasLabel(_a).has(_b,startingWith(_c)) + } +} \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt index e689d217b..b730bb9e0 100644 --- a/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -1,5 +1,5 @@ { - Script: g.V().hasLabel(_a).has(_b,startingWith(_c)), + Script: g.V().hasLabel(_a).has(_b,_c), Bindings: { _a: Country, _b: CountryCallingCode, diff --git a/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..e689d217b --- /dev/null +++ b/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,8 @@ +{ + Script: g.V().hasLabel(_a).has(_b,startingWith(_c)), + Bindings: { + _a: Country, + _b: CountryCallingCode, + _c: +49123 + } +} \ No newline at end of file diff --git a/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..e689d217b --- /dev/null +++ b/test/Providers.CosmosDb.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,8 @@ +{ + Script: g.V().hasLabel(_a).has(_b,startingWith(_c)), + Bindings: { + _a: Country, + _b: CountryCallingCode, + _c: +49123 + } +} \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 27a4b697f..56afe20fd 100644 --- a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',containing('456')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)456')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index feb533e4b..d99ed8802 100644 --- a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',endingWith('7890')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)7890$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index c87281ec0..c65674da2 100644 --- a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',within('','+','+4','+49','+491','+4912','+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index c87281ec0..c65674da2 100644 --- a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',within('','+','+4','+49','+491','+4912','+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index c87281ec0..c65674da2 100644 --- a/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/DebugTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',within('','+','+4','+49','+491','+4912','+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_equals_case_insensitive.verified.txt index 8cca9af81..0a3b5261c 100644 --- a/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_equals_case_insensitive.verified.txt @@ -1 +1 @@ -g.V().hasLabel('Country').has('CountryCallingCode',startingWith('+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^\+49123$')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..8cca9af81 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +g.V().hasLabel('Country').has('CountryCallingCode',startingWith('+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..82ea1ff65 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/DebugTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +g.V().hasLabel('Country').has('CountryCallingCode',regex('(?i)^\+49123')).project('id','label','properties').by(id).by(label).by(__.properties().group().by(label).by(__.project('id','label','value','properties').by(id).by(label).by(value).by(__.valueMap()).fold())) \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DeserializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/DeserializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/DeserializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/DeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/DeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DeserializationWithoutProjectionTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/DeserializationWithoutProjectionTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/DeserializationWithoutProjectionTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/DeserializationWithoutProjectionTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/DeserializationWithoutProjectionTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/DeserializationWithoutProjectionTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationAndDeserializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationAndDeserializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationAndDeserializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationAndDeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationAndDeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationAndDeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.Contains_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.Contains_case_insensitive.verified.txt new file mode 100644 index 000000000..e6c6018ac --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.Contains_case_insensitive.verified.txt @@ -0,0 +1,3 @@ +[ + "Hello" +] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.Contains_case_insensitive_reverse.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.Contains_case_insensitive_reverse.verified.txt new file mode 100644 index 000000000..e6c6018ac --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.Contains_case_insensitive_reverse.verified.txt @@ -0,0 +1,3 @@ +[ + "Hello" +] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.EndsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.EndsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..e6c6018ac --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.EndsWith_case_insensitive.verified.txt @@ -0,0 +1,3 @@ +[ + "Hello" +] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.EndsWith_case_insensitive_reverse.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.EndsWith_case_insensitive_reverse.verified.txt new file mode 100644 index 000000000..e6c6018ac --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.EndsWith_case_insensitive_reverse.verified.txt @@ -0,0 +1,3 @@ +[ + "Hello" +] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.Equals_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.Equals_case_insensitive.verified.txt new file mode 100644 index 000000000..e6c6018ac --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.Equals_case_insensitive.verified.txt @@ -0,0 +1,3 @@ +[ + "Hello" +] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.Equals_case_insensitive_reverse.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.Equals_case_insensitive_reverse.verified.txt new file mode 100644 index 000000000..e6c6018ac --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.Equals_case_insensitive_reverse.verified.txt @@ -0,0 +1,3 @@ +[ + "Hello" +] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.StartsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.StartsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..e6c6018ac --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.StartsWith_case_insensitive.verified.txt @@ -0,0 +1,3 @@ +[ + "Hello" +] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.StartsWith_case_insensitive_reverse.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.StartsWith_case_insensitive_reverse.verified.txt new file mode 100644 index 000000000..e6c6018ac --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.StartsWith_case_insensitive_reverse.verified.txt @@ -0,0 +1,3 @@ +[ + "Hello" +] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.cs b/test/Providers.GremlinServer.Tests/IntegrationTests.cs index 23b5f1f9a..042a1456d 100644 --- a/test/Providers.GremlinServer.Tests/IntegrationTests.cs +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.cs @@ -129,6 +129,54 @@ public sealed class IntegrationTests : QueryExecutionTest, IClassFixture _g + .Inject("Hello", "Bello") + .Where(x => x.StartsWith("he", StringComparison.OrdinalIgnoreCase)) + .Verify(); + + [Fact] + public Task Equals_case_insensitive() => _g + .Inject("Hello", "Bello") + .Where(x => x.Equals("hello", StringComparison.OrdinalIgnoreCase)) + .Verify(); + + [Fact] + public Task EndsWith_case_insensitive() => _g + .Inject("Hello", "Hallx") + .Where(x => x.EndsWith("lo", StringComparison.OrdinalIgnoreCase)) + .Verify(); + + [Fact] + public Task Contains_case_insensitive() => _g + .Inject("Hello", "Snafu") + .Where(x => x.Contains("LL", StringComparison.OrdinalIgnoreCase)) + .Verify(); + + [Fact] + public Task StartsWith_case_insensitive_reverse() => _g + .Inject("Bello", "Hello") + .Where(x => x.StartsWith("he", StringComparison.OrdinalIgnoreCase)) + .Verify(); + + [Fact] + public Task Equals_case_insensitive_reverse() => _g + .Inject("Bello", "Hello") + .Where(x => x.Equals("hello", StringComparison.OrdinalIgnoreCase)) + .Verify(); + + [Fact] + public Task EndsWith_case_insensitive_reverse() => _g + .Inject("Hallx", "Hello") + .Where(x => x.EndsWith("lo", StringComparison.OrdinalIgnoreCase)) + .Verify(); + + [Fact] + public Task Contains_case_insensitive_reverse() => _g + .Inject("Snafu", "Hello") + .Where(x => x.Contains("LL", StringComparison.OrdinalIgnoreCase)) + .Verify(); + [Fact] public async Task Deserialization_of_typed_results_is_only_called_once() { diff --git a/test/Providers.GremlinServer.Tests/IntegrationWithoutProjectionTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationWithoutProjectionTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationWithoutProjectionTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationWithoutProjectionTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationWithoutProjectionTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/IntegrationWithoutProjectionTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/ObjectDeserializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/ObjectDeserializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/ObjectDeserializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/ObjectDeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/ObjectDeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/ObjectDeserializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/PasswordSecuredIntegrationTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/PasswordSecuredIntegrationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/PasswordSecuredIntegrationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/PasswordSecuredIntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/PasswordSecuredIntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/PasswordSecuredIntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 3d8a51da3..e6df9797b 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: containing, - Value: 456 + OperatorName: regex, + Value: (?i)456 } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 1307166a2..297ed0c29 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index ddc1e3b27..e63ec599f 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index ddc1e3b27..e63ec599f 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index ddc1e3b27..e63ec599f 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt index f3a5d09d6..e9900a752 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..f3a5d09d6 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,143 @@ +{ + RequestId: Guid_1, + Operation: bytecode, + Processor: traversal, + Arguments: { + aliases: { + g: g + }, + gremlin: { + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..2120e44a1 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,143 @@ +{ + RequestId: Guid_1, + Operation: bytecode, + Processor: traversal, + Arguments: { + aliases: { + g: g + }, + gremlin: { + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 42924a38a..572cfd9c8 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: containing, - Value: 456 + OperatorName: regex, + Value: (?i)456 } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 40525b8b7..183fc0e3e 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 19e996f9b..9ed7f1826 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 19e996f9b..9ed7f1826 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 19e996f9b..9ed7f1826 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_equals_case_insensitive.verified.txt index aee480f70..0366a4906 100644 --- a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..aee480f70 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,143 @@ +{ + RequestId: Guid_1, + Operation: bytecode, + Processor: traversal, + Arguments: { + aliases: { + g: a + }, + gremlin: { + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..657473a53 --- /dev/null +++ b/test/Providers.GremlinServer.Tests/RequestMessageWithAliasSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,143 @@ +{ + RequestId: Guid_1, + Operation: bytecode, + Processor: traversal, + Arguments: { + aliases: { + g: a + }, + gremlin: { + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 63555bfb7..b8851cefb 100644 --- a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: containing, - Value: 456 + OperatorName: regex, + Value: (?i)456 } ] }, diff --git a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 9fad8c833..decd3f566 100644 --- a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 7fa7b37d0..cd6dc352e 100644 --- a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 7fa7b37d0..cd6dc352e 100644 --- a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 7fa7b37d0..cd6dc352e 100644 --- a/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt index 68480a91a..41a212224 100644 --- a/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..68480a91a --- /dev/null +++ b/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,133 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..1ba66817c --- /dev/null +++ b/test/Providers.GremlinServer.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,133 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: valueMap + } + ] + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Providers.JanusGraph.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt b/test/Providers.JanusGraph.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.JanusGraph.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.JanusGraph.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.JanusGraph.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 2291b044e..e1c5d77f0 100644 --- a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: containing, - Value: 456 + OperatorName: regex, + Value: (?i)456 } ] }, diff --git a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 7446f9ab2..d29259739 100644 --- a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 335a9eacc..6fa1b6ad7 100644 --- a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 335a9eacc..6fa1b6ad7 100644 --- a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 335a9eacc..6fa1b6ad7 100644 --- a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt index 459125acc..7371665fa 100644 --- a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..459125acc --- /dev/null +++ b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,130 @@ +{ + RequestId: Guid_1, + Operation: bytecode, + Processor: traversal, + Arguments: { + aliases: { + g: g + }, + gremlin: { + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..d1af8b54c --- /dev/null +++ b/test/Providers.JanusGraph.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,130 @@ +{ + RequestId: Guid_1, + Operation: bytecode, + Processor: traversal, + Arguments: { + aliases: { + g: g + }, + gremlin: { + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index c655b6fde..62b63c05c 100644 --- a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: containing, - Value: 456 + OperatorName: regex, + Value: (?i)456 } ] }, diff --git a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 0c5d66710..1bbcbe171 100644 --- a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 18f44dbb0..19a65aac0 100644 --- a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 18f44dbb0..19a65aac0 100644 --- a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 18f44dbb0..19a65aac0 100644 --- a/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt index 907058be1..1ba4d586a 100644 --- a/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..907058be1 --- /dev/null +++ b/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,120 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..922f1e87d --- /dev/null +++ b/test/Providers.JanusGraph.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,120 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 81aa1dcc2..34fa2f915 100644 --- a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -30,8 +30,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 9e0feadbe..2c9148399 100644 --- a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -30,16 +30,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 9e0feadbe..2c9148399 100644 --- a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -30,16 +30,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 9e0feadbe..2c9148399 100644 --- a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -30,16 +30,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_equals_case_insensitive.verified.txt index 341fa29c0..4aa80fa61 100644 --- a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -30,8 +30,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..341fa29c0 --- /dev/null +++ b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,136 @@ +{ + SourceInstructions: [ + { + OperatorName: withSideEffect, + Arguments: [ + Neptune#fts.endpoint, + http://elastic.search.server + ] + }, + { + OperatorName: withSideEffect, + Arguments: [ + Neptune#fts.queryType, + query_string + ] + } + ], + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..500e78d9b --- /dev/null +++ b/test/Providers.Neptune.Tests/ElasticSearchSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,136 @@ +{ + SourceInstructions: [ + { + OperatorName: withSideEffect, + Arguments: [ + Neptune#fts.endpoint, + http://elastic.search.server + ] + }, + { + OperatorName: withSideEffect, + Arguments: [ + Neptune#fts.queryType, + query_string + ] + } + ], + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Providers.Neptune.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt b/test/Providers.Neptune.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.Neptune.Tests/IntegrationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.Neptune.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..ad47dbb93 --- /dev/null +++ b/test/Providers.Neptune.Tests/IntegrationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index 2291b044e..e1c5d77f0 100644 --- a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: containing, - Value: 456 + OperatorName: regex, + Value: (?i)456 } ] }, diff --git a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 7446f9ab2..d29259739 100644 --- a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 335a9eacc..6fa1b6ad7 100644 --- a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 335a9eacc..6fa1b6ad7 100644 --- a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 335a9eacc..6fa1b6ad7 100644 --- a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -22,16 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt index 459125acc..7371665fa 100644 --- a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -22,8 +22,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..459125acc --- /dev/null +++ b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,130 @@ +{ + RequestId: Guid_1, + Operation: bytecode, + Processor: traversal, + Arguments: { + aliases: { + g: g + }, + gremlin: { + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..d1af8b54c --- /dev/null +++ b/test/Providers.Neptune.Tests/RequestMessageSerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,130 @@ +{ + RequestId: Guid_1, + Operation: bytecode, + Processor: traversal, + Arguments: { + aliases: { + g: g + }, + gremlin: { + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/test/Providers.Neptune.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt index c655b6fde..62b63c05c 100644 --- a/test/Providers.Neptune.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/SerializationTests.Where_property_contains_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: containing, - Value: 456 + OperatorName: regex, + Value: (?i)456 } ] }, diff --git a/test/Providers.Neptune.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt index 0c5d66710..1bbcbe171 100644 --- a/test/Providers.Neptune.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/SerializationTests.Where_property_ends_with_constant_with_TextP_support_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: endingWith, - Value: 7890 + OperatorName: regex, + Value: (?i)7890$ } ] }, diff --git a/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt index 18f44dbb0..19a65aac0 100644 --- a/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_constant_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt index 18f44dbb0..19a65aac0 100644 --- a/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_expression_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt index 18f44dbb0..19a65aac0 100644 --- a/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/SerializationTests.Where_property_is_prefix_of_variable_case_insensitive.verified.txt @@ -14,16 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: within, - Value: [ - , - +, - +4, - +49, - +491, - +4912, - +49123 - ] + OperatorName: regex, + Value: (?i)^()|(\+)|(\+4)|(\+49)|(\+491)|(\+4912)|(\+49123)$ } ] }, diff --git a/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt index 907058be1..1ba4d586a 100644 --- a/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt +++ b/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_equals_case_insensitive.verified.txt @@ -14,8 +14,8 @@ Arguments: [ CountryCallingCode, { - OperatorName: startingWith, - Value: +49123 + OperatorName: regex, + Value: (?i)^\+49123$ } ] }, diff --git a/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_startsWith.verified.txt b/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_startsWith.verified.txt new file mode 100644 index 000000000..907058be1 --- /dev/null +++ b/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_startsWith.verified.txt @@ -0,0 +1,120 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: startingWith, + Value: +49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt b/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt new file mode 100644 index 000000000..922f1e87d --- /dev/null +++ b/test/Providers.Neptune.Tests/SerializationTests.Where_string_property_startsWith_case_insensitive.verified.txt @@ -0,0 +1,120 @@ +{ + StepInstructions: [ + { + OperatorName: V + }, + { + OperatorName: hasLabel, + Arguments: [ + Country + ] + }, + { + OperatorName: has, + Arguments: [ + CountryCallingCode, + { + OperatorName: regex, + Value: (?i)^\+49123 + } + ] + }, + { + OperatorName: project, + Arguments: [ + id, + label, + properties + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: properties + }, + { + OperatorName: group + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + StepInstructions: [ + { + OperatorName: project, + Arguments: [ + id, + label, + value + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: id + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: label + } + ] + }, + { + OperatorName: by, + Arguments: [ + { + EnumName: T, + EnumValue: value + } + ] + }, + { + OperatorName: fold + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Tests.Fixtures/CosmosDbEmulatorFixture.cs b/test/Tests.Fixtures/CosmosDbEmulatorFixture.cs index d6635afa3..1438fbd9f 100644 --- a/test/Tests.Fixtures/CosmosDbEmulatorFixture.cs +++ b/test/Tests.Fixtures/CosmosDbEmulatorFixture.cs @@ -36,7 +36,9 @@ await Policy .WithPartitionKey(x => x.Label!) .UseNewtonsoftJson()) .ConfigureEnvironment(env => env - .AddFakePartitionKey()); + .AddFakePartitionKey() + .ConfigureOptions(options => options + .SetValue(GremlinqOption.StringComparisonTranslationStrictness, StringComparisonTranslationStrictness.Lenient))); } } } diff --git a/test/Tests.Fixtures/CosmosDbFixture.cs b/test/Tests.Fixtures/CosmosDbFixture.cs index 494d6b12f..9a9c15290 100644 --- a/test/Tests.Fixtures/CosmosDbFixture.cs +++ b/test/Tests.Fixtures/CosmosDbFixture.cs @@ -16,6 +16,8 @@ public sealed class CosmosDbFixture : GremlinqFixture .AuthenticateBy("pass") .UseNewtonsoftJson()) .ConfigureEnvironment(env => env - .AddFakePartitionKey()); + .AddFakePartitionKey() + .ConfigureOptions(options => options + .SetValue(GremlinqOption.StringComparisonTranslationStrictness, StringComparisonTranslationStrictness.Lenient))); } } diff --git a/test/Tests.Fixtures/GremlinqFixture.cs b/test/Tests.Fixtures/GremlinqFixture.cs index 647689088..097c019c6 100644 --- a/test/Tests.Fixtures/GremlinqFixture.cs +++ b/test/Tests.Fixtures/GremlinqFixture.cs @@ -14,13 +14,7 @@ public class GremlinqFixture : IAsyncLifetime public virtual async Task InitializeAsync() { - _g = await TransformQuerySource(g - .ConfigureEnvironment(env => env - .ConfigureOptions(options => options - .SetValue(GremlinqOption.StringComparisonTranslationStrictness, - StringComparisonTranslationStrictness.Lenient)))); - - _g = _g + _g = (await TransformQuerySource(g)) .ConfigureEnvironment(env => env .ConfigureModel(model => model == GraphModel.Invalid ? GraphModel.FromBaseTypes() diff --git a/test/Tests.Fixtures/QueryExecutionTest.cs b/test/Tests.Fixtures/QueryExecutionTest.cs index 8178bab79..2f1b360d5 100644 --- a/test/Tests.Fixtures/QueryExecutionTest.cs +++ b/test/Tests.Fixtures/QueryExecutionTest.cs @@ -4601,6 +4601,18 @@ await _g [Fact] public virtual Task Where_string_property_equals_case_insensitive() => _g + .V() + .Where(c => c.CountryCallingCode!.Equals("+49123", StringComparison.OrdinalIgnoreCase)) + .Verify(); + + [Fact] + public virtual Task Where_string_property_startsWith() => _g + .V() + .Where(c => c.CountryCallingCode!.StartsWith("+49123")) + .Verify(); + + [Fact] + public virtual Task Where_string_property_startsWith_case_insensitive() => _g .V() .Where(c => c.CountryCallingCode!.StartsWith("+49123", StringComparison.OrdinalIgnoreCase)) .Verify();