Skip to content

Commit

Permalink
new devexpress filter options
Browse files Browse the repository at this point in the history
  • Loading branch information
coronabytes committed Jul 22, 2023
1 parent baeb90d commit 2cd36a7
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Core.Arango" Version="3.10.0" />
<PackageReference Include="Core.Arango" Version="3.11.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DevExtreme.AspNet.Data" Version="2.9.1" />
<PackageReference Include="DevExtreme.AspNet.Data" Version="2.9.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
25 changes: 21 additions & 4 deletions Core.Arango.DevExtreme.Tests/TransformTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()));
}
}
}
6 changes: 6 additions & 0 deletions Core.Arango.DevExtreme/ArangoTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,19 @@ private string GetMatchingFilter(IList dxFilter, bool not = false)
break;
}
}

else
{
boundParam = CreateParameter(jv.Value);
}

break;
}
case JArray ja:
{
returnValue = $@"{property} IN {CreateParameter(ja)}";
break;
}
default:
{
var type = rawValue.GetType();
Expand Down
4 changes: 2 additions & 2 deletions Core.Arango.DevExtreme/Core.Arango.DevExtreme.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Core.Arango" Version="3.10.0" />
<PackageReference Include="DevExtreme.AspNet.Data" Version="2.9.1" />
<PackageReference Include="Core.Arango" Version="3.11.1" />
<PackageReference Include="DevExtreme.AspNet.Data" Version="2.9.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion Core.Arango.Migration/Core.Arango.Migration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Core.Arango" Version="3.10.0" />
<PackageReference Include="Core.Arango" Version="3.11.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Core.Arango.Serilog/Core.Arango.Serilog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Core.Arango" Version="3.10.0" />
<PackageReference Include="Core.Arango" Version="3.11.1" />
<PackageReference Include="Serilog.Sinks.PeriodicBatching" Version="3.1.0" />
</ItemGroup>

Expand Down

0 comments on commit 2cd36a7

Please sign in to comment.