diff --git a/Core.Arango.DataProtection/Core.Arango.DataProtection.csproj b/Core.Arango.DataProtection/Core.Arango.DataProtection.csproj index 499c16e..578810f 100644 --- a/Core.Arango.DataProtection/Core.Arango.DataProtection.csproj +++ b/Core.Arango.DataProtection/Core.Arango.DataProtection.csproj @@ -20,7 +20,7 @@ - + diff --git a/Core.Arango.DevExtreme.Sandbox/Core.Arango.DevExtreme.Sandbox.csproj b/Core.Arango.DevExtreme.Sandbox/Core.Arango.DevExtreme.Sandbox.csproj index 8a507ad..a38f943 100644 --- a/Core.Arango.DevExtreme.Sandbox/Core.Arango.DevExtreme.Sandbox.csproj +++ b/Core.Arango.DevExtreme.Sandbox/Core.Arango.DevExtreme.Sandbox.csproj @@ -7,7 +7,7 @@ - + diff --git a/Core.Arango.DevExtreme.Tests/Core.Arango.DevExtreme.Tests.csproj b/Core.Arango.DevExtreme.Tests/Core.Arango.DevExtreme.Tests.csproj index eced9c6..6ce0eb0 100644 --- a/Core.Arango.DevExtreme.Tests/Core.Arango.DevExtreme.Tests.csproj +++ b/Core.Arango.DevExtreme.Tests/Core.Arango.DevExtreme.Tests.csproj @@ -7,13 +7,13 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Core.Arango.DevExtreme.Tests/TransformTest.cs b/Core.Arango.DevExtreme.Tests/TransformTest.cs index 5e7575b..5c19807 100644 --- a/Core.Arango.DevExtreme.Tests/TransformTest.cs +++ b/Core.Arango.DevExtreme.Tests/TransformTest.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Net; +using System.Reflection.Metadata; using DevExtreme.AspNet.Data; using DevExtreme.AspNet.Data.Helpers; using Newtonsoft.Json; @@ -398,15 +399,31 @@ public void GroupDayIntervalTest() IteratorVar = "a", PropertyTransform = (propertyName, settings) => { - - return $"{settings.IteratorVar}.{propertyName}"; } }); Assert.True(at.Transform(out _)); } - - + + [Fact] + public void NewInTest() + { + var loadOptions = DxLoad(key => + { + if (key == "filter") + return WebUtility.UrlDecode( + @"[%22key%22,[%22ff9e66a6-2544-4ccd-96b5-b2afb54d7b29%22]]"); + return null; + }); + + var at = new ArangoTransform(loadOptions, new ArangoTransformSettings()); + + Assert.True(at.Transform(out _)); + + + _output.WriteLine(at.FilterExpression); + _output.WriteLine(JsonConvert.SerializeObject(at.Parameter.First())); + } } } \ No newline at end of file diff --git a/Core.Arango.DevExtreme/ArangoTransform.cs b/Core.Arango.DevExtreme/ArangoTransform.cs index b7340dd..6e4544c 100644 --- a/Core.Arango.DevExtreme/ArangoTransform.cs +++ b/Core.Arango.DevExtreme/ArangoTransform.cs @@ -763,6 +763,7 @@ private string GetMatchingFilter(IList dxFilter, bool not = false) break; } } + else { boundParam = CreateParameter(jv.Value); @@ -770,6 +771,11 @@ private string GetMatchingFilter(IList dxFilter, bool not = false) break; } + case JArray ja: + { + returnValue = $@"{property} IN {CreateParameter(ja)}"; + break; + } default: { var type = rawValue.GetType(); diff --git a/Core.Arango.DevExtreme/Core.Arango.DevExtreme.csproj b/Core.Arango.DevExtreme/Core.Arango.DevExtreme.csproj index 80259e7..45f7f4b 100644 --- a/Core.Arango.DevExtreme/Core.Arango.DevExtreme.csproj +++ b/Core.Arango.DevExtreme/Core.Arango.DevExtreme.csproj @@ -22,8 +22,8 @@ - - + + diff --git a/Core.Arango.Migration.Tests/Core.Arango.Migration.Tests.csproj b/Core.Arango.Migration.Tests/Core.Arango.Migration.Tests.csproj index c0920a6..c5c62da 100644 --- a/Core.Arango.Migration.Tests/Core.Arango.Migration.Tests.csproj +++ b/Core.Arango.Migration.Tests/Core.Arango.Migration.Tests.csproj @@ -7,13 +7,13 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/Core.Arango.Migration/Core.Arango.Migration.csproj b/Core.Arango.Migration/Core.Arango.Migration.csproj index df3aa7e..93262f2 100644 --- a/Core.Arango.Migration/Core.Arango.Migration.csproj +++ b/Core.Arango.Migration/Core.Arango.Migration.csproj @@ -22,7 +22,7 @@ - + diff --git a/Core.Arango.Serilog/Core.Arango.Serilog.csproj b/Core.Arango.Serilog/Core.Arango.Serilog.csproj index 26d094d..78b1475 100644 --- a/Core.Arango.Serilog/Core.Arango.Serilog.csproj +++ b/Core.Arango.Serilog/Core.Arango.Serilog.csproj @@ -22,7 +22,7 @@ - +