Skip to content

Commit 2b6f342

Browse files
committed
group count fix?
1 parent 50057a4 commit 2b6f342

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Core.Arango.DevExtreme.Tests/Core.Arango.DevExtreme.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
1111
<PackageReference Include="xunit" Version="2.4.2" />
1212
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
1313
<PrivateAssets>all</PrivateAssets>

Core.Arango.DevExtreme/ArangoTransform.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,14 @@ public async Task<DxLoadResult> ExecuteAsync<T>(IArangoContext arango,
111111
var res = await arango.Query.ExecuteAsync<JObject>(handle, query, Parameter,
112112
cancellationToken: cancellationToken);
113113

114+
var groupData = BuildGrouping(this, res);
115+
114116
return new DxLoadResult
115117
{
116-
Data = BuildGrouping(this, res)
118+
Data = groupData,
119+
// Experimental
120+
TotalCount = _loadOption.RequireTotalCount ? groupData.Sum(x=> x.Count ?? 0) : -1,
121+
GroupCount = _loadOption.RequireGroupCount ? groupData.Count : -1,
117122
};
118123
}
119124
else
@@ -154,7 +159,7 @@ public async Task<DxLoadResult> ExecuteAsync<T>(IArangoContext arango,
154159
{
155160
Data = res,
156161
Summary = summary,
157-
TotalCount = res.FullCount ?? -1
162+
TotalCount = res.FullCount ?? -1,
158163
};
159164
}
160165
}

Core.Arango.Migration.Tests/Core.Arango.Migration.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
1111
<PackageReference Include="xunit" Version="2.4.2" />
1212
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

0 commit comments

Comments
 (0)