diff --git a/.build/Build.Publish.cs b/.build/Build.Publish.cs index 1a7ea2f364d..9e7eca613f8 100644 --- a/.build/Build.Publish.cs +++ b/.build/Build.Publish.cs @@ -26,7 +26,7 @@ partial class Build .SetProject("src/Nitro/CommandLine/src/CommandLine") .SetOutput(PublishDirectory) .SetRuntime(RuntimeIdentifier) - .SetFramework("net10.0") + .SetFramework("net11.0") .SetConfiguration(Configuration) .SetSelfContained(true) .SetInformationalVersion(SemVersion) @@ -37,7 +37,7 @@ partial class Build .SetProperty("NitroIdentityClientId", NitroIdentityClientId) .SetProperty("NitroIdentityScopes", NitroIdentityScopes) .SetProperty("PublishAot", true) - .SetProperty("TargetFrameworks", "net10.0") + .SetProperty("TargetFrameworks", "net11.0") .SetProperty("RuntimeIdentifiers", RuntimeIdentifier)); }); diff --git a/.build/Helpers.cs b/.build/Helpers.cs index 68e1b9902f8..6a0eada34bf 100644 --- a/.build/Helpers.cs +++ b/.build/Helpers.cs @@ -82,7 +82,7 @@ public static IReadOnlyCollection DotNetBuildSonarSolution( var projectsArg = string.Join(" ", projects.Select(t => $"\"{t}\"")); - list.AddRange(DotNetTasks.DotNet($"sln \"{solutionFile}\" add {projectsArg}", workingDirectory)); + list.AddRange(DotNetTasks.DotNet($"sln \"{solutionFile}\" add {projectsArg} --include-references false", workingDirectory)); return list; } diff --git a/.devcontainer/backend/dockerfile b/.devcontainer/backend/dockerfile index 1f5547c0a08..8072796f0d6 100644 --- a/.devcontainer/backend/dockerfile +++ b/.devcontainer/backend/dockerfile @@ -25,14 +25,13 @@ EXPOSE 22 # Start SSH service CMD ["/usr/sbin/sshd", "-D"] -# Install .NET SDKs (6, 7, 8, 9, and 10) +# Install .NET SDKs (8, 9, 10, and 11) RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \ && chmod +x dotnet-install.sh \ - && ./dotnet-install.sh --channel 6.0 --install-dir /usr/share/dotnet \ - && ./dotnet-install.sh --channel 7.0 --install-dir /usr/share/dotnet \ && ./dotnet-install.sh --channel 8.0 --install-dir /usr/share/dotnet \ && ./dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet \ && ./dotnet-install.sh --channel 10.0 --install-dir /usr/share/dotnet \ + && ./dotnet-install.sh --channel 11.0 --install-dir /usr/share/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet # Install Node.js LTS diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 70b06ea520f..37e7da292a2 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -142,7 +142,7 @@ jobs: echo "Installing .NET..." curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh chmod +x dotnet-install.sh - ./dotnet-install.sh --channel 10.0 --install-dir $HOME/.dotnet + ./dotnet-install.sh --channel 11.0 --install-dir $HOME/.dotnet rm dotnet-install.sh echo "$HOME/.dotnet" >> $GITHUB_PATH export PATH="$HOME/.dotnet:$PATH" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 998734e78c3..332030b0ba0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,7 +165,7 @@ jobs: - name: Install .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 10.x + dotnet-version: 11.x - name: Generate Test Matrix run: dotnet run --project ./.build -- GenerateMatrix @@ -199,10 +199,11 @@ jobs: 8.x 9.x 10.x + 11.x - name: Run Build id: run-build - run: dotnet build ${{ matrix.path }} --framework net10.0 --verbosity q + run: dotnet build ${{ matrix.path }} --framework net11.0 --verbosity q timeout-minutes: 5 - name: Log in to Docker Hub @@ -223,7 +224,7 @@ jobs: run: > dotnet test ${{ matrix.path }} --collect:"XPlat Code Coverage;Format=opencover" - --framework net10.0 + --framework net11.0 --logger trx --no-build -- diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 1aa649abdd1..c8dfaa7f0bb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -36,6 +36,7 @@ jobs: 8.x 9.x 10.x + 11.x - name: Generate Test Matrix run: dotnet run --project ./.build -- GenerateMatrix @@ -68,10 +69,11 @@ jobs: 8.x 9.x 10.x + 11.x - name: Run Build id: run-build - run: dotnet build ${{ matrix.path }} --framework net10.0 --verbosity q + run: dotnet build ${{ matrix.path }} --framework net11.0 --verbosity q timeout-minutes: 5 - name: Log in to Docker Hub @@ -87,7 +89,7 @@ jobs: run: > dotnet test ${{ matrix.path }} --collect:"XPlat Code Coverage;Format=opencover" - --framework net10.0 + --framework net11.0 --logger trx --no-build --verbosity q diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee18792924b..88a2a77b628 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,7 @@ jobs: 8.x 9.x 10.x + 11.x - name: 🏷 Get the version from tag run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV @@ -127,7 +128,7 @@ jobs: - name: 🛠 Install .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 10.x + dotnet-version: 11.x - name: 🏷 Get the version from tag (Windows) if: runner.os == 'Windows' diff --git a/build.sh b/build.sh index 53474596450..2dbf0a7909d 100755 --- a/build.sh +++ b/build.sh @@ -44,6 +44,7 @@ else "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "8.0.416" --no-path "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "9.0.308" --no-path "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "10.0.102" --no-path + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "11.0.100-preview.2.26159.112" --no-path # If global.json exists, load expected version if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then diff --git a/global.json b/global.json index bb62055921f..11d901f6c42 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.102", + "version": "11.0.100-preview.2.26159.112", "rollForward": "latestMinor" } } diff --git a/src/CookieCrumble/src/CookieCrumble.Xunit/CookieCrumble.Xunit.csproj b/src/CookieCrumble/src/CookieCrumble.Xunit/CookieCrumble.Xunit.csproj index a55f8c5c0e7..6e4b87112e0 100644 --- a/src/CookieCrumble/src/CookieCrumble.Xunit/CookieCrumble.Xunit.csproj +++ b/src/CookieCrumble/src/CookieCrumble.Xunit/CookieCrumble.Xunit.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/CookieCrumble/src/CookieCrumble.Xunit3/CookieCrumble.Xunit3.csproj b/src/CookieCrumble/src/CookieCrumble.Xunit3/CookieCrumble.Xunit3.csproj index e53ced22b64..b56ff94931c 100644 --- a/src/CookieCrumble/src/CookieCrumble.Xunit3/CookieCrumble.Xunit3.csproj +++ b/src/CookieCrumble/src/CookieCrumble.Xunit3/CookieCrumble.Xunit3.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/CookieCrumble/src/CookieCrumble/Utilities/TestEnvironment.cs b/src/CookieCrumble/src/CookieCrumble/Utilities/TestEnvironment.cs index 5d8ccbb8f88..e20c81110b0 100644 --- a/src/CookieCrumble/src/CookieCrumble/Utilities/TestEnvironment.cs +++ b/src/CookieCrumble/src/CookieCrumble/Utilities/TestEnvironment.cs @@ -7,23 +7,64 @@ namespace CookieCrumble; /// public static class TestEnvironment { + // ReSharper disable InconsistentNaming + public const string NET8_0 = "NET8_0"; + public const string NET9_0 = "NET9_0"; + public const string NET10_0 = "NET10_0"; + public const string NET11_0 = "NET11_0"; + // ReSharper restore InconsistentNaming + #if NET8_0 /// /// The target framework identifier. /// - public const string TargetFramework = "NET8_0"; + public const string TargetFramework = NET8_0; #elif NET9_0 /// /// The target framework identifier. /// - public const string TargetFramework = "NET9_0"; + public const string TargetFramework = NET9_0; #elif NET10_0 /// /// The target framework identifier. /// - public const string TargetFramework = "NET10_0"; + public const string TargetFramework = NET10_0; +#elif NET11_0 + /// + /// The target framework identifier. + /// + public const string TargetFramework = NET11_0; #endif + /// + /// Returns a postfix for the snapshot name based on the target framework. + /// + /// + /// Postfix(["NET8_0", "NET9_0"], ["NET10_0"]) will return "NET8_0_NET9_0" if the target framework is + /// NET8_0 or NET9_0, "NET10_0" if the target framework is NET10_0, or null if + /// the target framework is NET11_0. + /// + /// + /// A list of target framework groups. Each group is a list of target frameworks that should share the same snapshot + /// postfix. + /// + /// + /// A postfix for the snapshot name based on the target framework, or null if the target framework does not match + /// any group. + /// + public static string? Postfix(params string[][] targetFrameworkGroups) + { + foreach (var group in targetFrameworkGroups) + { + if (group.Contains(TargetFramework)) + { + return string.Join("_", group); + } + } + + return null; + } + public static bool IsLocalEnvironment() { return !IsCIEnvironment(); diff --git a/src/Directory.Build.props b/src/Directory.Build.props index d4fe632b594..470756238b2 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -11,6 +11,11 @@ en + + true + $(Features);runtime-async=on + + true NU1901;NU1902;NU1903;NU1904;ASPDEPR004;ASPDEPR008 @@ -44,9 +49,9 @@ - net10.0; net9.0; net8.0 - net10.0; net9.0; net8.0; netstandard2.0 - net10.0; net9.0 + net11.0; net10.0; net9.0; net8.0 + net11.0; net10.0; net9.0; net8.0; netstandard2.0 + net11.0; net10.0; net9.0 diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 8cd41237df8..c18ab0235de 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -7,9 +7,10 @@ - - - + + + + @@ -82,6 +83,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/PagingHelperPostgreSqlNullableTests.cs b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/PagingHelperPostgreSqlNullableTests.cs index 2a053bb6bc2..6c9013061fe 100644 --- a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/PagingHelperPostgreSqlNullableTests.cs +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/PagingHelperPostgreSqlNullableTests.cs @@ -68,7 +68,7 @@ public async Task Paging_Nullable_Descending_Cursor_Value_NonNull() // Assert var snapshot = new Snapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" + postFix: TestEnvironment.TargetFramework == "NET10_0" || TestEnvironment.TargetFramework == "NET11_0" ? TestEnvironment.TargetFramework : null); snapshot.Add(page1); @@ -135,7 +135,7 @@ public async Task Paging_Nullable_Descending_Cursor_Value_Null() // Assert var snapshot = new Snapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" + postFix: TestEnvironment.TargetFramework == "NET10_0" || TestEnvironment.TargetFramework == "NET11_0" ? TestEnvironment.TargetFramework : null); snapshot.Add(page1); @@ -202,7 +202,7 @@ public async Task Paging_NullableReference_Descending_Cursor_Value_NonNull() // Assert var snapshot = new Snapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" + postFix: TestEnvironment.TargetFramework == "NET10_0" || TestEnvironment.TargetFramework == "NET11_0" ? TestEnvironment.TargetFramework : null); snapshot.Add(page1); @@ -269,7 +269,7 @@ public async Task Paging_NullableReference_Descending_Cursor_Value_Null() // Assert var snapshot = new Snapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" + postFix: TestEnvironment.TargetFramework == "NET10_0" || TestEnvironment.TargetFramework == "NET11_0" ? TestEnvironment.TargetFramework : null); snapshot.Add(page1); diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs_NET11_0.md new file mode 100644 index 00000000000..9e6906bccd4 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs_NET11_0.md @@ -0,0 +1,157 @@ +# Paging_Empty_PagingArgs + +## SQL 0 + +```sql +-- @p='11' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +ORDER BY b."Name", b."Id" +LIMIT @p +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Name).ThenBy(t => t.Id).Take(11) +``` + +## Result 3 + +```json +{ + "HasNextPage": true, + "HasPreviousPage": false, + "First": 1, + "FirstCursor": "e31CcmFuZFw6MDox", + "Last": 18, + "LastCursor": "e31CcmFuZFw6MTc6MTg=" +} +``` + +## Result 4 + +```json +[ + { + "Id": 1, + "Name": "Brand:0", + "DisplayName": "BrandDisplay0", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country0" + } + } + }, + { + "Id": 2, + "Name": "Brand:1", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country1" + } + } + }, + { + "Id": 11, + "Name": "Brand:10", + "DisplayName": "BrandDisplay10", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country10" + } + } + }, + { + "Id": 12, + "Name": "Brand:11", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country11" + } + } + }, + { + "Id": 13, + "Name": "Brand:12", + "DisplayName": "BrandDisplay12", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country12" + } + } + }, + { + "Id": 14, + "Name": "Brand:13", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country13" + } + } + }, + { + "Id": 15, + "Name": "Brand:14", + "DisplayName": "BrandDisplay14", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country14" + } + } + }, + { + "Id": 16, + "Name": "Brand:15", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country15" + } + } + }, + { + "Id": 17, + "Name": "Brand:16", + "DisplayName": "BrandDisplay16", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country16" + } + } + }, + { + "Id": 18, + "Name": "Brand:17", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country17" + } + } + } +] +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13_NET11_0.md new file mode 100644 index 00000000000..523d62543d2 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13_NET11_0.md @@ -0,0 +1,100 @@ +# Paging_First_5_After_Id_13 + +## SQL 0 + +```sql +-- @value='Brand12' +-- @value2='13' +-- @p='6' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +WHERE b."Name" > @value OR (b."Name" = @value AND b."Id" > @value2) +ORDER BY b."Name", b."Id" +LIMIT @p +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Name).ThenBy(t => t.Id).Where(t => ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) > 0) OrElse ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) == 0) AndAlso (t.Id.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.Int32]).value) > 0)))).Take(6) +``` + +## Result 3 + +```json +{ + "HasNextPage": true, + "HasPreviousPage": true, + "First": 14, + "FirstCursor": "e31CcmFuZFw6MTM6MTQ=", + "Last": 18, + "LastCursor": "e31CcmFuZFw6MTc6MTg=" +} +``` + +## Result 4 + +```json +[ + { + "Id": 14, + "Name": "Brand:13", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country13" + } + } + }, + { + "Id": 15, + "Name": "Brand:14", + "DisplayName": "BrandDisplay14", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country14" + } + } + }, + { + "Id": 16, + "Name": "Brand:15", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country15" + } + } + }, + { + "Id": 17, + "Name": "Brand:16", + "DisplayName": "BrandDisplay16", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country16" + } + } + }, + { + "Id": 18, + "Name": "Brand:17", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country17" + } + } + } +] +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96_NET11_0.md new file mode 100644 index 00000000000..54541548bc0 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96_NET11_0.md @@ -0,0 +1,100 @@ +# Paging_First_5_Before_Id_96 + +## SQL 0 + +```sql +-- @value='Brand95' +-- @value2='96' +-- @p='6' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +WHERE b."Name" < @value OR (b."Name" = @value AND b."Id" < @value2) +ORDER BY b."Name" DESC, b."Id" DESC +LIMIT @p +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderByDescending(t => t.Name).ThenByDescending(t => t.Id).Where(t => ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) < 0) OrElse ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) == 0) AndAlso (t.Id.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.Int32]).value) < 0)))).Take(6) +``` + +## Result 3 + +```json +{ + "HasNextPage": true, + "HasPreviousPage": true, + "First": 92, + "FirstCursor": "e31CcmFuZFw6OTE6OTI=", + "Last": 96, + "LastCursor": "e31CcmFuZFw6OTU6OTY=" +} +``` + +## Result 4 + +```json +[ + { + "Id": 92, + "Name": "Brand:91", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country91" + } + } + }, + { + "Id": 93, + "Name": "Brand:92", + "DisplayName": "BrandDisplay92", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country92" + } + } + }, + { + "Id": 94, + "Name": "Brand:93", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country93" + } + } + }, + { + "Id": 95, + "Name": "Brand:94", + "DisplayName": "BrandDisplay94", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country94" + } + } + }, + { + "Id": 96, + "Name": "Brand:95", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country95" + } + } + } +] +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_NET10_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_NET11_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_NET10_0.md rename to src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_NET11_0.md diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5_NET11_0.md new file mode 100644 index 00000000000..62fc929f0d1 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5_NET11_0.md @@ -0,0 +1,99 @@ +# Paging_Last_5 + +## SQL 0 + +```sql +-- @p='6' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +ORDER BY b."Name" DESC, b."Id" DESC +LIMIT @p +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderByDescending(t => t.Name).ThenByDescending(t => t.Id).Take(6) +``` + +## Result 3 + +```json +{ + "HasNextPage": false, + "HasPreviousPage": true, + "First": 96, + "FirstName": "Brand:95", + "FirstCursor": "e31CcmFuZFw6OTU6OTY=", + "Last": 100, + "LastName": "Brand:99", + "LastCursor": "e31CcmFuZFw6OTk6MTAw" +} +``` + +## Result 4 + +```json +[ + { + "Id": 96, + "Name": "Brand:95", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country95" + } + } + }, + { + "Id": 97, + "Name": "Brand:96", + "DisplayName": "BrandDisplay96", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country96" + } + } + }, + { + "Id": 98, + "Name": "Brand:97", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country97" + } + } + }, + { + "Id": 99, + "Name": "Brand:98", + "DisplayName": "BrandDisplay98", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country98" + } + } + }, + { + "Id": 100, + "Name": "Brand:99", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country99" + } + } + } +] +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_WithChildCollectionProjectionExpression_First_5_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_WithChildCollectionProjectionExpression_First_5_NET11_0.md new file mode 100644 index 00000000000..3ba49c728ef --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_WithChildCollectionProjectionExpression_First_5_NET11_0.md @@ -0,0 +1,2072 @@ +# Paging_WithChildCollectionProjectionExpression_First_5 + +## SQL 0 + +```sql +-- @p='6' +SELECT b0."Id", b0."Name", p."Id", p."Name" +FROM ( + SELECT b."Id", b."Name" + FROM "Brands" AS b + ORDER BY b."Name", b."Id" + LIMIT @p +) AS b0 +LEFT JOIN "Products" AS p ON b0."Id" = p."BrandId" +ORDER BY b0."Name", b0."Id" +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].Select(brand => new BrandWithProductsDto() {Id = brand.Id, Name = brand.Name, Products = brand.Products.AsQueryable().Select(ProductDto.Projection).ToList()}).OrderBy(t => t.Name).ThenBy(t => t.Id).Take(6) +``` + +## Result 3 + +```json +{ + "HasNextPage": true, + "HasPreviousPage": false, + "First": 1, + "FirstCursor": "e31CcmFuZFw6MDox", + "Last": 13, + "LastCursor": "e31CcmFuZFw6MTI6MTM=" +} +``` + +## Result 4 + +```json +[ + { + "Id": 1, + "Name": "Brand:0", + "Products": [ + { + "Id": 1, + "Name": "Product 0-0" + }, + { + "Id": 2, + "Name": "Product 0-1" + }, + { + "Id": 3, + "Name": "Product 0-2" + }, + { + "Id": 4, + "Name": "Product 0-3" + }, + { + "Id": 5, + "Name": "Product 0-4" + }, + { + "Id": 6, + "Name": "Product 0-5" + }, + { + "Id": 7, + "Name": "Product 0-6" + }, + { + "Id": 8, + "Name": "Product 0-7" + }, + { + "Id": 9, + "Name": "Product 0-8" + }, + { + "Id": 10, + "Name": "Product 0-9" + }, + { + "Id": 11, + "Name": "Product 0-10" + }, + { + "Id": 12, + "Name": "Product 0-11" + }, + { + "Id": 13, + "Name": "Product 0-12" + }, + { + "Id": 14, + "Name": "Product 0-13" + }, + { + "Id": 15, + "Name": "Product 0-14" + }, + { + "Id": 16, + "Name": "Product 0-15" + }, + { + "Id": 17, + "Name": "Product 0-16" + }, + { + "Id": 18, + "Name": "Product 0-17" + }, + { + "Id": 19, + "Name": "Product 0-18" + }, + { + "Id": 20, + "Name": "Product 0-19" + }, + { + "Id": 21, + "Name": "Product 0-20" + }, + { + "Id": 22, + "Name": "Product 0-21" + }, + { + "Id": 23, + "Name": "Product 0-22" + }, + { + "Id": 24, + "Name": "Product 0-23" + }, + { + "Id": 25, + "Name": "Product 0-24" + }, + { + "Id": 26, + "Name": "Product 0-25" + }, + { + "Id": 27, + "Name": "Product 0-26" + }, + { + "Id": 28, + "Name": "Product 0-27" + }, + { + "Id": 29, + "Name": "Product 0-28" + }, + { + "Id": 30, + "Name": "Product 0-29" + }, + { + "Id": 31, + "Name": "Product 0-30" + }, + { + "Id": 32, + "Name": "Product 0-31" + }, + { + "Id": 33, + "Name": "Product 0-32" + }, + { + "Id": 34, + "Name": "Product 0-33" + }, + { + "Id": 35, + "Name": "Product 0-34" + }, + { + "Id": 36, + "Name": "Product 0-35" + }, + { + "Id": 37, + "Name": "Product 0-36" + }, + { + "Id": 38, + "Name": "Product 0-37" + }, + { + "Id": 39, + "Name": "Product 0-38" + }, + { + "Id": 40, + "Name": "Product 0-39" + }, + { + "Id": 41, + "Name": "Product 0-40" + }, + { + "Id": 42, + "Name": "Product 0-41" + }, + { + "Id": 43, + "Name": "Product 0-42" + }, + { + "Id": 44, + "Name": "Product 0-43" + }, + { + "Id": 45, + "Name": "Product 0-44" + }, + { + "Id": 46, + "Name": "Product 0-45" + }, + { + "Id": 47, + "Name": "Product 0-46" + }, + { + "Id": 48, + "Name": "Product 0-47" + }, + { + "Id": 49, + "Name": "Product 0-48" + }, + { + "Id": 50, + "Name": "Product 0-49" + }, + { + "Id": 51, + "Name": "Product 0-50" + }, + { + "Id": 52, + "Name": "Product 0-51" + }, + { + "Id": 53, + "Name": "Product 0-52" + }, + { + "Id": 54, + "Name": "Product 0-53" + }, + { + "Id": 55, + "Name": "Product 0-54" + }, + { + "Id": 56, + "Name": "Product 0-55" + }, + { + "Id": 57, + "Name": "Product 0-56" + }, + { + "Id": 58, + "Name": "Product 0-57" + }, + { + "Id": 59, + "Name": "Product 0-58" + }, + { + "Id": 60, + "Name": "Product 0-59" + }, + { + "Id": 61, + "Name": "Product 0-60" + }, + { + "Id": 62, + "Name": "Product 0-61" + }, + { + "Id": 63, + "Name": "Product 0-62" + }, + { + "Id": 64, + "Name": "Product 0-63" + }, + { + "Id": 65, + "Name": "Product 0-64" + }, + { + "Id": 66, + "Name": "Product 0-65" + }, + { + "Id": 67, + "Name": "Product 0-66" + }, + { + "Id": 68, + "Name": "Product 0-67" + }, + { + "Id": 69, + "Name": "Product 0-68" + }, + { + "Id": 70, + "Name": "Product 0-69" + }, + { + "Id": 71, + "Name": "Product 0-70" + }, + { + "Id": 72, + "Name": "Product 0-71" + }, + { + "Id": 73, + "Name": "Product 0-72" + }, + { + "Id": 74, + "Name": "Product 0-73" + }, + { + "Id": 75, + "Name": "Product 0-74" + }, + { + "Id": 76, + "Name": "Product 0-75" + }, + { + "Id": 77, + "Name": "Product 0-76" + }, + { + "Id": 78, + "Name": "Product 0-77" + }, + { + "Id": 79, + "Name": "Product 0-78" + }, + { + "Id": 80, + "Name": "Product 0-79" + }, + { + "Id": 81, + "Name": "Product 0-80" + }, + { + "Id": 82, + "Name": "Product 0-81" + }, + { + "Id": 83, + "Name": "Product 0-82" + }, + { + "Id": 84, + "Name": "Product 0-83" + }, + { + "Id": 85, + "Name": "Product 0-84" + }, + { + "Id": 86, + "Name": "Product 0-85" + }, + { + "Id": 87, + "Name": "Product 0-86" + }, + { + "Id": 88, + "Name": "Product 0-87" + }, + { + "Id": 89, + "Name": "Product 0-88" + }, + { + "Id": 90, + "Name": "Product 0-89" + }, + { + "Id": 91, + "Name": "Product 0-90" + }, + { + "Id": 92, + "Name": "Product 0-91" + }, + { + "Id": 93, + "Name": "Product 0-92" + }, + { + "Id": 94, + "Name": "Product 0-93" + }, + { + "Id": 95, + "Name": "Product 0-94" + }, + { + "Id": 96, + "Name": "Product 0-95" + }, + { + "Id": 97, + "Name": "Product 0-96" + }, + { + "Id": 98, + "Name": "Product 0-97" + }, + { + "Id": 99, + "Name": "Product 0-98" + }, + { + "Id": 100, + "Name": "Product 0-99" + } + ] + }, + { + "Id": 2, + "Name": "Brand:1", + "Products": [ + { + "Id": 101, + "Name": "Product 1-0" + }, + { + "Id": 102, + "Name": "Product 1-1" + }, + { + "Id": 103, + "Name": "Product 1-2" + }, + { + "Id": 104, + "Name": "Product 1-3" + }, + { + "Id": 105, + "Name": "Product 1-4" + }, + { + "Id": 106, + "Name": "Product 1-5" + }, + { + "Id": 107, + "Name": "Product 1-6" + }, + { + "Id": 108, + "Name": "Product 1-7" + }, + { + "Id": 109, + "Name": "Product 1-8" + }, + { + "Id": 110, + "Name": "Product 1-9" + }, + { + "Id": 111, + "Name": "Product 1-10" + }, + { + "Id": 112, + "Name": "Product 1-11" + }, + { + "Id": 113, + "Name": "Product 1-12" + }, + { + "Id": 114, + "Name": "Product 1-13" + }, + { + "Id": 115, + "Name": "Product 1-14" + }, + { + "Id": 116, + "Name": "Product 1-15" + }, + { + "Id": 117, + "Name": "Product 1-16" + }, + { + "Id": 118, + "Name": "Product 1-17" + }, + { + "Id": 119, + "Name": "Product 1-18" + }, + { + "Id": 120, + "Name": "Product 1-19" + }, + { + "Id": 121, + "Name": "Product 1-20" + }, + { + "Id": 122, + "Name": "Product 1-21" + }, + { + "Id": 123, + "Name": "Product 1-22" + }, + { + "Id": 124, + "Name": "Product 1-23" + }, + { + "Id": 125, + "Name": "Product 1-24" + }, + { + "Id": 126, + "Name": "Product 1-25" + }, + { + "Id": 127, + "Name": "Product 1-26" + }, + { + "Id": 128, + "Name": "Product 1-27" + }, + { + "Id": 129, + "Name": "Product 1-28" + }, + { + "Id": 130, + "Name": "Product 1-29" + }, + { + "Id": 131, + "Name": "Product 1-30" + }, + { + "Id": 132, + "Name": "Product 1-31" + }, + { + "Id": 133, + "Name": "Product 1-32" + }, + { + "Id": 134, + "Name": "Product 1-33" + }, + { + "Id": 135, + "Name": "Product 1-34" + }, + { + "Id": 136, + "Name": "Product 1-35" + }, + { + "Id": 137, + "Name": "Product 1-36" + }, + { + "Id": 138, + "Name": "Product 1-37" + }, + { + "Id": 139, + "Name": "Product 1-38" + }, + { + "Id": 140, + "Name": "Product 1-39" + }, + { + "Id": 141, + "Name": "Product 1-40" + }, + { + "Id": 142, + "Name": "Product 1-41" + }, + { + "Id": 143, + "Name": "Product 1-42" + }, + { + "Id": 144, + "Name": "Product 1-43" + }, + { + "Id": 145, + "Name": "Product 1-44" + }, + { + "Id": 146, + "Name": "Product 1-45" + }, + { + "Id": 147, + "Name": "Product 1-46" + }, + { + "Id": 148, + "Name": "Product 1-47" + }, + { + "Id": 149, + "Name": "Product 1-48" + }, + { + "Id": 150, + "Name": "Product 1-49" + }, + { + "Id": 151, + "Name": "Product 1-50" + }, + { + "Id": 152, + "Name": "Product 1-51" + }, + { + "Id": 153, + "Name": "Product 1-52" + }, + { + "Id": 154, + "Name": "Product 1-53" + }, + { + "Id": 155, + "Name": "Product 1-54" + }, + { + "Id": 156, + "Name": "Product 1-55" + }, + { + "Id": 157, + "Name": "Product 1-56" + }, + { + "Id": 158, + "Name": "Product 1-57" + }, + { + "Id": 159, + "Name": "Product 1-58" + }, + { + "Id": 160, + "Name": "Product 1-59" + }, + { + "Id": 161, + "Name": "Product 1-60" + }, + { + "Id": 162, + "Name": "Product 1-61" + }, + { + "Id": 163, + "Name": "Product 1-62" + }, + { + "Id": 164, + "Name": "Product 1-63" + }, + { + "Id": 165, + "Name": "Product 1-64" + }, + { + "Id": 166, + "Name": "Product 1-65" + }, + { + "Id": 167, + "Name": "Product 1-66" + }, + { + "Id": 168, + "Name": "Product 1-67" + }, + { + "Id": 169, + "Name": "Product 1-68" + }, + { + "Id": 170, + "Name": "Product 1-69" + }, + { + "Id": 171, + "Name": "Product 1-70" + }, + { + "Id": 172, + "Name": "Product 1-71" + }, + { + "Id": 173, + "Name": "Product 1-72" + }, + { + "Id": 174, + "Name": "Product 1-73" + }, + { + "Id": 175, + "Name": "Product 1-74" + }, + { + "Id": 176, + "Name": "Product 1-75" + }, + { + "Id": 177, + "Name": "Product 1-76" + }, + { + "Id": 178, + "Name": "Product 1-77" + }, + { + "Id": 179, + "Name": "Product 1-78" + }, + { + "Id": 180, + "Name": "Product 1-79" + }, + { + "Id": 181, + "Name": "Product 1-80" + }, + { + "Id": 182, + "Name": "Product 1-81" + }, + { + "Id": 183, + "Name": "Product 1-82" + }, + { + "Id": 184, + "Name": "Product 1-83" + }, + { + "Id": 185, + "Name": "Product 1-84" + }, + { + "Id": 186, + "Name": "Product 1-85" + }, + { + "Id": 187, + "Name": "Product 1-86" + }, + { + "Id": 188, + "Name": "Product 1-87" + }, + { + "Id": 189, + "Name": "Product 1-88" + }, + { + "Id": 190, + "Name": "Product 1-89" + }, + { + "Id": 191, + "Name": "Product 1-90" + }, + { + "Id": 192, + "Name": "Product 1-91" + }, + { + "Id": 193, + "Name": "Product 1-92" + }, + { + "Id": 194, + "Name": "Product 1-93" + }, + { + "Id": 195, + "Name": "Product 1-94" + }, + { + "Id": 196, + "Name": "Product 1-95" + }, + { + "Id": 197, + "Name": "Product 1-96" + }, + { + "Id": 198, + "Name": "Product 1-97" + }, + { + "Id": 199, + "Name": "Product 1-98" + }, + { + "Id": 200, + "Name": "Product 1-99" + } + ] + }, + { + "Id": 11, + "Name": "Brand:10", + "Products": [ + { + "Id": 1001, + "Name": "Product 10-0" + }, + { + "Id": 1002, + "Name": "Product 10-1" + }, + { + "Id": 1003, + "Name": "Product 10-2" + }, + { + "Id": 1004, + "Name": "Product 10-3" + }, + { + "Id": 1005, + "Name": "Product 10-4" + }, + { + "Id": 1006, + "Name": "Product 10-5" + }, + { + "Id": 1007, + "Name": "Product 10-6" + }, + { + "Id": 1008, + "Name": "Product 10-7" + }, + { + "Id": 1009, + "Name": "Product 10-8" + }, + { + "Id": 1010, + "Name": "Product 10-9" + }, + { + "Id": 1011, + "Name": "Product 10-10" + }, + { + "Id": 1012, + "Name": "Product 10-11" + }, + { + "Id": 1013, + "Name": "Product 10-12" + }, + { + "Id": 1014, + "Name": "Product 10-13" + }, + { + "Id": 1015, + "Name": "Product 10-14" + }, + { + "Id": 1016, + "Name": "Product 10-15" + }, + { + "Id": 1017, + "Name": "Product 10-16" + }, + { + "Id": 1018, + "Name": "Product 10-17" + }, + { + "Id": 1019, + "Name": "Product 10-18" + }, + { + "Id": 1020, + "Name": "Product 10-19" + }, + { + "Id": 1021, + "Name": "Product 10-20" + }, + { + "Id": 1022, + "Name": "Product 10-21" + }, + { + "Id": 1023, + "Name": "Product 10-22" + }, + { + "Id": 1024, + "Name": "Product 10-23" + }, + { + "Id": 1025, + "Name": "Product 10-24" + }, + { + "Id": 1026, + "Name": "Product 10-25" + }, + { + "Id": 1027, + "Name": "Product 10-26" + }, + { + "Id": 1028, + "Name": "Product 10-27" + }, + { + "Id": 1029, + "Name": "Product 10-28" + }, + { + "Id": 1030, + "Name": "Product 10-29" + }, + { + "Id": 1031, + "Name": "Product 10-30" + }, + { + "Id": 1032, + "Name": "Product 10-31" + }, + { + "Id": 1033, + "Name": "Product 10-32" + }, + { + "Id": 1034, + "Name": "Product 10-33" + }, + { + "Id": 1035, + "Name": "Product 10-34" + }, + { + "Id": 1036, + "Name": "Product 10-35" + }, + { + "Id": 1037, + "Name": "Product 10-36" + }, + { + "Id": 1038, + "Name": "Product 10-37" + }, + { + "Id": 1039, + "Name": "Product 10-38" + }, + { + "Id": 1040, + "Name": "Product 10-39" + }, + { + "Id": 1041, + "Name": "Product 10-40" + }, + { + "Id": 1042, + "Name": "Product 10-41" + }, + { + "Id": 1043, + "Name": "Product 10-42" + }, + { + "Id": 1044, + "Name": "Product 10-43" + }, + { + "Id": 1045, + "Name": "Product 10-44" + }, + { + "Id": 1046, + "Name": "Product 10-45" + }, + { + "Id": 1047, + "Name": "Product 10-46" + }, + { + "Id": 1048, + "Name": "Product 10-47" + }, + { + "Id": 1049, + "Name": "Product 10-48" + }, + { + "Id": 1050, + "Name": "Product 10-49" + }, + { + "Id": 1051, + "Name": "Product 10-50" + }, + { + "Id": 1052, + "Name": "Product 10-51" + }, + { + "Id": 1053, + "Name": "Product 10-52" + }, + { + "Id": 1054, + "Name": "Product 10-53" + }, + { + "Id": 1055, + "Name": "Product 10-54" + }, + { + "Id": 1056, + "Name": "Product 10-55" + }, + { + "Id": 1057, + "Name": "Product 10-56" + }, + { + "Id": 1058, + "Name": "Product 10-57" + }, + { + "Id": 1059, + "Name": "Product 10-58" + }, + { + "Id": 1060, + "Name": "Product 10-59" + }, + { + "Id": 1061, + "Name": "Product 10-60" + }, + { + "Id": 1062, + "Name": "Product 10-61" + }, + { + "Id": 1063, + "Name": "Product 10-62" + }, + { + "Id": 1064, + "Name": "Product 10-63" + }, + { + "Id": 1065, + "Name": "Product 10-64" + }, + { + "Id": 1066, + "Name": "Product 10-65" + }, + { + "Id": 1067, + "Name": "Product 10-66" + }, + { + "Id": 1068, + "Name": "Product 10-67" + }, + { + "Id": 1069, + "Name": "Product 10-68" + }, + { + "Id": 1070, + "Name": "Product 10-69" + }, + { + "Id": 1071, + "Name": "Product 10-70" + }, + { + "Id": 1072, + "Name": "Product 10-71" + }, + { + "Id": 1073, + "Name": "Product 10-72" + }, + { + "Id": 1074, + "Name": "Product 10-73" + }, + { + "Id": 1075, + "Name": "Product 10-74" + }, + { + "Id": 1076, + "Name": "Product 10-75" + }, + { + "Id": 1077, + "Name": "Product 10-76" + }, + { + "Id": 1078, + "Name": "Product 10-77" + }, + { + "Id": 1079, + "Name": "Product 10-78" + }, + { + "Id": 1080, + "Name": "Product 10-79" + }, + { + "Id": 1081, + "Name": "Product 10-80" + }, + { + "Id": 1082, + "Name": "Product 10-81" + }, + { + "Id": 1083, + "Name": "Product 10-82" + }, + { + "Id": 1084, + "Name": "Product 10-83" + }, + { + "Id": 1085, + "Name": "Product 10-84" + }, + { + "Id": 1086, + "Name": "Product 10-85" + }, + { + "Id": 1087, + "Name": "Product 10-86" + }, + { + "Id": 1088, + "Name": "Product 10-87" + }, + { + "Id": 1089, + "Name": "Product 10-88" + }, + { + "Id": 1090, + "Name": "Product 10-89" + }, + { + "Id": 1091, + "Name": "Product 10-90" + }, + { + "Id": 1092, + "Name": "Product 10-91" + }, + { + "Id": 1093, + "Name": "Product 10-92" + }, + { + "Id": 1094, + "Name": "Product 10-93" + }, + { + "Id": 1095, + "Name": "Product 10-94" + }, + { + "Id": 1096, + "Name": "Product 10-95" + }, + { + "Id": 1097, + "Name": "Product 10-96" + }, + { + "Id": 1098, + "Name": "Product 10-97" + }, + { + "Id": 1099, + "Name": "Product 10-98" + }, + { + "Id": 1100, + "Name": "Product 10-99" + } + ] + }, + { + "Id": 12, + "Name": "Brand:11", + "Products": [ + { + "Id": 1101, + "Name": "Product 11-0" + }, + { + "Id": 1102, + "Name": "Product 11-1" + }, + { + "Id": 1103, + "Name": "Product 11-2" + }, + { + "Id": 1104, + "Name": "Product 11-3" + }, + { + "Id": 1105, + "Name": "Product 11-4" + }, + { + "Id": 1106, + "Name": "Product 11-5" + }, + { + "Id": 1107, + "Name": "Product 11-6" + }, + { + "Id": 1108, + "Name": "Product 11-7" + }, + { + "Id": 1109, + "Name": "Product 11-8" + }, + { + "Id": 1110, + "Name": "Product 11-9" + }, + { + "Id": 1111, + "Name": "Product 11-10" + }, + { + "Id": 1112, + "Name": "Product 11-11" + }, + { + "Id": 1113, + "Name": "Product 11-12" + }, + { + "Id": 1114, + "Name": "Product 11-13" + }, + { + "Id": 1115, + "Name": "Product 11-14" + }, + { + "Id": 1116, + "Name": "Product 11-15" + }, + { + "Id": 1117, + "Name": "Product 11-16" + }, + { + "Id": 1118, + "Name": "Product 11-17" + }, + { + "Id": 1119, + "Name": "Product 11-18" + }, + { + "Id": 1120, + "Name": "Product 11-19" + }, + { + "Id": 1121, + "Name": "Product 11-20" + }, + { + "Id": 1122, + "Name": "Product 11-21" + }, + { + "Id": 1123, + "Name": "Product 11-22" + }, + { + "Id": 1124, + "Name": "Product 11-23" + }, + { + "Id": 1125, + "Name": "Product 11-24" + }, + { + "Id": 1126, + "Name": "Product 11-25" + }, + { + "Id": 1127, + "Name": "Product 11-26" + }, + { + "Id": 1128, + "Name": "Product 11-27" + }, + { + "Id": 1129, + "Name": "Product 11-28" + }, + { + "Id": 1130, + "Name": "Product 11-29" + }, + { + "Id": 1131, + "Name": "Product 11-30" + }, + { + "Id": 1132, + "Name": "Product 11-31" + }, + { + "Id": 1133, + "Name": "Product 11-32" + }, + { + "Id": 1134, + "Name": "Product 11-33" + }, + { + "Id": 1135, + "Name": "Product 11-34" + }, + { + "Id": 1136, + "Name": "Product 11-35" + }, + { + "Id": 1137, + "Name": "Product 11-36" + }, + { + "Id": 1138, + "Name": "Product 11-37" + }, + { + "Id": 1139, + "Name": "Product 11-38" + }, + { + "Id": 1140, + "Name": "Product 11-39" + }, + { + "Id": 1141, + "Name": "Product 11-40" + }, + { + "Id": 1142, + "Name": "Product 11-41" + }, + { + "Id": 1143, + "Name": "Product 11-42" + }, + { + "Id": 1144, + "Name": "Product 11-43" + }, + { + "Id": 1145, + "Name": "Product 11-44" + }, + { + "Id": 1146, + "Name": "Product 11-45" + }, + { + "Id": 1147, + "Name": "Product 11-46" + }, + { + "Id": 1148, + "Name": "Product 11-47" + }, + { + "Id": 1149, + "Name": "Product 11-48" + }, + { + "Id": 1150, + "Name": "Product 11-49" + }, + { + "Id": 1151, + "Name": "Product 11-50" + }, + { + "Id": 1152, + "Name": "Product 11-51" + }, + { + "Id": 1153, + "Name": "Product 11-52" + }, + { + "Id": 1154, + "Name": "Product 11-53" + }, + { + "Id": 1155, + "Name": "Product 11-54" + }, + { + "Id": 1156, + "Name": "Product 11-55" + }, + { + "Id": 1157, + "Name": "Product 11-56" + }, + { + "Id": 1158, + "Name": "Product 11-57" + }, + { + "Id": 1159, + "Name": "Product 11-58" + }, + { + "Id": 1160, + "Name": "Product 11-59" + }, + { + "Id": 1161, + "Name": "Product 11-60" + }, + { + "Id": 1162, + "Name": "Product 11-61" + }, + { + "Id": 1163, + "Name": "Product 11-62" + }, + { + "Id": 1164, + "Name": "Product 11-63" + }, + { + "Id": 1165, + "Name": "Product 11-64" + }, + { + "Id": 1166, + "Name": "Product 11-65" + }, + { + "Id": 1167, + "Name": "Product 11-66" + }, + { + "Id": 1168, + "Name": "Product 11-67" + }, + { + "Id": 1169, + "Name": "Product 11-68" + }, + { + "Id": 1170, + "Name": "Product 11-69" + }, + { + "Id": 1171, + "Name": "Product 11-70" + }, + { + "Id": 1172, + "Name": "Product 11-71" + }, + { + "Id": 1173, + "Name": "Product 11-72" + }, + { + "Id": 1174, + "Name": "Product 11-73" + }, + { + "Id": 1175, + "Name": "Product 11-74" + }, + { + "Id": 1176, + "Name": "Product 11-75" + }, + { + "Id": 1177, + "Name": "Product 11-76" + }, + { + "Id": 1178, + "Name": "Product 11-77" + }, + { + "Id": 1179, + "Name": "Product 11-78" + }, + { + "Id": 1180, + "Name": "Product 11-79" + }, + { + "Id": 1181, + "Name": "Product 11-80" + }, + { + "Id": 1182, + "Name": "Product 11-81" + }, + { + "Id": 1183, + "Name": "Product 11-82" + }, + { + "Id": 1184, + "Name": "Product 11-83" + }, + { + "Id": 1185, + "Name": "Product 11-84" + }, + { + "Id": 1186, + "Name": "Product 11-85" + }, + { + "Id": 1187, + "Name": "Product 11-86" + }, + { + "Id": 1188, + "Name": "Product 11-87" + }, + { + "Id": 1189, + "Name": "Product 11-88" + }, + { + "Id": 1190, + "Name": "Product 11-89" + }, + { + "Id": 1191, + "Name": "Product 11-90" + }, + { + "Id": 1192, + "Name": "Product 11-91" + }, + { + "Id": 1193, + "Name": "Product 11-92" + }, + { + "Id": 1194, + "Name": "Product 11-93" + }, + { + "Id": 1195, + "Name": "Product 11-94" + }, + { + "Id": 1196, + "Name": "Product 11-95" + }, + { + "Id": 1197, + "Name": "Product 11-96" + }, + { + "Id": 1198, + "Name": "Product 11-97" + }, + { + "Id": 1199, + "Name": "Product 11-98" + }, + { + "Id": 1200, + "Name": "Product 11-99" + } + ] + }, + { + "Id": 13, + "Name": "Brand:12", + "Products": [ + { + "Id": 1201, + "Name": "Product 12-0" + }, + { + "Id": 1202, + "Name": "Product 12-1" + }, + { + "Id": 1203, + "Name": "Product 12-2" + }, + { + "Id": 1204, + "Name": "Product 12-3" + }, + { + "Id": 1205, + "Name": "Product 12-4" + }, + { + "Id": 1206, + "Name": "Product 12-5" + }, + { + "Id": 1207, + "Name": "Product 12-6" + }, + { + "Id": 1208, + "Name": "Product 12-7" + }, + { + "Id": 1209, + "Name": "Product 12-8" + }, + { + "Id": 1210, + "Name": "Product 12-9" + }, + { + "Id": 1211, + "Name": "Product 12-10" + }, + { + "Id": 1212, + "Name": "Product 12-11" + }, + { + "Id": 1213, + "Name": "Product 12-12" + }, + { + "Id": 1214, + "Name": "Product 12-13" + }, + { + "Id": 1215, + "Name": "Product 12-14" + }, + { + "Id": 1216, + "Name": "Product 12-15" + }, + { + "Id": 1217, + "Name": "Product 12-16" + }, + { + "Id": 1218, + "Name": "Product 12-17" + }, + { + "Id": 1219, + "Name": "Product 12-18" + }, + { + "Id": 1220, + "Name": "Product 12-19" + }, + { + "Id": 1221, + "Name": "Product 12-20" + }, + { + "Id": 1222, + "Name": "Product 12-21" + }, + { + "Id": 1223, + "Name": "Product 12-22" + }, + { + "Id": 1224, + "Name": "Product 12-23" + }, + { + "Id": 1225, + "Name": "Product 12-24" + }, + { + "Id": 1226, + "Name": "Product 12-25" + }, + { + "Id": 1227, + "Name": "Product 12-26" + }, + { + "Id": 1228, + "Name": "Product 12-27" + }, + { + "Id": 1229, + "Name": "Product 12-28" + }, + { + "Id": 1230, + "Name": "Product 12-29" + }, + { + "Id": 1231, + "Name": "Product 12-30" + }, + { + "Id": 1232, + "Name": "Product 12-31" + }, + { + "Id": 1233, + "Name": "Product 12-32" + }, + { + "Id": 1234, + "Name": "Product 12-33" + }, + { + "Id": 1235, + "Name": "Product 12-34" + }, + { + "Id": 1236, + "Name": "Product 12-35" + }, + { + "Id": 1237, + "Name": "Product 12-36" + }, + { + "Id": 1238, + "Name": "Product 12-37" + }, + { + "Id": 1239, + "Name": "Product 12-38" + }, + { + "Id": 1240, + "Name": "Product 12-39" + }, + { + "Id": 1241, + "Name": "Product 12-40" + }, + { + "Id": 1242, + "Name": "Product 12-41" + }, + { + "Id": 1243, + "Name": "Product 12-42" + }, + { + "Id": 1244, + "Name": "Product 12-43" + }, + { + "Id": 1245, + "Name": "Product 12-44" + }, + { + "Id": 1246, + "Name": "Product 12-45" + }, + { + "Id": 1247, + "Name": "Product 12-46" + }, + { + "Id": 1248, + "Name": "Product 12-47" + }, + { + "Id": 1249, + "Name": "Product 12-48" + }, + { + "Id": 1250, + "Name": "Product 12-49" + }, + { + "Id": 1251, + "Name": "Product 12-50" + }, + { + "Id": 1252, + "Name": "Product 12-51" + }, + { + "Id": 1253, + "Name": "Product 12-52" + }, + { + "Id": 1254, + "Name": "Product 12-53" + }, + { + "Id": 1255, + "Name": "Product 12-54" + }, + { + "Id": 1256, + "Name": "Product 12-55" + }, + { + "Id": 1257, + "Name": "Product 12-56" + }, + { + "Id": 1258, + "Name": "Product 12-57" + }, + { + "Id": 1259, + "Name": "Product 12-58" + }, + { + "Id": 1260, + "Name": "Product 12-59" + }, + { + "Id": 1261, + "Name": "Product 12-60" + }, + { + "Id": 1262, + "Name": "Product 12-61" + }, + { + "Id": 1263, + "Name": "Product 12-62" + }, + { + "Id": 1264, + "Name": "Product 12-63" + }, + { + "Id": 1265, + "Name": "Product 12-64" + }, + { + "Id": 1266, + "Name": "Product 12-65" + }, + { + "Id": 1267, + "Name": "Product 12-66" + }, + { + "Id": 1268, + "Name": "Product 12-67" + }, + { + "Id": 1269, + "Name": "Product 12-68" + }, + { + "Id": 1270, + "Name": "Product 12-69" + }, + { + "Id": 1271, + "Name": "Product 12-70" + }, + { + "Id": 1272, + "Name": "Product 12-71" + }, + { + "Id": 1273, + "Name": "Product 12-72" + }, + { + "Id": 1274, + "Name": "Product 12-73" + }, + { + "Id": 1275, + "Name": "Product 12-74" + }, + { + "Id": 1276, + "Name": "Product 12-75" + }, + { + "Id": 1277, + "Name": "Product 12-76" + }, + { + "Id": 1278, + "Name": "Product 12-77" + }, + { + "Id": 1279, + "Name": "Product 12-78" + }, + { + "Id": 1280, + "Name": "Product 12-79" + }, + { + "Id": 1281, + "Name": "Product 12-80" + }, + { + "Id": 1282, + "Name": "Product 12-81" + }, + { + "Id": 1283, + "Name": "Product 12-82" + }, + { + "Id": 1284, + "Name": "Product 12-83" + }, + { + "Id": 1285, + "Name": "Product 12-84" + }, + { + "Id": 1286, + "Name": "Product 12-85" + }, + { + "Id": 1287, + "Name": "Product 12-86" + }, + { + "Id": 1288, + "Name": "Product 12-87" + }, + { + "Id": 1289, + "Name": "Product 12-88" + }, + { + "Id": 1290, + "Name": "Product 12-89" + }, + { + "Id": 1291, + "Name": "Product 12-90" + }, + { + "Id": 1292, + "Name": "Product 12-91" + }, + { + "Id": 1293, + "Name": "Product 12-92" + }, + { + "Id": 1294, + "Name": "Product 12-93" + }, + { + "Id": 1295, + "Name": "Product 12-94" + }, + { + "Id": 1296, + "Name": "Product 12-95" + }, + { + "Id": 1297, + "Name": "Product 12-96" + }, + { + "Id": 1298, + "Name": "Product 12-97" + }, + { + "Id": 1299, + "Name": "Product 12-98" + }, + { + "Id": 1300, + "Name": "Product 12-99" + } + ] + } +] +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Ascending_Cursor_Value_NonNull_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Ascending_Cursor_Value_NonNull_NET11_0.md new file mode 100644 index 00000000000..e256e3cded8 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Ascending_Cursor_Value_NonNull_NET11_0.md @@ -0,0 +1,63 @@ +# Paging_NullableReference_Ascending_Cursor_Value_NonNull + +## Result 1 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + } +] +``` + +## SQL 0 + +```sql +-- @p='3' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +ORDER BY r."Date", r."String", r."Id" +LIMIT @p +``` + +## SQL 1 + +```sql +-- @value='11/03/2017' (DbType = Date) +-- @value2='21:45:00' +-- @value5='dd8f3a21-89ab-4cde-a203-7d3c45678901' +-- @p='3' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +WHERE r."Date" IS NULL OR r."Date" > @value OR (r."Date" = @value AND (r."String" IS NULL OR r."String" > @value2)) OR (r."Date" = @value AND r."String" IS NOT NULL AND r."String" = @value2 AND r."Id" > @value5) +ORDER BY r."Date", r."String", r."Id" +LIMIT @p +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Ascending_Cursor_Value_Null_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Ascending_Cursor_Value_Null_NET11_0.md new file mode 100644 index 00000000000..dbe7e0dac43 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Ascending_Cursor_Value_Null_NET11_0.md @@ -0,0 +1,68 @@ +# Paging_NullableReference_Ascending_Cursor_Value_Null + +## Result 1 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + } +] +``` + +## SQL 0 + +```sql +-- @p='4' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +ORDER BY r."Date", r."String", r."Id" +LIMIT @p +``` + +## SQL 1 + +```sql +-- @value='11/03/2017' (DbType = Date) +-- @value3='d3b7e9f1-4567-4abc-a102-8c2b34567890' +-- @p='4' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +WHERE r."Date" IS NULL OR r."Date" > @value OR (r."Date" = @value AND r."String" IS NULL AND r."Id" > @value3) +ORDER BY r."Date", r."String", r."Id" +LIMIT @p +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Descending_Cursor_Value_NonNull_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Descending_Cursor_Value_NonNull_NET11_0.md new file mode 100644 index 00000000000..a5cac38b9f7 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Descending_Cursor_Value_NonNull_NET11_0.md @@ -0,0 +1,63 @@ +# Paging_NullableReference_Descending_Cursor_Value_NonNull + +## Result 1 + +```json +[ + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + } +] +``` + +## SQL 0 + +```sql +-- @p='3' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +ORDER BY r."Date" DESC, r."String" DESC, r."Id" DESC +LIMIT @p +``` + +## SQL 1 + +```sql +-- @value='11/04/2017' (DbType = Date) +-- @value2='14:00:00' +-- @value5='62ce9d54-2345-4f01-b304-6e4d56789012' +-- @p='3' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +WHERE r."Date" < @value OR (r."Date" IS NOT NULL AND r."Date" = @value AND r."String" < @value2) OR (r."Date" IS NOT NULL AND r."Date" = @value AND r."String" IS NOT NULL AND r."String" = @value2 AND r."Id" < @value5) +ORDER BY r."Date" DESC, r."String" DESC, r."Id" DESC +LIMIT @p +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Descending_Cursor_Value_Null_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Descending_Cursor_Value_Null_NET11_0.md new file mode 100644 index 00000000000..426cc6cea97 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_NullableReference_Descending_Cursor_Value_Null_NET11_0.md @@ -0,0 +1,68 @@ +# Paging_NullableReference_Descending_Cursor_Value_Null + +## Result 1 + +```json +[ + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + }, + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + } +] +``` + +## SQL 0 + +```sql +-- @p='4' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +ORDER BY r."Date" DESC, r."String" DESC, r."Id" DESC +LIMIT @p +``` + +## SQL 1 + +```sql +-- @value='11/03/2017' (DbType = Date) +-- @value3='d3b7e9f1-4567-4abc-a102-8c2b34567890' +-- @p='4' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +WHERE r."Date" < @value OR (r."Date" IS NOT NULL AND r."Date" = @value AND r."String" IS NOT NULL) OR (r."Date" IS NOT NULL AND r."Date" = @value AND r."String" IS NULL AND r."Id" < @value3) +ORDER BY r."Date" DESC, r."String" DESC, r."Id" DESC +LIMIT @p +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Ascending_Cursor_Value_NonNull_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Ascending_Cursor_Value_NonNull_NET11_0.md new file mode 100644 index 00000000000..d658b20d4fd --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Ascending_Cursor_Value_NonNull_NET11_0.md @@ -0,0 +1,63 @@ +# Paging_Nullable_Ascending_Cursor_Value_NonNull + +## Result 1 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + } +] +``` + +## SQL 0 + +```sql +-- @p='3' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +ORDER BY r."Date", r."Time", r."Id" +LIMIT @p +``` + +## SQL 1 + +```sql +-- @value='11/03/2017' (DbType = Date) +-- @value2='21:45' (DbType = Time) +-- @value5='dd8f3a21-89ab-4cde-a203-7d3c45678901' +-- @p='3' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +WHERE r."Date" IS NULL OR r."Date" > @value OR (r."Date" = @value AND (r."Time" IS NULL OR r."Time" > @value2)) OR (r."Date" = @value AND r."Time" IS NOT NULL AND r."Time" = @value2 AND r."Id" > @value5) +ORDER BY r."Date", r."Time", r."Id" +LIMIT @p +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Ascending_Cursor_Value_Null_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Ascending_Cursor_Value_Null_NET11_0.md new file mode 100644 index 00000000000..44c661780c5 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Ascending_Cursor_Value_Null_NET11_0.md @@ -0,0 +1,68 @@ +# Paging_Nullable_Ascending_Cursor_Value_Null + +## Result 1 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + } +] +``` + +## SQL 0 + +```sql +-- @p='4' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +ORDER BY r."Date", r."Time", r."Id" +LIMIT @p +``` + +## SQL 1 + +```sql +-- @value='11/03/2017' (DbType = Date) +-- @value3='d3b7e9f1-4567-4abc-a102-8c2b34567890' +-- @p='4' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +WHERE r."Date" IS NULL OR r."Date" > @value OR (r."Date" = @value AND r."Time" IS NULL AND r."Id" > @value3) +ORDER BY r."Date", r."Time", r."Id" +LIMIT @p +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Descending_Cursor_Value_NonNull_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Descending_Cursor_Value_NonNull_NET11_0.md new file mode 100644 index 00000000000..5eb781b0069 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Descending_Cursor_Value_NonNull_NET11_0.md @@ -0,0 +1,63 @@ +# Paging_Nullable_Descending_Cursor_Value_NonNull + +## Result 1 + +```json +[ + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + } +] +``` + +## SQL 0 + +```sql +-- @p='3' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +ORDER BY r."Date" DESC, r."Time" DESC, r."Id" DESC +LIMIT @p +``` + +## SQL 1 + +```sql +-- @value='11/04/2017' (DbType = Date) +-- @value2='14:00' (DbType = Time) +-- @value5='62ce9d54-2345-4f01-b304-6e4d56789012' +-- @p='3' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +WHERE r."Date" < @value OR (r."Date" IS NOT NULL AND r."Date" = @value AND r."Time" < @value2) OR (r."Date" IS NOT NULL AND r."Date" = @value AND r."Time" IS NOT NULL AND r."Time" = @value2 AND r."Id" < @value5) +ORDER BY r."Date" DESC, r."Time" DESC, r."Id" DESC +LIMIT @p +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Descending_Cursor_Value_Null_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Descending_Cursor_Value_Null_NET11_0.md new file mode 100644 index 00000000000..95fe0bc0cec --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperPostgreSqlNullableTests.Paging_Nullable_Descending_Cursor_Value_Null_NET11_0.md @@ -0,0 +1,68 @@ +# Paging_Nullable_Descending_Cursor_Value_Null + +## Result 1 + +```json +[ + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + }, + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + } +] +``` + +## SQL 0 + +```sql +-- @p='4' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +ORDER BY r."Date" DESC, r."Time" DESC, r."Id" DESC +LIMIT @p +``` + +## SQL 1 + +```sql +-- @value='11/03/2017' (DbType = Date) +-- @value3='d3b7e9f1-4567-4abc-a102-8c2b34567890' +-- @p='4' +SELECT r."Id", r."Date", r."String", r."Time" +FROM "Records" AS r +WHERE r."Date" < @value OR (r."Date" IS NOT NULL AND r."Date" = @value AND r."Time" IS NOT NULL) OR (r."Date" IS NOT NULL AND r."Date" = @value AND r."Time" IS NULL AND r."Id" < @value3) +ORDER BY r."Date" DESC, r."Time" DESC, r."Id" DESC +LIMIT @p +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Ascending_Cursor_Value_NonNull_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Ascending_Cursor_Value_NonNull_NET11_0.md new file mode 100644 index 00000000000..1aab518bc05 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Ascending_Cursor_Value_NonNull_NET11_0.md @@ -0,0 +1,69 @@ +# Paging_NullableReference_Ascending_Cursor_Value_NonNull + +## Result 1 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + } +] +``` + +## SQL 0 + +```sql +DECLARE @p int = 4; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +ORDER BY [r].[Date], [r].[String], [r].[Id] +``` + +## SQL 1 + +```sql +DECLARE @p int = 4; +DECLARE @value date = '2017-11-03'; +DECLARE @value2 nvarchar(4000) = N'21:45:00'; +DECLARE @value5 uniqueIdentifier = 'dd8f3a21-89ab-4cde-a203-7d3c45678901'; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +WHERE [r].[Date] > @value OR ([r].[Date] IS NOT NULL AND [r].[Date] = @value AND [r].[String] > @value2) OR ([r].[Date] IS NOT NULL AND [r].[Date] = @value AND [r].[String] IS NOT NULL AND [r].[String] = @value2 AND [r].[Id] > @value5) +ORDER BY [r].[Date], [r].[String], [r].[Id] +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Ascending_Cursor_Value_Null_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Ascending_Cursor_Value_Null_NET11_0.md new file mode 100644 index 00000000000..b2e982ed5a5 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Ascending_Cursor_Value_Null_NET11_0.md @@ -0,0 +1,62 @@ +# Paging_NullableReference_Ascending_Cursor_Value_Null + +## Result 1 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + } +] +``` + +## SQL 0 + +```sql +DECLARE @p int = 3; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +ORDER BY [r].[Date], [r].[String], [r].[Id] +``` + +## SQL 1 + +```sql +DECLARE @p int = 3; +DECLARE @value date = '2017-11-03'; +DECLARE @value3 uniqueIdentifier = 'd3b7e9f1-4567-4abc-a102-8c2b34567890'; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +WHERE [r].[Date] > @value OR ([r].[Date] IS NOT NULL AND [r].[Date] = @value AND [r].[String] IS NOT NULL) OR ([r].[Date] IS NOT NULL AND [r].[Date] = @value AND [r].[String] IS NULL AND [r].[Id] > @value3) +ORDER BY [r].[Date], [r].[String], [r].[Id] +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Descending_Cursor_Value_NonNull_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Descending_Cursor_Value_NonNull_NET11_0.md new file mode 100644 index 00000000000..cec89c23e54 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Descending_Cursor_Value_NonNull_NET11_0.md @@ -0,0 +1,69 @@ +# Paging_NullableReference_Descending_Cursor_Value_NonNull + +## Result 1 + +```json +[ + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + }, + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + } +] +``` + +## SQL 0 + +```sql +DECLARE @p int = 4; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +ORDER BY [r].[Date] DESC, [r].[String] DESC, [r].[Id] DESC +``` + +## SQL 1 + +```sql +DECLARE @p int = 4; +DECLARE @value date = '2017-11-03'; +DECLARE @value2 nvarchar(4000) = N'21:45:00'; +DECLARE @value5 uniqueIdentifier = 'dd8f3a21-89ab-4cde-a203-7d3c45678901'; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +WHERE [r].[Date] IS NULL OR [r].[Date] < @value OR ([r].[Date] = @value AND ([r].[String] IS NULL OR [r].[String] < @value2)) OR ([r].[Date] = @value AND [r].[String] IS NOT NULL AND [r].[String] = @value2 AND [r].[Id] < @value5) +ORDER BY [r].[Date] DESC, [r].[String] DESC, [r].[Id] DESC +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Descending_Cursor_Value_Null_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Descending_Cursor_Value_Null_NET11_0.md new file mode 100644 index 00000000000..7db40f25cff --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_NullableReference_Descending_Cursor_Value_Null_NET11_0.md @@ -0,0 +1,68 @@ +# Paging_NullableReference_Descending_Cursor_Value_Null + +## Result 1 + +```json +[ + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + } +] +``` + +## SQL 0 + +```sql +DECLARE @p int = 5; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +ORDER BY [r].[Date] DESC, [r].[String] DESC, [r].[Id] DESC +``` + +## SQL 1 + +```sql +DECLARE @p int = 5; +DECLARE @value date = '2017-11-03'; +DECLARE @value3 uniqueIdentifier = 'd3b7e9f1-4567-4abc-a102-8c2b34567890'; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +WHERE [r].[Date] IS NULL OR [r].[Date] < @value OR ([r].[Date] = @value AND [r].[String] IS NULL AND [r].[Id] < @value3) +ORDER BY [r].[Date] DESC, [r].[String] DESC, [r].[Id] DESC +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Ascending_Cursor_Value_NonNull_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Ascending_Cursor_Value_NonNull_NET11_0.md new file mode 100644 index 00000000000..01fd94e5f07 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Ascending_Cursor_Value_NonNull_NET11_0.md @@ -0,0 +1,69 @@ +# Paging_Nullable_Ascending_Cursor_Value_NonNull + +## Result 1 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + } +] +``` + +## SQL 0 + +```sql +DECLARE @p int = 4; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +ORDER BY [r].[Date], [r].[Time], [r].[Id] +``` + +## SQL 1 + +```sql +DECLARE @p int = 4; +DECLARE @value date = '2017-11-03'; +DECLARE @value2 time = '21:45:00'; +DECLARE @value5 uniqueIdentifier = 'dd8f3a21-89ab-4cde-a203-7d3c45678901'; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +WHERE [r].[Date] > @value OR ([r].[Date] IS NOT NULL AND [r].[Date] = @value AND [r].[Time] > @value2) OR ([r].[Date] IS NOT NULL AND [r].[Date] = @value AND [r].[Time] IS NOT NULL AND [r].[Time] = @value2 AND [r].[Id] > @value5) +ORDER BY [r].[Date], [r].[Time], [r].[Id] +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Ascending_Cursor_Value_Null_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Ascending_Cursor_Value_Null_NET11_0.md new file mode 100644 index 00000000000..f4588d6f4af --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Ascending_Cursor_Value_Null_NET11_0.md @@ -0,0 +1,62 @@ +# Paging_Nullable_Ascending_Cursor_Value_Null + +## Result 1 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + } +] +``` + +## SQL 0 + +```sql +DECLARE @p int = 3; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +ORDER BY [r].[Date], [r].[Time], [r].[Id] +``` + +## SQL 1 + +```sql +DECLARE @p int = 3; +DECLARE @value date = '2017-11-03'; +DECLARE @value3 uniqueIdentifier = 'd3b7e9f1-4567-4abc-a102-8c2b34567890'; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +WHERE [r].[Date] > @value OR ([r].[Date] IS NOT NULL AND [r].[Date] = @value AND [r].[Time] IS NOT NULL) OR ([r].[Date] IS NOT NULL AND [r].[Date] = @value AND [r].[Time] IS NULL AND [r].[Id] > @value3) +ORDER BY [r].[Date], [r].[Time], [r].[Id] +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Descending_Cursor_Value_NonNull_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Descending_Cursor_Value_NonNull_NET11_0.md new file mode 100644 index 00000000000..2d2d189b8c6 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Descending_Cursor_Value_NonNull_NET11_0.md @@ -0,0 +1,69 @@ +# Paging_Nullable_Descending_Cursor_Value_NonNull + +## Result 1 + +```json +[ + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + }, + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + } +] +``` + +## SQL 0 + +```sql +DECLARE @p int = 4; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +ORDER BY [r].[Date] DESC, [r].[Time] DESC, [r].[Id] DESC +``` + +## SQL 1 + +```sql +DECLARE @p int = 4; +DECLARE @value date = '2017-11-03'; +DECLARE @value2 time = '21:45:00'; +DECLARE @value5 uniqueIdentifier = 'dd8f3a21-89ab-4cde-a203-7d3c45678901'; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +WHERE [r].[Date] IS NULL OR [r].[Date] < @value OR ([r].[Date] = @value AND ([r].[Time] IS NULL OR [r].[Time] < @value2)) OR ([r].[Date] = @value AND [r].[Time] IS NOT NULL AND [r].[Time] = @value2 AND [r].[Id] < @value5) +ORDER BY [r].[Date] DESC, [r].[Time] DESC, [r].[Id] DESC +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Descending_Cursor_Value_Null_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Descending_Cursor_Value_Null_NET11_0.md new file mode 100644 index 00000000000..b33c1251f42 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperSqlServerNullableTests.Paging_Nullable_Descending_Cursor_Value_Null_NET11_0.md @@ -0,0 +1,68 @@ +# Paging_Nullable_Descending_Cursor_Value_Null + +## Result 1 + +```json +[ + { + "Id": "a1d5b763-6789-4f23-c405-5f5e67890123", + "Date": "2017-11-04", + "Time": "19:40:00", + "String": "19:40:00" + }, + { + "Id": "62ce9d54-2345-4f01-b304-6e4d56789012", + "Date": "2017-11-04", + "Time": "14:00:00", + "String": "14:00:00" + }, + { + "Id": "dd8f3a21-89ab-4cde-a203-7d3c45678901", + "Date": "2017-11-03", + "Time": "21:45:00", + "String": "21:45:00" + }, + { + "Id": "d3b7e9f1-4567-4abc-a102-8c2b34567890", + "Date": "2017-11-03", + "Time": null, + "String": null + } +] +``` + +## Result 2 + +```json +[ + { + "Id": "68a5c7c2-1234-4def-bc01-9f1a23456789", + "Date": "2017-10-28", + "Time": "22:00:00", + "String": "22:00:00" + } +] +``` + +## SQL 0 + +```sql +DECLARE @p int = 5; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +ORDER BY [r].[Date] DESC, [r].[Time] DESC, [r].[Id] DESC +``` + +## SQL 1 + +```sql +DECLARE @p int = 5; +DECLARE @value date = '2017-11-03'; +DECLARE @value3 uniqueIdentifier = 'd3b7e9f1-4567-4abc-a102-8c2b34567890'; + +SELECT TOP(@p) [r].[Id], [r].[Date], [r].[String], [r].[Time] +FROM [Records] AS [r] +WHERE [r].[Date] IS NULL OR [r].[Date] < @value OR ([r].[Date] = @value AND [r].[Time] IS NULL AND [r].[Id] < @value3) +ORDER BY [r].[Date] DESC, [r].[Time] DESC, [r].[Id] DESC +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_Include_Brand_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_Include_Brand_NET11_0.md new file mode 100644 index 00000000000..32c65869a69 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_Include_Brand_NET11_0.md @@ -0,0 +1,22 @@ +# QueryContext_Simple_Selector_Include_Brand + +## SQL 0 + +```sql +-- @p='3' +SELECT p0."Id", p0."Name", b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM ( + SELECT p."Id", p."BrandId", p."Name" + FROM "Products" AS p + ORDER BY p."Id" + LIMIT @p +) AS p0 +INNER JOIN "Brands" AS b ON p0."BrandId" = b."Id" +ORDER BY p0."Id" +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Id).Select(root => new Product() {Id = root.Id, Name = root.Name, Brand = root.Brand}).Take(3) +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_Include_Brand_Name_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_Include_Brand_Name_NET11_0.md new file mode 100644 index 00000000000..3ed254557d5 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_Include_Brand_Name_NET11_0.md @@ -0,0 +1,22 @@ +# QueryContext_Simple_Selector_Include_Brand_Name + +## SQL 0 + +```sql +-- @p='3' +SELECT p0."Id", p0."Name", b."Name" +FROM ( + SELECT p."Id", p."BrandId", p."Name" + FROM "Products" AS p + ORDER BY p."Id" + LIMIT @p +) AS p0 +INNER JOIN "Brands" AS b ON p0."BrandId" = b."Id" +ORDER BY p0."Id" +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Id).Select(root => new Product() {Id = root.Id, Name = root.Name, Brand = new Brand() {Name = root.Brand.Name}}).Take(3) +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_Include_Product_List_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_Include_Product_List_NET11_0.md new file mode 100644 index 00000000000..419a6434d33 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_Include_Product_List_NET11_0.md @@ -0,0 +1,22 @@ +# QueryContext_Simple_Selector_Include_Product_List + +## SQL 0 + +```sql +-- @p='3' +SELECT b0."Id", b0."Name", p."Id", p."Name" +FROM ( + SELECT b."Id", b."Name" + FROM "Brands" AS b + ORDER BY b."Id" + LIMIT @p +) AS b0 +LEFT JOIN "Products" AS p ON b0."Id" = p."BrandId" +ORDER BY b0."Id" +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Id).Select(root => new Brand() {Id = root.Id, Name = root.Name, Products = root.Products.Select(p => new Product() {Id = p.Id, Name = p.Name}).ToList()}).Take(3) +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_NET11_0.md b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_NET11_0.md new file mode 100644 index 00000000000..60ae7931664 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/PagingHelperTests.QueryContext_Simple_Selector_NET11_0.md @@ -0,0 +1,17 @@ +# QueryContext_Simple_Selector + +## SQL 0 + +```sql +-- @p='3' +SELECT p."Id", p."Name" +FROM "Products" AS p +ORDER BY p."Id" +LIMIT @p +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Id).Select(t => new Product() {Id = t.Id, Name = t.Name}).Take(3) +``` diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_Page_With_Offset_1_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_Page_With_Offset_1_NET11_0.snap new file mode 100644 index 00000000000..f1dbf73e1a5 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_Page_With_Offset_1_NET11_0.snap @@ -0,0 +1,33 @@ +--------------- +{ + "Page": 4, + "TotalCount": 20, + "Items": [ + "Glacient", + "Hyperionix" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Dynamova' +-- @value2='4' +SELECT b1."GroupId", b3."Id", b3."GroupId", b3."Name" +FROM ( + SELECT b."GroupId" + FROM "Brands" AS b + WHERE b."GroupId" = 1 + GROUP BY b."GroupId" +) AS b1 +LEFT JOIN ( + SELECT b2."Id", b2."GroupId", b2."Name" + FROM ( + SELECT b0."Id", b0."GroupId", b0."Name", ROW_NUMBER() OVER(PARTITION BY b0."GroupId" ORDER BY b0."Name", b0."Id") AS row + FROM "Brands" AS b0 + WHERE b0."GroupId" = 1 AND (b0."Name" > @value OR (b0."Name" = @value AND b0."Id" > @value2)) + ) AS b2 + WHERE 2 < b2.row AND b2.row <= 5 +) AS b3 ON b1."GroupId" = b3."GroupId" +ORDER BY b1."GroupId", b3."GroupId", b3."Name", b3."Id" +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_Page_With_Offset_2_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_Page_With_Offset_2_NET11_0.snap new file mode 100644 index 00000000000..62b149775bc --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_Page_With_Offset_2_NET11_0.snap @@ -0,0 +1,33 @@ +--------------- +{ + "Page": 4, + "TotalCount": 20, + "Items": [ + "Glacient", + "Hyperionix" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Brightex' +-- @value2='2' +SELECT b1."GroupId", b3."Id", b3."GroupId", b3."Name" +FROM ( + SELECT b."GroupId" + FROM "Brands" AS b + WHERE b."GroupId" = 1 + GROUP BY b."GroupId" +) AS b1 +LEFT JOIN ( + SELECT b2."Id", b2."GroupId", b2."Name" + FROM ( + SELECT b0."Id", b0."GroupId", b0."Name", ROW_NUMBER() OVER(PARTITION BY b0."GroupId" ORDER BY b0."Name", b0."Id") AS row + FROM "Brands" AS b0 + WHERE b0."GroupId" = 1 AND (b0."Name" > @value OR (b0."Name" = @value AND b0."Id" > @value2)) + ) AS b2 + WHERE 4 < b2.row AND b2.row <= 7 +) AS b3 ON b1."GroupId" = b3."GroupId" +ORDER BY b1."GroupId", b3."GroupId", b3."Name", b3."Id" +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_To_Last_Page_From_Second_To_Last_Page_Offset_Negative_1_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_To_Last_Page_From_Second_To_Last_Page_Offset_Negative_1_NET11_0.snap new file mode 100644 index 00000000000..13c928b0ab6 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_To_Last_Page_From_Second_To_Last_Page_Offset_Negative_1_NET11_0.snap @@ -0,0 +1,33 @@ +--------------- +{ + "Page": 7, + "TotalCount": 20, + "Items": [ + "Momentumix", + "Nebularis" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Quantumis' +-- @value2='17' +SELECT b1."GroupId", b3."Id", b3."GroupId", b3."Name" +FROM ( + SELECT b."GroupId" + FROM "Brands" AS b + WHERE b."GroupId" = 2 + GROUP BY b."GroupId" +) AS b1 +LEFT JOIN ( + SELECT b2."Id", b2."GroupId", b2."Name" + FROM ( + SELECT b0."Id", b0."GroupId", b0."Name", ROW_NUMBER() OVER(PARTITION BY b0."GroupId" ORDER BY b0."Name" DESC, b0."Id" DESC) AS row + FROM "Brands" AS b0 + WHERE b0."GroupId" = 2 AND (b0."Name" < @value OR (b0."Name" = @value AND b0."Id" < @value2)) + ) AS b2 + WHERE 2 < b2.row AND b2.row <= 5 +) AS b3 ON b1."GroupId" = b3."GroupId" +ORDER BY b1."GroupId", b3."GroupId", b3."Name" DESC, b3."Id" DESC +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_To_Last_Page_Offset_Negative_2_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_To_Last_Page_Offset_Negative_2_NET11_0.snap new file mode 100644 index 00000000000..771a76523e1 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Fourth_To_Last_Page_Offset_Negative_2_NET11_0.snap @@ -0,0 +1,33 @@ +--------------- +{ + "Page": 7, + "TotalCount": 20, + "Items": [ + "Momentumix", + "Nebularis" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Synerflux' +-- @value2='19' +SELECT b1."GroupId", b3."Id", b3."GroupId", b3."Name" +FROM ( + SELECT b."GroupId" + FROM "Brands" AS b + WHERE b."GroupId" = 2 + GROUP BY b."GroupId" +) AS b1 +LEFT JOIN ( + SELECT b2."Id", b2."GroupId", b2."Name" + FROM ( + SELECT b0."Id", b0."GroupId", b0."Name", ROW_NUMBER() OVER(PARTITION BY b0."GroupId" ORDER BY b0."Name" DESC, b0."Id" DESC) AS row + FROM "Brands" AS b0 + WHERE b0."GroupId" = 2 AND (b0."Name" < @value OR (b0."Name" = @value AND b0."Id" < @value2)) + ) AS b2 + WHERE 4 < b2.row AND b2.row <= 7 +) AS b3 ON b1."GroupId" = b3."GroupId" +ORDER BY b1."GroupId", b3."GroupId", b3."Name" DESC, b3."Id" DESC +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Second_Page_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Second_Page_NET11_0.snap new file mode 100644 index 00000000000..2e645a2594f --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Second_Page_NET11_0.snap @@ -0,0 +1,33 @@ +--------------- +{ + "Page": 2, + "TotalCount": 20, + "Items": [ + "Celestara", + "Dynamova" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Brightex' +-- @value2='2' +SELECT b1."GroupId", b3."Id", b3."GroupId", b3."Name" +FROM ( + SELECT b."GroupId" + FROM "Brands" AS b + WHERE b."GroupId" = 1 + GROUP BY b."GroupId" +) AS b1 +LEFT JOIN ( + SELECT b2."Id", b2."GroupId", b2."Name" + FROM ( + SELECT b0."Id", b0."GroupId", b0."Name", ROW_NUMBER() OVER(PARTITION BY b0."GroupId" ORDER BY b0."Name", b0."Id") AS row + FROM "Brands" AS b0 + WHERE b0."GroupId" = 1 AND (b0."Name" > @value OR (b0."Name" = @value AND b0."Id" > @value2)) + ) AS b2 + WHERE b2.row <= 3 +) AS b3 ON b1."GroupId" = b3."GroupId" +ORDER BY b1."GroupId", b3."GroupId", b3."Name", b3."Id" +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Second_To_Last_Page_Offset_0_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Second_To_Last_Page_Offset_0_NET11_0.snap new file mode 100644 index 00000000000..cfa19c13ee2 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Second_To_Last_Page_Offset_0_NET11_0.snap @@ -0,0 +1,33 @@ +--------------- +{ + "Page": 9, + "TotalCount": 20, + "Items": [ + "Quantumis", + "Radiantum" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Synerflux' +-- @value2='19' +SELECT b1."GroupId", b3."Id", b3."GroupId", b3."Name" +FROM ( + SELECT b."GroupId" + FROM "Brands" AS b + WHERE b."GroupId" = 2 + GROUP BY b."GroupId" +) AS b1 +LEFT JOIN ( + SELECT b2."Id", b2."GroupId", b2."Name" + FROM ( + SELECT b0."Id", b0."GroupId", b0."Name", ROW_NUMBER() OVER(PARTITION BY b0."GroupId" ORDER BY b0."Name" DESC, b0."Id" DESC) AS row + FROM "Brands" AS b0 + WHERE b0."GroupId" = 2 AND (b0."Name" < @value OR (b0."Name" = @value AND b0."Id" < @value2)) + ) AS b2 + WHERE b2.row <= 3 +) AS b3 ON b1."GroupId" = b3."GroupId" +ORDER BY b1."GroupId", b3."GroupId", b3."Name" DESC, b3."Id" DESC +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Third_Page_With_Offset_1_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Third_Page_With_Offset_1_NET11_0.snap new file mode 100644 index 00000000000..8642befedf2 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Third_Page_With_Offset_1_NET11_0.snap @@ -0,0 +1,33 @@ +--------------- +{ + "Page": 3, + "TotalCount": 20, + "Items": [ + "Evolvance", + "Futurova" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Brightex' +-- @value2='2' +SELECT b1."GroupId", b3."Id", b3."GroupId", b3."Name" +FROM ( + SELECT b."GroupId" + FROM "Brands" AS b + WHERE b."GroupId" = 1 + GROUP BY b."GroupId" +) AS b1 +LEFT JOIN ( + SELECT b2."Id", b2."GroupId", b2."Name" + FROM ( + SELECT b0."Id", b0."GroupId", b0."Name", ROW_NUMBER() OVER(PARTITION BY b0."GroupId" ORDER BY b0."Name", b0."Id") AS row + FROM "Brands" AS b0 + WHERE b0."GroupId" = 1 AND (b0."Name" > @value OR (b0."Name" = @value AND b0."Id" > @value2)) + ) AS b2 + WHERE 2 < b2.row AND b2.row <= 5 +) AS b3 ON b1."GroupId" = b3."GroupId" +ORDER BY b1."GroupId", b3."GroupId", b3."Name", b3."Id" +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Third_To_Last_Page_Offset_Negative_1_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Third_To_Last_Page_Offset_Negative_1_NET11_0.snap new file mode 100644 index 00000000000..aaa39f541b4 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.BatchFetch_Third_To_Last_Page_Offset_Negative_1_NET11_0.snap @@ -0,0 +1,33 @@ +--------------- +{ + "Page": 8, + "TotalCount": 20, + "Items": [ + "Omniflex", + "Pulsarix" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Synerflux' +-- @value2='19' +SELECT b1."GroupId", b3."Id", b3."GroupId", b3."Name" +FROM ( + SELECT b."GroupId" + FROM "Brands" AS b + WHERE b."GroupId" = 2 + GROUP BY b."GroupId" +) AS b1 +LEFT JOIN ( + SELECT b2."Id", b2."GroupId", b2."Name" + FROM ( + SELECT b0."Id", b0."GroupId", b0."Name", ROW_NUMBER() OVER(PARTITION BY b0."GroupId" ORDER BY b0."Name" DESC, b0."Id" DESC) AS row + FROM "Brands" AS b0 + WHERE b0."GroupId" = 2 AND (b0."Name" < @value OR (b0."Name" = @value AND b0."Id" < @value2)) + ) AS b2 + WHERE 2 < b2.row AND b2.row <= 5 +) AS b3 ON b1."GroupId" = b3."GroupId" +ORDER BY b1."GroupId", b3."GroupId", b3."Name" DESC, b3."Id" DESC +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_Page_With_Offset_1_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_Page_With_Offset_1_NET11_0.snap new file mode 100644 index 00000000000..fb85d5d5c2e --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_Page_With_Offset_1_NET11_0.snap @@ -0,0 +1,23 @@ +--------------- +{ + "Page": 4, + "TotalCount": 20, + "Items": [ + "Glacient", + "Hyperionix" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Dynamova' +-- @value2='4' +-- @p4='3' +-- @p='2' +SELECT b."Id", b."GroupId", b."Name" +FROM "Brands" AS b +WHERE b."Name" > @value OR (b."Name" = @value AND b."Id" > @value2) +ORDER BY b."Name", b."Id" +LIMIT @p4 OFFSET @p +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_Page_With_Offset_2_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_Page_With_Offset_2_NET11_0.snap new file mode 100644 index 00000000000..e2cd41785f0 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_Page_With_Offset_2_NET11_0.snap @@ -0,0 +1,23 @@ +--------------- +{ + "Page": 4, + "TotalCount": 20, + "Items": [ + "Glacient", + "Hyperionix" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Brightex' +-- @value2='2' +-- @p4='3' +-- @p='4' +SELECT b."Id", b."GroupId", b."Name" +FROM "Brands" AS b +WHERE b."Name" > @value OR (b."Name" = @value AND b."Id" > @value2) +ORDER BY b."Name", b."Id" +LIMIT @p4 OFFSET @p +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_To_Last_Page_From_Second_To_Last_Page_Offset_Negative_1_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_To_Last_Page_From_Second_To_Last_Page_Offset_Negative_1_NET11_0.snap new file mode 100644 index 00000000000..4a9eedc80ca --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_To_Last_Page_From_Second_To_Last_Page_Offset_Negative_1_NET11_0.snap @@ -0,0 +1,23 @@ +--------------- +{ + "Page": 7, + "TotalCount": 20, + "Items": [ + "Momentumix", + "Nebularis" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Quantumis' +-- @value2='17' +-- @p4='3' +-- @p='2' +SELECT b."Id", b."GroupId", b."Name" +FROM "Brands" AS b +WHERE b."Name" < @value OR (b."Name" = @value AND b."Id" < @value2) +ORDER BY b."Name" DESC, b."Id" DESC +LIMIT @p4 OFFSET @p +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_To_Last_Page_Offset_Negative_2_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_To_Last_Page_Offset_Negative_2_NET11_0.snap new file mode 100644 index 00000000000..777241aa7e9 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Fourth_To_Last_Page_Offset_Negative_2_NET11_0.snap @@ -0,0 +1,23 @@ +--------------- +{ + "Page": 7, + "TotalCount": 20, + "Items": [ + "Momentumix", + "Nebularis" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Synerflux' +-- @value2='19' +-- @p4='3' +-- @p='4' +SELECT b."Id", b."GroupId", b."Name" +FROM "Brands" AS b +WHERE b."Name" < @value OR (b."Name" = @value AND b."Id" < @value2) +ORDER BY b."Name" DESC, b."Id" DESC +LIMIT @p4 OFFSET @p +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Second_Page_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Second_Page_NET11_0.snap new file mode 100644 index 00000000000..0f4e7717193 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Second_Page_NET11_0.snap @@ -0,0 +1,22 @@ +--------------- +{ + "Page": 2, + "TotalCount": 20, + "Items": [ + "Celestara", + "Dynamova" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Brightex' +-- @value2='2' +-- @p='3' +SELECT b."Id", b."GroupId", b."Name" +FROM "Brands" AS b +WHERE b."Name" > @value OR (b."Name" = @value AND b."Id" > @value2) +ORDER BY b."Name", b."Id" +LIMIT @p +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Second_To_Last_Page_Offset_0_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Second_To_Last_Page_Offset_0_NET11_0.snap new file mode 100644 index 00000000000..627bbc5cdd9 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Second_To_Last_Page_Offset_0_NET11_0.snap @@ -0,0 +1,22 @@ +--------------- +{ + "Page": 9, + "TotalCount": 20, + "Items": [ + "Quantumis", + "Radiantum" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Synerflux' +-- @value2='19' +-- @p='3' +SELECT b."Id", b."GroupId", b."Name" +FROM "Brands" AS b +WHERE b."Name" < @value OR (b."Name" = @value AND b."Id" < @value2) +ORDER BY b."Name" DESC, b."Id" DESC +LIMIT @p +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Third_Page_With_Offset_1_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Third_Page_With_Offset_1_NET11_0.snap new file mode 100644 index 00000000000..eb019c5bc05 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Third_Page_With_Offset_1_NET11_0.snap @@ -0,0 +1,23 @@ +--------------- +{ + "Page": 3, + "TotalCount": 20, + "Items": [ + "Evolvance", + "Futurova" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Brightex' +-- @value2='2' +-- @p4='3' +-- @p='2' +SELECT b."Id", b."GroupId", b."Name" +FROM "Brands" AS b +WHERE b."Name" > @value OR (b."Name" = @value AND b."Id" > @value2) +ORDER BY b."Name", b."Id" +LIMIT @p4 OFFSET @p +--------------- diff --git a/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Third_To_Last_Page_Offset_Negative_1_NET11_0.snap b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Third_To_Last_Page_Offset_Negative_1_NET11_0.snap new file mode 100644 index 00000000000..5942c855510 --- /dev/null +++ b/src/GreenDonut/test/GreenDonut.Data.EntityFramework.Tests/__snapshots__/RelativeCursorTests.Fetch_Third_To_Last_Page_Offset_Negative_1_NET11_0.snap @@ -0,0 +1,23 @@ +--------------- +{ + "Page": 8, + "TotalCount": 20, + "Items": [ + "Omniflex", + "Pulsarix" + ] +} +--------------- + +SQL 0 +--------------- +-- @value='Synerflux' +-- @value2='19' +-- @p4='3' +-- @p='2' +SELECT b."Id", b."GroupId", b."Name" +FROM "Brands" AS b +WHERE b."Name" < @value OR (b."Name" = @value AND b."Id" < @value2) +ORDER BY b."Name" DESC, b."Id" DESC +LIMIT @p4 OFFSET @p +--------------- diff --git a/src/HotChocolate/Adapters/src/Adapters.OpenApi.AspNetCore/DynamicOpenApiDocumentTransformer.cs b/src/HotChocolate/Adapters/src/Adapters.OpenApi.AspNetCore/DynamicOpenApiDocumentTransformer.cs index 109fb4d67d7..b828461a440 100644 --- a/src/HotChocolate/Adapters/src/Adapters.OpenApi.AspNetCore/DynamicOpenApiDocumentTransformer.cs +++ b/src/HotChocolate/Adapters/src/Adapters.OpenApi.AspNetCore/DynamicOpenApiDocumentTransformer.cs @@ -131,10 +131,17 @@ private static EndpointDescriptor CreateEndpointDescriptor( var requestBody = new OpenApiRequestBody { Required = true, +#if NET11_0_OR_GREATER + Content = new Dictionary + { + [JsonContentType] = new OpenApiMediaType { Schema = requestBodyType } + } +#else Content = new Dictionary { [JsonContentType] = new() { Schema = requestBodyType } } +#endif }; operation.RequestBody = requestBody; @@ -165,7 +172,11 @@ private static EndpointDescriptor CreateEndpointDescriptor( operation.Responses["200"] = new OpenApiResponse { +#if NET11_0_OR_GREATER + Content = new ConcurrentDictionary { [JsonContentType] = responseBody } +#else Content = new ConcurrentDictionary { [JsonContentType] = responseBody } +#endif }; return new EndpointDescriptor( diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Field_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Field_NET11_0.json new file mode 100644 index 00000000000..4fba7fe3f93 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Field_NET11_0.json @@ -0,0 +1,49 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users": { + "get": { + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Model_Names_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Model_Names_NET11_0.json new file mode 100644 index 00000000000..27a501201db --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Model_Names_NET11_0.json @@ -0,0 +1,57 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users": { + "get": { + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "User": { + "required": [ + "address" + ], + "type": "object", + "properties": { + "address": { + "required": [ + "street" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Operation_Names_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Operation_Names_NET11_0.json new file mode 100644 index 00000000000..8148a8a334a --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Operation_Names_NET11_0.json @@ -0,0 +1,88 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users": { + "get": { + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "/users/v2": { + "get": { + "operationId": "getUsers_1", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Routes_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Routes_NET11_0.json new file mode 100644 index 00000000000..0889f42f8dd --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Duplicated_Routes_NET11_0.json @@ -0,0 +1,53 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users": { + "get": { + "operationId": "getUsersWithName", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_NET11_0.json new file mode 100644 index 00000000000..94d80dde115 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_NET11_0.json @@ -0,0 +1,71 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "User": { + "required": [ + "name", + "email" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Fields_And_FragmentDocument_Reference_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Fields_And_FragmentDocument_Reference_NET11_0.json new file mode 100644 index 00000000000..c4d40c1248d --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Fields_And_FragmentDocument_Reference_NET11_0.json @@ -0,0 +1,96 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "GlobalUser": { + "required": [ + "name", + "email" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + }, + "User": { + "allOf": [ + { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + { + "$ref": "#/components/schemas/GlobalUser" + } + ] + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Fields_And_Local_Fragment_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Fields_And_Local_Fragment_NET11_0.json new file mode 100644 index 00000000000..e53b187d93e --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Fields_And_Local_Fragment_NET11_0.json @@ -0,0 +1,115 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "User": { + "allOf": [ + { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + { + "required": [ + "name", + "email" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + ] + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_FragmentDocument_Reference_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_FragmentDocument_Reference_NET11_0.json new file mode 100644 index 00000000000..61e5d53c2f9 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_FragmentDocument_Reference_NET11_0.json @@ -0,0 +1,97 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Address": { + "required": [ + "street" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + } + } + }, + "User": { + "required": [ + "id", + "name", + "email", + "address" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "address": { + "$ref": "#/components/schemas/Address" + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Local_Fragment_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Local_Fragment_NET11_0.json new file mode 100644 index 00000000000..80926b2ee24 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Local_Fragment_NET11_0.json @@ -0,0 +1,94 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "User": { + "required": [ + "id", + "name", + "email", + "address" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "address": { + "required": [ + "street" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Local_Fragment_With_FragmentDocument_Reference_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Local_Fragment_With_FragmentDocument_Reference_NET11_0.json new file mode 100644 index 00000000000..61e5d53c2f9 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.FragmentDocument_With_Local_Fragment_With_FragmentDocument_Reference_NET11_0.json @@ -0,0 +1,97 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Address": { + "required": [ + "street" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + } + } + }, + "User": { + "required": [ + "id", + "name", + "email", + "address" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "address": { + "$ref": "#/components/schemas/Address" + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Add_New_Document_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Add_New_Document_NET11_0.json new file mode 100644 index 00000000000..4fba7fe3f93 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Add_New_Document_NET11_0.json @@ -0,0 +1,49 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users": { + "get": { + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Remove_Existing_Operation_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Remove_Existing_Operation_NET11_0.json new file mode 100644 index 00000000000..06dac73c1a4 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Remove_Existing_Operation_NET11_0.json @@ -0,0 +1,13 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Update_Existing_Document_Different_Route_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Update_Existing_Document_Different_Route_NET11_0.json new file mode 100644 index 00000000000..230f02fc6ee --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Update_Existing_Document_Different_Route_NET11_0.json @@ -0,0 +1,53 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users-new": { + "get": { + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Update_Existing_Document_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Update_Existing_Document_NET11_0.json new file mode 100644 index 00000000000..5f47b6b5f83 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.HotReload_Update_Existing_Document_NET11_0.json @@ -0,0 +1,53 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users": { + "get": { + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Missing_Field_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Missing_Field_NET11_0.json new file mode 100644 index 00000000000..4fba7fe3f93 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Missing_Field_NET11_0.json @@ -0,0 +1,49 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users": { + "get": { + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Missing_Model_References_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Missing_Model_References_NET11_0.json new file mode 100644 index 00000000000..4fba7fe3f93 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.Missing_Model_References_NET11_0.json @@ -0,0 +1,49 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users": { + "get": { + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET11_0.json new file mode 100644 index 00000000000..fc3377a74c3 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET11_0.json @@ -0,0 +1,1112 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/complex": { + "post": { + "operationId": "complexObjectQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "any", + "base64String", + "boolean", + "byte", + "date", + "dateTime", + "decimal", + "duration", + "enum", + "float", + "id", + "int", + "json", + "list", + "localDate", + "localDateTime", + "localTime", + "long", + "object", + "short", + "string", + "unknown", + "unsignedByte", + "unsignedInt", + "unsignedLong", + "unsignedShort", + "uri", + "url", + "uuid" + ], + "type": "object", + "properties": { + "any": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "description": "The `Any` scalar type represents any valid GraphQL value." + }, + "base64String": { + "pattern": "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$", + "type": "string", + "description": "The `Base64String` scalar type represents an array of bytes encoded as a Base64 string." + }, + "boolean": { + "type": "boolean" + }, + "byte": { + "type": "integer", + "description": "The `Byte` scalar type represents a signed 8-bit integer.", + "format": "int8" + }, + "date": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}$", + "type": "string", + "description": "The `Date` scalar type represents a date in UTC.", + "format": "date" + }, + "dateTime": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:[Zz]|[+-]\\d{2}:\\d{2})$", + "type": "string", + "description": "The `DateTime` scalar type represents a date and time with time zone offset information.", + "format": "date-time" + }, + "decimal": { + "type": "number", + "description": "The `Decimal` scalar type represents a decimal floating-point number with high precision." + }, + "duration": { + "pattern": "^-?P(?:\\d+W|(?=\\d|T(?:\\d|$))(?:\\d+Y)?(?:\\d+M)?(?:\\d+D)?(?:T(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?)$", + "type": "string", + "description": "The `Duration` scalar type represents a duration of time.", + "format": "duration" + }, + "enum": { + "enum": [ + "VALUE1", + "VALUE2" + ], + "type": "string" + }, + "float": { + "type": "number", + "format": "double" + }, + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "int": { + "type": "integer", + "format": "int32" + }, + "json": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "description": "The `Any` scalar type represents any valid GraphQL value." + }, + "list": { + "type": "array", + "items": { + "type": "string" + } + }, + "localDate": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}$", + "type": "string", + "description": "The `LocalDate` scalar type represents a date without time or time zone information.", + "format": "date" + }, + "localDateTime": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": "string", + "description": "The `LocalDateTime` scalar type represents a date and time without time zone information." + }, + "localTime": { + "pattern": "^\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": "string", + "description": "The `LocalTime` scalar type represents a time of day without date or time zone information." + }, + "long": { + "type": "integer", + "description": "The `Long` scalar type represents a signed 64-bit integer.", + "format": "int64" + }, + "object": { + "required": [ + "field1A" + ], + "type": "object", + "properties": { + "field1A": { + "required": [ + "field1B" + ], + "type": "object", + "properties": { + "field1B": { + "required": [ + "field1C" + ], + "type": "object", + "properties": { + "field1C": { + "pattern": "^\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": "string", + "description": "field1C description" + } + }, + "description": "field1B description" + } + }, + "description": "field1A description" + } + } + }, + "short": { + "type": "integer", + "description": "The `Short` scalar type represents a signed 16-bit integer.", + "format": "int16" + }, + "string": { + "type": "string" + }, + "unknown": { + "type": "string" + }, + "unsignedByte": { + "type": "integer", + "description": "The `UnsignedByte` scalar type represents an unsigned 8-bit integer.", + "format": "uint8" + }, + "unsignedInt": { + "type": "integer", + "description": "The `UnsignedInt` scalar type represents an unsigned 32-bit integer.", + "format": "uint32" + }, + "unsignedLong": { + "type": "integer", + "description": "The `UnsignedLong` scalar type represents an unsigned 64-bit integer.", + "format": "uint64" + }, + "unsignedShort": { + "type": "integer", + "description": "The `UnsignedShort` scalar type represents an unsigned 16-bit integer.", + "format": "uint16" + }, + "uri": { + "type": "string", + "description": "The `URI` scalar type represents a Uniform Resource Identifier (URI) as defined by RFC 3986.", + "format": "uri" + }, + "url": { + "type": "string", + "description": "The `URL` scalar type represents a Uniform Resource Locator (URL) as defined by RFC 3986.", + "format": "uri" + }, + "uuid": { + "pattern": "^[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}$", + "type": "string", + "description": "The `UUID` scalar type represents a Universally Unique Identifier (UUID) as defined by RFC 9562.", + "format": "uuid" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "any", + "base64String", + "boolean", + "byte", + "date", + "dateTime", + "decimal", + "duration", + "enum", + "float", + "id", + "int", + "json", + "list", + "localDate", + "localDateTime", + "localTime", + "long", + "object", + "short", + "string", + "unknown", + "url", + "uuid" + ], + "type": "object", + "properties": { + "any": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "description": "The `Any` scalar type represents any valid GraphQL value." + }, + "base64String": { + "pattern": "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$", + "type": [ + "null", + "string" + ], + "description": "The `Base64String` scalar type represents an array of bytes encoded as a Base64 string." + }, + "boolean": { + "type": [ + "null", + "boolean" + ] + }, + "byte": { + "type": [ + "null", + "integer" + ], + "description": "The `Byte` scalar type represents a signed 8-bit integer.", + "format": "int8" + }, + "date": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}$", + "type": [ + "null", + "string" + ], + "description": "The `Date` scalar type represents a date in UTC.", + "format": "date" + }, + "dateTime": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:[Zz]|[+-]\\d{2}:\\d{2})$", + "type": [ + "null", + "string" + ], + "description": "The `DateTime` scalar type represents a date and time with time zone offset information.", + "format": "date-time" + }, + "decimal": { + "type": [ + "null", + "number" + ], + "description": "The `Decimal` scalar type represents a decimal floating-point number with high precision." + }, + "duration": { + "pattern": "^-?P(?:\\d+W|(?=\\d|T(?:\\d|$))(?:\\d+Y)?(?:\\d+M)?(?:\\d+D)?(?:T(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?)$", + "type": [ + "null", + "string" + ], + "description": "The `Duration` scalar type represents a duration of time.", + "format": "duration" + }, + "enum": { + "enum": [ + "VALUE1", + "VALUE2" + ], + "type": [ + "null", + "string" + ] + }, + "float": { + "type": [ + "null", + "number" + ], + "format": "double" + }, + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "int": { + "type": [ + "null", + "integer" + ], + "format": "int32" + }, + "json": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "description": "The `Any` scalar type represents any valid GraphQL value." + }, + "list": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ] + } + }, + "localDate": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}$", + "type": [ + "null", + "string" + ], + "description": "The `LocalDate` scalar type represents a date without time or time zone information.", + "format": "date" + }, + "localDateTime": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": [ + "null", + "string" + ], + "description": "The `LocalDateTime` scalar type represents a date and time without time zone information." + }, + "localTime": { + "pattern": "^\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": [ + "null", + "string" + ], + "description": "The `LocalTime` scalar type represents a time of day without date or time zone information." + }, + "long": { + "type": [ + "null", + "integer" + ], + "description": "The `Long` scalar type represents a signed 64-bit integer.", + "format": "int64" + }, + "object": { + "required": [ + "field1A" + ], + "type": [ + "null", + "object" + ], + "properties": { + "field1A": { + "required": [ + "field1B" + ], + "type": [ + "null", + "object" + ], + "properties": { + "field1B": { + "required": [ + "field1C" + ], + "type": [ + "null", + "object" + ], + "properties": { + "field1C": { + "pattern": "^\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": [ + "null", + "string" + ], + "description": "The `LocalTime` scalar type represents a time of day without date or time zone information." + } + } + } + } + } + } + }, + "short": { + "type": [ + "null", + "integer" + ], + "description": "The `Short` scalar type represents a signed 16-bit integer.", + "format": "int16" + }, + "string": { + "type": [ + "null", + "string" + ] + }, + "unknown": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ], + "description": "The `URL` scalar type represents a Uniform Resource Locator (URL) as defined by RFC 3986.", + "format": "uri" + }, + "uuid": { + "pattern": "^[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}$", + "type": [ + "null", + "string" + ], + "description": "The `UUID` scalar type represents a Universally Unique Identifier (UUID) as defined by RFC 9562.", + "format": "uuid" + } + } + } + } + } + } + } + } + }, + "/users": { + "post": { + "description": "Creates a user", + "operationId": "createUser", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "id", + "name" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The user's email" + }, + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + } + }, + "get": { + "description": "Fetches all users", + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id" + ], + "type": [ + "null", + "object" + ], + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + } + } + } + } + } + } + } + }, + "/users/{userId}/details": { + "get": { + "operationId": "getFullUser", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + { + "name": "includeAddress", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "address": { + "$ref": "#/components/schemas/UserAddress" + } + } + } + } + } + } + } + } + }, + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + } + }, + "put": { + "description": "Updates a user's details", + "operationId": "updateUser", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "name" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The user's email" + }, + "name": { + "type": "string" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + } + } + }, + "/interface": { + "get": { + "operationId": "interfaceQuery", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "required": [ + "petType", + "name" + ], + "type": "object", + "properties": { + "petType": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "isPurring": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "isBarking": { + "type": "boolean" + } + } + } + ] + } + ] + } + } + } + } + } + } + }, + "/union": { + "get": { + "operationId": "unionQuery", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "required": [ + "petType" + ], + "type": "object", + "properties": { + "petType": { + "type": "string" + } + } + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "isPurring": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "isBarking": { + "type": "boolean" + } + } + } + ] + } + ] + } + } + } + } + } + } + }, + "/object/{userId}": { + "put": { + "operationId": "updateDeeplyNestedObject", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field", + "in": "query", + "schema": { + "type": "string", + "default": "DefaultValue" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "field", + "object" + ], + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "object": { + "required": [ + "otherField" + ], + "type": "object", + "properties": { + "otherField": { + "type": "string" + } + } + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "userId", + "field", + "object" + ], + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "field": { + "type": "string" + }, + "object": { + "required": [ + "otherField", + "field2" + ], + "type": "object", + "properties": { + "otherField": { + "type": "string" + }, + "field2": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "UserAddress": { + "required": [ + "street" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + } + }, + "description": "The user's address" + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET11_0_Fusion.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET11_0_Fusion.json new file mode 100644 index 00000000000..fc3377a74c3 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET11_0_Fusion.json @@ -0,0 +1,1112 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/complex": { + "post": { + "operationId": "complexObjectQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "any", + "base64String", + "boolean", + "byte", + "date", + "dateTime", + "decimal", + "duration", + "enum", + "float", + "id", + "int", + "json", + "list", + "localDate", + "localDateTime", + "localTime", + "long", + "object", + "short", + "string", + "unknown", + "unsignedByte", + "unsignedInt", + "unsignedLong", + "unsignedShort", + "uri", + "url", + "uuid" + ], + "type": "object", + "properties": { + "any": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "description": "The `Any` scalar type represents any valid GraphQL value." + }, + "base64String": { + "pattern": "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$", + "type": "string", + "description": "The `Base64String` scalar type represents an array of bytes encoded as a Base64 string." + }, + "boolean": { + "type": "boolean" + }, + "byte": { + "type": "integer", + "description": "The `Byte` scalar type represents a signed 8-bit integer.", + "format": "int8" + }, + "date": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}$", + "type": "string", + "description": "The `Date` scalar type represents a date in UTC.", + "format": "date" + }, + "dateTime": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:[Zz]|[+-]\\d{2}:\\d{2})$", + "type": "string", + "description": "The `DateTime` scalar type represents a date and time with time zone offset information.", + "format": "date-time" + }, + "decimal": { + "type": "number", + "description": "The `Decimal` scalar type represents a decimal floating-point number with high precision." + }, + "duration": { + "pattern": "^-?P(?:\\d+W|(?=\\d|T(?:\\d|$))(?:\\d+Y)?(?:\\d+M)?(?:\\d+D)?(?:T(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?)$", + "type": "string", + "description": "The `Duration` scalar type represents a duration of time.", + "format": "duration" + }, + "enum": { + "enum": [ + "VALUE1", + "VALUE2" + ], + "type": "string" + }, + "float": { + "type": "number", + "format": "double" + }, + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "int": { + "type": "integer", + "format": "int32" + }, + "json": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "description": "The `Any` scalar type represents any valid GraphQL value." + }, + "list": { + "type": "array", + "items": { + "type": "string" + } + }, + "localDate": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}$", + "type": "string", + "description": "The `LocalDate` scalar type represents a date without time or time zone information.", + "format": "date" + }, + "localDateTime": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": "string", + "description": "The `LocalDateTime` scalar type represents a date and time without time zone information." + }, + "localTime": { + "pattern": "^\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": "string", + "description": "The `LocalTime` scalar type represents a time of day without date or time zone information." + }, + "long": { + "type": "integer", + "description": "The `Long` scalar type represents a signed 64-bit integer.", + "format": "int64" + }, + "object": { + "required": [ + "field1A" + ], + "type": "object", + "properties": { + "field1A": { + "required": [ + "field1B" + ], + "type": "object", + "properties": { + "field1B": { + "required": [ + "field1C" + ], + "type": "object", + "properties": { + "field1C": { + "pattern": "^\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": "string", + "description": "field1C description" + } + }, + "description": "field1B description" + } + }, + "description": "field1A description" + } + } + }, + "short": { + "type": "integer", + "description": "The `Short` scalar type represents a signed 16-bit integer.", + "format": "int16" + }, + "string": { + "type": "string" + }, + "unknown": { + "type": "string" + }, + "unsignedByte": { + "type": "integer", + "description": "The `UnsignedByte` scalar type represents an unsigned 8-bit integer.", + "format": "uint8" + }, + "unsignedInt": { + "type": "integer", + "description": "The `UnsignedInt` scalar type represents an unsigned 32-bit integer.", + "format": "uint32" + }, + "unsignedLong": { + "type": "integer", + "description": "The `UnsignedLong` scalar type represents an unsigned 64-bit integer.", + "format": "uint64" + }, + "unsignedShort": { + "type": "integer", + "description": "The `UnsignedShort` scalar type represents an unsigned 16-bit integer.", + "format": "uint16" + }, + "uri": { + "type": "string", + "description": "The `URI` scalar type represents a Uniform Resource Identifier (URI) as defined by RFC 3986.", + "format": "uri" + }, + "url": { + "type": "string", + "description": "The `URL` scalar type represents a Uniform Resource Locator (URL) as defined by RFC 3986.", + "format": "uri" + }, + "uuid": { + "pattern": "^[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}$", + "type": "string", + "description": "The `UUID` scalar type represents a Universally Unique Identifier (UUID) as defined by RFC 9562.", + "format": "uuid" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "any", + "base64String", + "boolean", + "byte", + "date", + "dateTime", + "decimal", + "duration", + "enum", + "float", + "id", + "int", + "json", + "list", + "localDate", + "localDateTime", + "localTime", + "long", + "object", + "short", + "string", + "unknown", + "url", + "uuid" + ], + "type": "object", + "properties": { + "any": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "description": "The `Any` scalar type represents any valid GraphQL value." + }, + "base64String": { + "pattern": "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$", + "type": [ + "null", + "string" + ], + "description": "The `Base64String` scalar type represents an array of bytes encoded as a Base64 string." + }, + "boolean": { + "type": [ + "null", + "boolean" + ] + }, + "byte": { + "type": [ + "null", + "integer" + ], + "description": "The `Byte` scalar type represents a signed 8-bit integer.", + "format": "int8" + }, + "date": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}$", + "type": [ + "null", + "string" + ], + "description": "The `Date` scalar type represents a date in UTC.", + "format": "date" + }, + "dateTime": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:[Zz]|[+-]\\d{2}:\\d{2})$", + "type": [ + "null", + "string" + ], + "description": "The `DateTime` scalar type represents a date and time with time zone offset information.", + "format": "date-time" + }, + "decimal": { + "type": [ + "null", + "number" + ], + "description": "The `Decimal` scalar type represents a decimal floating-point number with high precision." + }, + "duration": { + "pattern": "^-?P(?:\\d+W|(?=\\d|T(?:\\d|$))(?:\\d+Y)?(?:\\d+M)?(?:\\d+D)?(?:T(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?)$", + "type": [ + "null", + "string" + ], + "description": "The `Duration` scalar type represents a duration of time.", + "format": "duration" + }, + "enum": { + "enum": [ + "VALUE1", + "VALUE2" + ], + "type": [ + "null", + "string" + ] + }, + "float": { + "type": [ + "null", + "number" + ], + "format": "double" + }, + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "int": { + "type": [ + "null", + "integer" + ], + "format": "int32" + }, + "json": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], + "description": "The `Any` scalar type represents any valid GraphQL value." + }, + "list": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ] + } + }, + "localDate": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}$", + "type": [ + "null", + "string" + ], + "description": "The `LocalDate` scalar type represents a date without time or time zone information.", + "format": "date" + }, + "localDateTime": { + "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": [ + "null", + "string" + ], + "description": "The `LocalDateTime` scalar type represents a date and time without time zone information." + }, + "localTime": { + "pattern": "^\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": [ + "null", + "string" + ], + "description": "The `LocalTime` scalar type represents a time of day without date or time zone information." + }, + "long": { + "type": [ + "null", + "integer" + ], + "description": "The `Long` scalar type represents a signed 64-bit integer.", + "format": "int64" + }, + "object": { + "required": [ + "field1A" + ], + "type": [ + "null", + "object" + ], + "properties": { + "field1A": { + "required": [ + "field1B" + ], + "type": [ + "null", + "object" + ], + "properties": { + "field1B": { + "required": [ + "field1C" + ], + "type": [ + "null", + "object" + ], + "properties": { + "field1C": { + "pattern": "^\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$", + "type": [ + "null", + "string" + ], + "description": "The `LocalTime` scalar type represents a time of day without date or time zone information." + } + } + } + } + } + } + }, + "short": { + "type": [ + "null", + "integer" + ], + "description": "The `Short` scalar type represents a signed 16-bit integer.", + "format": "int16" + }, + "string": { + "type": [ + "null", + "string" + ] + }, + "unknown": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ], + "description": "The `URL` scalar type represents a Uniform Resource Locator (URL) as defined by RFC 3986.", + "format": "uri" + }, + "uuid": { + "pattern": "^[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}$", + "type": [ + "null", + "string" + ], + "description": "The `UUID` scalar type represents a Universally Unique Identifier (UUID) as defined by RFC 9562.", + "format": "uuid" + } + } + } + } + } + } + } + } + }, + "/users": { + "post": { + "description": "Creates a user", + "operationId": "createUser", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "id", + "name" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The user's email" + }, + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + } + }, + "get": { + "description": "Fetches all users", + "operationId": "getUsers", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "required": [ + "id" + ], + "type": [ + "null", + "object" + ], + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + } + } + } + } + } + } + } + }, + "/users/{userId}/details": { + "get": { + "operationId": "getFullUser", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + { + "name": "includeAddress", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "address": { + "$ref": "#/components/schemas/UserAddress" + } + } + } + } + } + } + } + } + }, + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + } + }, + "put": { + "description": "Updates a user's details", + "operationId": "updateUser", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "name" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The user's email" + }, + "name": { + "type": "string" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + } + } + }, + "/interface": { + "get": { + "operationId": "interfaceQuery", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "required": [ + "petType", + "name" + ], + "type": "object", + "properties": { + "petType": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "isPurring": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "isBarking": { + "type": "boolean" + } + } + } + ] + } + ] + } + } + } + } + } + } + }, + "/union": { + "get": { + "operationId": "unionQuery", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "required": [ + "petType" + ], + "type": "object", + "properties": { + "petType": { + "type": "string" + } + } + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "isPurring": { + "type": "boolean" + } + } + }, + { + "type": "object", + "properties": { + "isBarking": { + "type": "boolean" + } + } + } + ] + } + ] + } + } + } + } + } + } + }, + "/object/{userId}": { + "put": { + "operationId": "updateDeeplyNestedObject", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field", + "in": "query", + "schema": { + "type": "string", + "default": "DefaultValue" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "field", + "object" + ], + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "object": { + "required": [ + "otherField" + ], + "type": "object", + "properties": { + "otherField": { + "type": "string" + } + } + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "userId", + "field", + "object" + ], + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "field": { + "type": "string" + }, + "object": { + "required": [ + "otherField", + "field2" + ], + "type": "object", + "properties": { + "otherField": { + "type": "string" + }, + "field2": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "UserAddress": { + "required": [ + "street" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + } + }, + "description": "The user's address" + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_NET11_0.json new file mode 100644 index 00000000000..d09669613a1 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_NET11_0.json @@ -0,0 +1,64 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "name", + "email" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Default_Value_For_Variable_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Default_Value_For_Variable_NET11_0.json new file mode 100644 index 00000000000..9e25ad2843f --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Default_Value_For_Variable_NET11_0.json @@ -0,0 +1,86 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}/details": { + "get": { + "operationId": "getFullUser", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + }, + { + "name": "includeAddress", + "in": "query", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "address": { + "required": [ + "street" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Fields_And_FragmentDocument_Reference_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Fields_And_FragmentDocument_Reference_NET11_0.json new file mode 100644 index 00000000000..005bd3808f5 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Fields_And_FragmentDocument_Reference_NET11_0.json @@ -0,0 +1,93 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + { + "$ref": "#/components/schemas/User" + } + ] + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "User": { + "required": [ + "name", + "email" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Fields_And_Local_Fragment_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Fields_And_Local_Fragment_NET11_0.json new file mode 100644 index 00000000000..21e2edd7a82 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Fields_And_Local_Fragment_NET11_0.json @@ -0,0 +1,86 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + { + "required": [ + "name", + "email" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + ] + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_FragmentDocument_Reference_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_FragmentDocument_Reference_NET11_0.json new file mode 100644 index 00000000000..ddecfa5f597 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_FragmentDocument_Reference_NET11_0.json @@ -0,0 +1,82 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "User": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_FragmentDocument_Reference_On_Nullable_Field_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_FragmentDocument_Reference_On_Nullable_Field_NET11_0.json new file mode 100644 index 00000000000..07051e7d398 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_FragmentDocument_Reference_On_Nullable_Field_NET11_0.json @@ -0,0 +1,79 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "preferences" + ], + "type": "object", + "properties": { + "preferences": { + "allOf": [ + { + "$ref": "#/components/schemas/Preferences" + }, + { + "type": "null" + } + ] + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Preferences": { + "required": [ + "color" + ], + "type": "object", + "properties": { + "color": { + "type": "string" + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_List_Of_Unions_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_List_Of_Unions_NET11_0.json new file mode 100644 index 00000000000..51ddf7ce939 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_List_Of_Unions_NET11_0.json @@ -0,0 +1,82 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/pets": { + "get": { + "description": "Fetches a list of pets", + "operationId": "getPets", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "petType" + ], + "type": "object", + "properties": { + "petType": { + "type": "string" + } + } + }, + { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "isPurring": { + "type": "boolean" + } + } + } + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "isBarking": { + "type": "boolean" + } + } + } + ] + } + ] + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_List_With_Nullable_And_NonNull_Items_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_List_With_Nullable_And_NonNull_Items_NET11_0.json new file mode 100644 index 00000000000..86d946c31a6 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_List_With_Nullable_And_NonNull_Items_NET11_0.json @@ -0,0 +1,59 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/list-nonnull": { + "get": { + "description": "Fetches a list with non-null items", + "operationId": "getListNonNullItems", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "/list-nullable": { + "get": { + "description": "Fetches a list with nullable items", + "operationId": "getListNullableItems", + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Local_Fragment_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Local_Fragment_NET11_0.json new file mode 100644 index 00000000000..3e453e0ed01 --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Local_Fragment_NET11_0.json @@ -0,0 +1,75 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Local_Fragment_With_FragmentDocument_Reference_NET11_0.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Local_Fragment_With_FragmentDocument_Reference_NET11_0.json new file mode 100644 index 00000000000..7bb0e9d657c --- /dev/null +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OperationDocument_With_Local_Fragment_With_FragmentDocument_Reference_NET11_0.json @@ -0,0 +1,95 @@ +{ + "openapi": "3.1.2", + "info": { + "title": "HotChocolate.Adapters.OpenApi.Tests | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/users/{userId}": { + "get": { + "description": "Fetches a user by their id", + "operationId": "getUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + ], + "responses": { + "200": { + "description": null, + "content": { + "application/json": { + "schema": { + "required": [ + "id", + "name", + "email", + "address" + ], + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "name": { + "type": "string" + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "address": { + "$ref": "#/components/schemas/Address" + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Address": { + "required": [ + "street" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + } + }, + "description": "An address" + } + } + } +} diff --git a/src/HotChocolate/Core/benchmarks/Execution.Abstractions.Benchmarks/HotChocolate.Execution.Abstractions.Benchmarks.csproj b/src/HotChocolate/Core/benchmarks/Execution.Abstractions.Benchmarks/HotChocolate.Execution.Abstractions.Benchmarks.csproj index be09cc91e25..39e10f50f2a 100644 --- a/src/HotChocolate/Core/benchmarks/Execution.Abstractions.Benchmarks/HotChocolate.Execution.Abstractions.Benchmarks.csproj +++ b/src/HotChocolate/Core/benchmarks/Execution.Abstractions.Benchmarks/HotChocolate.Execution.Abstractions.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 true Preview HotChocolate.Execution.Abstractions.Benchmarks diff --git a/src/HotChocolate/Core/benchmarks/Validation.Benchmarks/HotChocolate.Validation.Benchmarks.csproj b/src/HotChocolate/Core/benchmarks/Validation.Benchmarks/HotChocolate.Validation.Benchmarks.csproj index 7f58445b780..641c1ac9ed7 100644 --- a/src/HotChocolate/Core/benchmarks/Validation.Benchmarks/HotChocolate.Validation.Benchmarks.csproj +++ b/src/HotChocolate/Core/benchmarks/Validation.Benchmarks/HotChocolate.Validation.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 true Preview HotChocolate.Validation.Benchmarks diff --git a/src/HotChocolate/Core/src/Types/Types/Scalars/DateTimeType.cs b/src/HotChocolate/Core/src/Types/Types/Scalars/DateTimeType.cs index e8980cf3476..6d5271c5f4a 100644 --- a/src/HotChocolate/Core/src/Types/Types/Scalars/DateTimeType.cs +++ b/src/HotChocolate/Core/src/Types/Types/Scalars/DateTimeType.cs @@ -143,10 +143,16 @@ protected override StringValueNode OnValueToLiteral(DateTimeOffset runtimeValue) private bool TryParseStringValue(string serialized, out DateTimeOffset value) { // Check format. - if (_options.ValidateInputFormat && !_dateTimeRegex.IsMatch(serialized)) + if (_options.ValidateInputFormat) { - value = default; - return false; + var match = _dateTimeRegex.Match(serialized); + + // RFC 3339 does not support specifying the hour as 24. + if (!match.Success || match.Groups["hour"].Value == "24") + { + value = default; + return false; + } } if (DateTimeOffset.TryParse( @@ -202,52 +208,52 @@ private Regex GetDateTimeRegex() }; [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex0(); [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9])?(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9])?(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex1(); [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,2})?(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,2})?(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex2(); [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,3})?(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,3})?(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex3(); [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,4})?(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,4})?(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex4(); [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,5})?(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,5})?(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex5(); [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex6(); [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,7})?(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,7})?(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex7(); [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,8})?(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,8})?(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex8(); [GeneratedRegex( - @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,9})?(Z|[+-][0-9]{2}:[0-9]{2})\z", + @"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,9})?(Z|[+-][0-9]{2}:[0-9]{2})\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex DateTimeRegex9(); } diff --git a/src/HotChocolate/Core/src/Types/Types/Scalars/LocalDateTimeType.cs b/src/HotChocolate/Core/src/Types/Types/Scalars/LocalDateTimeType.cs index 729f5973946..d3bf9f72e37 100644 --- a/src/HotChocolate/Core/src/Types/Types/Scalars/LocalDateTimeType.cs +++ b/src/HotChocolate/Core/src/Types/Types/Scalars/LocalDateTimeType.cs @@ -133,10 +133,16 @@ protected override StringValueNode OnValueToLiteral(DateTime runtimeValue) private bool TryParseStringValue(string serialized, out DateTime value) { // Check format. - if (_options.ValidateInputFormat && !_localDateTimeRegex.IsMatch(serialized)) + if (_options.ValidateInputFormat) { - value = default; - return false; + var match = _localDateTimeRegex.Match(serialized); + + // RFC 3339 does not support specifying the hour as 24. + if (!match.Success || match.Groups["hour"].Value == "24") + { + value = default; + return false; + } } if (DateTime.TryParse( @@ -181,43 +187,43 @@ private Regex GetLocalDateTimeRegex() _ => LocalDateTimeRegex9() }; - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex0(); - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9])?\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9])?\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex1(); - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,2})?\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,2})?\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex2(); - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,3})?\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,3})?\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex3(); - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,4})?\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,4})?\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex4(); - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,5})?\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,5})?\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex5(); - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex6(); - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,7})?\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,7})?\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex7(); - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,8})?\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,8})?\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex8(); - [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,9})?\z", + [GeneratedRegex(@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,9})?\z", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase)] private static partial Regex LocalDateTimeRegex9(); } diff --git a/src/HotChocolate/Core/src/Types/Types/Scalars/LocalTimeType.cs b/src/HotChocolate/Core/src/Types/Types/Scalars/LocalTimeType.cs index 1bd84e81695..e86831547bb 100644 --- a/src/HotChocolate/Core/src/Types/Types/Scalars/LocalTimeType.cs +++ b/src/HotChocolate/Core/src/Types/Types/Scalars/LocalTimeType.cs @@ -132,10 +132,16 @@ protected override StringValueNode OnValueToLiteral(TimeOnly runtimeValue) private bool TryParseStringValue(string serialized, out TimeOnly value) { // Check format. - if (_options.ValidateInputFormat && !_localTimeRegex.IsMatch(serialized)) + if (_options.ValidateInputFormat) { - value = default; - return false; + var match = _localTimeRegex.Match(serialized); + + // RFC 3339 does not support specifying the hour as 24. + if (!match.Success || match.Groups["hour"].Value == "24") + { + value = default; + return false; + } } if (TimeOnly.TryParse( @@ -179,33 +185,33 @@ private Regex GetLocalTimeRegex() _ => LocalTimeRegex9() }; - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex0(); - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9])?\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9])?\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex1(); - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,2})?\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,2})?\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex2(); - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,3})?\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,3})?\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex3(); - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,4})?\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,4})?\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex4(); - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,5})?\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,5})?\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex5(); - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex6(); - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,7})?\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,7})?\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex7(); - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,8})?\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,8})?\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex8(); - [GeneratedRegex(@"^[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,9})?\z", RegexOptions.ExplicitCapture)] + [GeneratedRegex(@"^(?[0-9]{2}):[0-9]{2}:[0-9]{2}(\.[0-9]{1,9})?\z", RegexOptions.ExplicitCapture)] private static partial Regex LocalTimeRegex9(); } diff --git a/src/HotChocolate/Core/test/Types.Analyzers.Tests/HotChocolate.Types.Analyzers.Tests.csproj b/src/HotChocolate/Core/test/Types.Analyzers.Tests/HotChocolate.Types.Analyzers.Tests.csproj index 78a45915e2a..86b77590861 100644 --- a/src/HotChocolate/Core/test/Types.Analyzers.Tests/HotChocolate.Types.Analyzers.Tests.csproj +++ b/src/HotChocolate/Core/test/Types.Analyzers.Tests/HotChocolate.Types.Analyzers.Tests.csproj @@ -30,6 +30,7 @@ + diff --git a/src/HotChocolate/Core/test/Types.Analyzers.Tests/SourceGeneratorOffsetPagingReproTests.cs b/src/HotChocolate/Core/test/Types.Analyzers.Tests/SourceGeneratorOffsetPagingReproTests.cs index 5f7c31e09be..676d9838af5 100644 --- a/src/HotChocolate/Core/test/Types.Analyzers.Tests/SourceGeneratorOffsetPagingReproTests.cs +++ b/src/HotChocolate/Core/test/Types.Analyzers.Tests/SourceGeneratorOffsetPagingReproTests.cs @@ -521,6 +521,8 @@ private static Assembly CompileReproAssembly(string source, string assemblyName) .. Net90.References.All, #elif NET10_0 .. Net100.References.All, +#elif NET11_0 + .. Net110.References.All, #endif MetadataReference.CreateFromFile(typeof(ITypeSystemMember).Assembly.Location), MetadataReference.CreateFromFile(typeof(RequestDelegate).Assembly.Location), diff --git a/src/HotChocolate/Core/test/Types.Analyzers.Tests/TestHelper.cs b/src/HotChocolate/Core/test/Types.Analyzers.Tests/TestHelper.cs index 6737b92db28..d5ad167bf82 100644 --- a/src/HotChocolate/Core/test/Types.Analyzers.Tests/TestHelper.cs +++ b/src/HotChocolate/Core/test/Types.Analyzers.Tests/TestHelper.cs @@ -47,6 +47,8 @@ public static Snapshot GetGeneratedSourceSnapshot( .. Net90.References.All, #elif NET10_0 .. Net100.References.All, +#elif NET11_0 + .. Net110.References.All, #endif // HotChocolate.Primitives MetadataReference.CreateFromFile(typeof(ITypeSystemMember).Assembly.Location), diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/DateTimeTypeTests.cs b/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/DateTimeTypeTests.cs index c88ee7b15a3..f51d02f75b3 100644 --- a/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/DateTimeTypeTests.cs +++ b/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/DateTimeTypeTests.cs @@ -371,8 +371,8 @@ public static TheoryData InvalidInput() { DateTimeOptions.DefaultInputPrecision, "2023-12-24T15:30:00" }, // Space instead of T or t separator. { DateTimeOptions.DefaultInputPrecision, "2023-12-24 15:30:00Z" }, - // Invalid hour (25). - { DateTimeOptions.DefaultInputPrecision, "2023-12-24T25:00:00Z" }, + // Invalid hour (24). + { DateTimeOptions.DefaultInputPrecision, "2023-12-24T24:00:00Z" }, // Invalid minute (60). { DateTimeOptions.DefaultInputPrecision, "2023-12-24T15:60:00Z" }, // ReSharper disable once GrammarMistakeInComment diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/LocalDateTimeTypeTests.cs b/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/LocalDateTimeTypeTests.cs index 4a6b1914dbc..26d4bad5d3f 100644 --- a/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/LocalDateTimeTypeTests.cs +++ b/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/LocalDateTimeTypeTests.cs @@ -394,8 +394,8 @@ public static TheoryData InvalidInput() { DateTimeOptions.DefaultInputPrecision, "2023-12-24T15:30:00+05:30" }, // Invalid separator (space instead of T or t). { DateTimeOptions.DefaultInputPrecision, "2023-12-24 15:30:00" }, - // Invalid hour (25). - { DateTimeOptions.DefaultInputPrecision, "2023-12-24T25:00:00" }, + // Invalid hour (24). + { DateTimeOptions.DefaultInputPrecision, "2023-12-24T24:00:00" }, // Invalid minute (60). { DateTimeOptions.DefaultInputPrecision, "2023-12-24T15:60:00" }, // ReSharper disable once GrammarMistakeInComment diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/IntegrationTests.cs b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/IntegrationTests.cs index b3576ee3f5e..d8257e52a7a 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/IntegrationTests.cs +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/IntegrationTests.cs @@ -11,6 +11,7 @@ using HotChocolate.Types.Pagination.Utilities; using Microsoft.Extensions.DependencyInjection; using Squadron; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data; @@ -50,10 +51,7 @@ public async Task Paging_With_Default_Sorting() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -86,10 +84,7 @@ public async Task Paging_Next_2_With_Default_Sorting() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -123,10 +118,7 @@ public async Task Paging_With_Default_Sorting_And_TotalCount() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -183,10 +175,7 @@ public async Task Paging_With_PagingFlags_Override() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -219,10 +208,7 @@ public async Task Paging_With_User_Sorting() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -255,10 +241,7 @@ public async Task Paging_Next_2_With_User_Sorting() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -293,10 +276,7 @@ public async Task Paging_First_10_With_Default_Sorting_HasNextPage() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -331,10 +311,7 @@ public async Task Paging_Last_10_With_Default_Sorting_HasPreviousPage() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -370,10 +347,7 @@ public async Task Paging_Fetch_First_2_Items_Between() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -409,10 +383,7 @@ public async Task Paging_Fetch_Last_2_Items_Between() """) .SetGlobalState("printSQL", true)); - result.MatchMarkdownSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + result.MatchMarkdownSnapshot(Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_First_2_Items_Between.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_First_2_Items_Between.md index 159107a9c58..d6a766ec306 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_First_2_Items_Between.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_First_2_Items_Between.md @@ -21,7 +21,7 @@ } }, "extensions": { - "sql": "-- @__value_0='1'\n-- @__value_1='4'\n-- @__p_2='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Id\" > @__value_0 AND b.\"Id\" < @__value_1\nORDER BY b.\"Id\"\nLIMIT @__p_2" + "sql": "-- @value='1'\n-- @value1='4'\n-- @p='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Id\" > @value AND b.\"Id\" < @value1\nORDER BY b.\"Id\"\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_First_2_Items_Between_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_First_2_Items_Between_NET8_0_NET9_0.md new file mode 100644 index 00000000000..159107a9c58 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_First_2_Items_Between_NET8_0_NET9_0.md @@ -0,0 +1,27 @@ +# Paging_Fetch_First_2_Items_Between + +```json +{ + "data": { + "brands": { + "nodes": [ + { + "name": "Brand1" + }, + { + "name": "Brand2" + } + ], + "pageInfo": { + "hasNextPage": true, + "hasPreviousPage": true, + "endCursor": "e30z", + "startCursor": "e30y" + } + } + }, + "extensions": { + "sql": "-- @__value_0='1'\n-- @__value_1='4'\n-- @__p_2='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Id\" > @__value_0 AND b.\"Id\" < @__value_1\nORDER BY b.\"Id\"\nLIMIT @__p_2" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_Last_2_Items_Between.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_Last_2_Items_Between.md index 0067bcc6e2c..4c21904a4d8 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_Last_2_Items_Between.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_Last_2_Items_Between.md @@ -21,7 +21,7 @@ } }, "extensions": { - "sql": "-- @__value_0='97'\n-- @__value_1='100'\n-- @__p_2='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Id\" > @__value_0 AND b.\"Id\" < @__value_1\nORDER BY b.\"Id\" DESC\nLIMIT @__p_2" + "sql": "-- @value='97'\n-- @value1='100'\n-- @p='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Id\" > @value AND b.\"Id\" < @value1\nORDER BY b.\"Id\" DESC\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_Last_2_Items_Between_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_Last_2_Items_Between_NET8_0_NET9_0.md new file mode 100644 index 00000000000..0067bcc6e2c --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Fetch_Last_2_Items_Between_NET8_0_NET9_0.md @@ -0,0 +1,27 @@ +# Paging_Fetch_Last_2_Items_Between + +```json +{ + "data": { + "brands": { + "nodes": [ + { + "name": "Brand97" + }, + { + "name": "Brand98" + } + ], + "pageInfo": { + "hasNextPage": true, + "hasPreviousPage": true, + "endCursor": "e305OQ==", + "startCursor": "e305OA==" + } + } + }, + "extensions": { + "sql": "-- @__value_0='97'\n-- @__value_1='100'\n-- @__p_2='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Id\" > @__value_0 AND b.\"Id\" < @__value_1\nORDER BY b.\"Id\" DESC\nLIMIT @__p_2" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_First_10_With_Default_Sorting_HasNextPage.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_First_10_With_Default_Sorting_HasNextPage.md index 3c5927cd5bc..af8dd68846d 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_First_10_With_Default_Sorting_HasNextPage.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_First_10_With_Default_Sorting_HasNextPage.md @@ -44,7 +44,7 @@ } }, "extensions": { - "sql": "-- @__p_0='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Id\"\nLIMIT @__p_0" + "sql": "-- @p='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Id\"\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_First_10_With_Default_Sorting_HasNextPage_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_First_10_With_Default_Sorting_HasNextPage_NET8_0_NET9_0.md new file mode 100644 index 00000000000..3c5927cd5bc --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_First_10_With_Default_Sorting_HasNextPage_NET8_0_NET9_0.md @@ -0,0 +1,50 @@ +# Paging_First_10_With_Default_Sorting_HasNextPage + +```json +{ + "data": { + "brands": { + "nodes": [ + { + "name": "Brand0" + }, + { + "name": "Brand1" + }, + { + "name": "Brand2" + }, + { + "name": "Brand3" + }, + { + "name": "Brand4" + }, + { + "name": "Brand5" + }, + { + "name": "Brand6" + }, + { + "name": "Brand7" + }, + { + "name": "Brand8" + }, + { + "name": "Brand9" + } + ], + "pageInfo": { + "hasNextPage": true, + "hasPreviousPage": false, + "endCursor": "e30xMA==" + } + } + }, + "extensions": { + "sql": "-- @__p_0='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Id\"\nLIMIT @__p_0" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Last_10_With_Default_Sorting_HasPreviousPage.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Last_10_With_Default_Sorting_HasPreviousPage.md index c2e32d28cbe..15f74feade0 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Last_10_With_Default_Sorting_HasPreviousPage.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Last_10_With_Default_Sorting_HasPreviousPage.md @@ -44,7 +44,7 @@ } }, "extensions": { - "sql": "-- @__p_0='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Id\" DESC\nLIMIT @__p_0" + "sql": "-- @p='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Id\" DESC\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Last_10_With_Default_Sorting_HasPreviousPage_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Last_10_With_Default_Sorting_HasPreviousPage_NET8_0_NET9_0.md new file mode 100644 index 00000000000..c2e32d28cbe --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Last_10_With_Default_Sorting_HasPreviousPage_NET8_0_NET9_0.md @@ -0,0 +1,50 @@ +# Paging_Last_10_With_Default_Sorting_HasPreviousPage + +```json +{ + "data": { + "brands": { + "nodes": [ + { + "name": "Brand90" + }, + { + "name": "Brand91" + }, + { + "name": "Brand92" + }, + { + "name": "Brand93" + }, + { + "name": "Brand94" + }, + { + "name": "Brand95" + }, + { + "name": "Brand96" + }, + { + "name": "Brand97" + }, + { + "name": "Brand98" + }, + { + "name": "Brand99" + } + ], + "pageInfo": { + "hasNextPage": false, + "hasPreviousPage": true, + "endCursor": "e30xMDA=" + } + } + }, + "extensions": { + "sql": "-- @__p_0='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Id\" DESC\nLIMIT @__p_0" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_Default_Sorting.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_Default_Sorting.md index b9e674d8359..ea8f74a303d 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_Default_Sorting.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_Default_Sorting.md @@ -18,7 +18,7 @@ } }, "extensions": { - "sql": "-- @__value_0='10'\n-- @__p_1='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Id\" > @__value_0\nORDER BY b.\"Id\"\nLIMIT @__p_1" + "sql": "-- @value='10'\n-- @p='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Id\" > @value\nORDER BY b.\"Id\"\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_Default_Sorting_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_Default_Sorting_NET8_0_NET9_0.md new file mode 100644 index 00000000000..b9e674d8359 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_Default_Sorting_NET8_0_NET9_0.md @@ -0,0 +1,24 @@ +# Paging_Next_2_With_Default_Sorting + +```json +{ + "data": { + "brands": { + "nodes": [ + { + "name": "Brand10" + }, + { + "name": "Brand11" + } + ], + "pageInfo": { + "endCursor": "e30xMg==" + } + } + }, + "extensions": { + "sql": "-- @__value_0='10'\n-- @__p_1='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Id\" > @__value_0\nORDER BY b.\"Id\"\nLIMIT @__p_1" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_User_Sorting.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_User_Sorting.md index 6f66e23f6c1..f9f13a16aa9 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_User_Sorting.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_User_Sorting.md @@ -18,7 +18,7 @@ } }, "extensions": { - "sql": "-- @__value_0='Brand17'\n-- @__value_1='18'\n-- @__p_2='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Name\" > @__value_0 OR (b.\"Name\" = @__value_0 AND b.\"Id\" > @__value_1)\nORDER BY b.\"Name\", b.\"Id\"\nLIMIT @__p_2" + "sql": "-- @value='Brand17'\n-- @value2='18'\n-- @p='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Name\" > @value OR (b.\"Name\" = @value AND b.\"Id\" > @value2)\nORDER BY b.\"Name\", b.\"Id\"\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_User_Sorting_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_User_Sorting_NET8_0_NET9_0.md new file mode 100644 index 00000000000..6f66e23f6c1 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_Next_2_With_User_Sorting_NET8_0_NET9_0.md @@ -0,0 +1,24 @@ +# Paging_Next_2_With_User_Sorting + +```json +{ + "data": { + "brands": { + "nodes": [ + { + "name": "Brand18" + }, + { + "name": "Brand19" + } + ], + "pageInfo": { + "endCursor": "e31CcmFuZDE5OjIw" + } + } + }, + "extensions": { + "sql": "-- @__value_0='Brand17'\n-- @__value_1='18'\n-- @__p_2='3'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nWHERE b.\"Name\" > @__value_0 OR (b.\"Name\" = @__value_0 AND b.\"Id\" > @__value_1)\nORDER BY b.\"Name\", b.\"Id\"\nLIMIT @__p_2" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting.md index d3b5d6aef0f..fa053263b73 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting.md @@ -42,7 +42,7 @@ } }, "extensions": { - "sql": "-- @__p_0='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Id\"\nLIMIT @__p_0" + "sql": "-- @p='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Id\"\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_And_TotalCount.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_And_TotalCount.md index e20684c56e4..e140bd8f6fa 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_And_TotalCount.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_And_TotalCount.md @@ -43,7 +43,7 @@ } }, "extensions": { - "sql": "-- @__p_0='11'\nSELECT p.\"Id\", p.\"AvailableStock\", p.\"BrandId\", p.\"Description\", p.\"ImageFileName\", p.\"MaxStockThreshold\", p.\"Name\", p.\"OnReorder\", p.\"Price\", p.\"RestockThreshold\", p.\"TypeId\"\nFROM \"Products\" AS p\nORDER BY p.\"Id\"\nLIMIT @__p_0" + "sql": "-- @p='11'\nSELECT p.\"Id\", p.\"AvailableStock\", p.\"BrandId\", p.\"Description\", p.\"ImageFileName\", p.\"MaxStockThreshold\", p.\"Name\", p.\"OnReorder\", p.\"Price\", p.\"RestockThreshold\", p.\"TypeId\"\nFROM \"Products\" AS p\nORDER BY p.\"Id\"\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_And_TotalCount_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_And_TotalCount_NET8_0_NET9_0.md new file mode 100644 index 00000000000..e20684c56e4 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_And_TotalCount_NET8_0_NET9_0.md @@ -0,0 +1,49 @@ +# Paging_With_Default_Sorting_And_TotalCount + +```json +{ + "data": { + "products": { + "nodes": [ + { + "name": "Product 0-0" + }, + { + "name": "Product 0-1" + }, + { + "name": "Product 0-2" + }, + { + "name": "Product 0-3" + }, + { + "name": "Product 0-4" + }, + { + "name": "Product 0-5" + }, + { + "name": "Product 0-6" + }, + { + "name": "Product 0-7" + }, + { + "name": "Product 0-8" + }, + { + "name": "Product 0-9" + } + ], + "pageInfo": { + "endCursor": "e30xMA==" + }, + "totalCount": 10000 + } + }, + "extensions": { + "sql": "-- @__p_0='11'\nSELECT p.\"Id\", p.\"AvailableStock\", p.\"BrandId\", p.\"Description\", p.\"ImageFileName\", p.\"MaxStockThreshold\", p.\"Name\", p.\"OnReorder\", p.\"Price\", p.\"RestockThreshold\", p.\"TypeId\"\nFROM \"Products\" AS p\nORDER BY p.\"Id\"\nLIMIT @__p_0" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_NET8_0_NET9_0.md new file mode 100644 index 00000000000..d3b5d6aef0f --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_Default_Sorting_NET8_0_NET9_0.md @@ -0,0 +1,48 @@ +# Paging_With_Default_Sorting + +```json +{ + "data": { + "brands": { + "nodes": [ + { + "name": "Brand0" + }, + { + "name": "Brand1" + }, + { + "name": "Brand2" + }, + { + "name": "Brand3" + }, + { + "name": "Brand4" + }, + { + "name": "Brand5" + }, + { + "name": "Brand6" + }, + { + "name": "Brand7" + }, + { + "name": "Brand8" + }, + { + "name": "Brand9" + } + ], + "pageInfo": { + "endCursor": "e30xMA==" + } + } + }, + "extensions": { + "sql": "-- @__p_0='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Id\"\nLIMIT @__p_0" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_PagingFlags_Override.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_PagingFlags_Override.md index 7b8f3fa5e9f..088e49b2ede 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_PagingFlags_Override.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_PagingFlags_Override.md @@ -8,7 +8,7 @@ } }, "extensions": { - "sql": "-- @__p_0='11'\nSELECT p.\"Id\", p.\"AvailableStock\", p.\"BrandId\", p.\"Description\", p.\"ImageFileName\", p.\"MaxStockThreshold\", p.\"Name\", p.\"OnReorder\", p.\"Price\", p.\"RestockThreshold\", p.\"TypeId\"\nFROM \"Products\" AS p\nORDER BY p.\"Id\"\nLIMIT @__p_0" + "sql": "-- @p='11'\nSELECT p.\"Id\", p.\"AvailableStock\", p.\"BrandId\", p.\"Description\", p.\"ImageFileName\", p.\"MaxStockThreshold\", p.\"Name\", p.\"OnReorder\", p.\"Price\", p.\"RestockThreshold\", p.\"TypeId\"\nFROM \"Products\" AS p\nORDER BY p.\"Id\"\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_PagingFlags_Override_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_PagingFlags_Override_NET8_0_NET9_0.md new file mode 100644 index 00000000000..7b8f3fa5e9f --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_PagingFlags_Override_NET8_0_NET9_0.md @@ -0,0 +1,14 @@ +# Paging_With_PagingFlags_Override + +```json +{ + "data": { + "products": { + "pageCount": 10 + } + }, + "extensions": { + "sql": "-- @__p_0='11'\nSELECT p.\"Id\", p.\"AvailableStock\", p.\"BrandId\", p.\"Description\", p.\"ImageFileName\", p.\"MaxStockThreshold\", p.\"Name\", p.\"OnReorder\", p.\"Price\", p.\"RestockThreshold\", p.\"TypeId\"\nFROM \"Products\" AS p\nORDER BY p.\"Id\"\nLIMIT @__p_0" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_User_Sorting.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_User_Sorting.md index 028591a273a..8c6bdd75620 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_User_Sorting.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_User_Sorting.md @@ -42,7 +42,7 @@ } }, "extensions": { - "sql": "-- @__p_0='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Name\", b.\"Id\"\nLIMIT @__p_0" + "sql": "-- @p='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Name\", b.\"Id\"\nLIMIT @p" } } ``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_User_Sorting_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_User_Sorting_NET8_0_NET9_0.md new file mode 100644 index 00000000000..028591a273a --- /dev/null +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Pagination.Tests/__snapshots__/IntegrationTests.Paging_With_User_Sorting_NET8_0_NET9_0.md @@ -0,0 +1,48 @@ +# Paging_With_User_Sorting + +```json +{ + "data": { + "brands": { + "nodes": [ + { + "name": "Brand0" + }, + { + "name": "Brand1" + }, + { + "name": "Brand10" + }, + { + "name": "Brand11" + }, + { + "name": "Brand12" + }, + { + "name": "Brand13" + }, + { + "name": "Brand14" + }, + { + "name": "Brand15" + }, + { + "name": "Brand16" + }, + { + "name": "Brand17" + } + ], + "pageInfo": { + "endCursor": "e31CcmFuZDE3OjE4" + } + } + }, + "extensions": { + "sql": "-- @__p_0='11'\nSELECT b.\"Id\", b.\"AlwaysNull\", b.\"DisplayName\", b.\"Name\", b.\"BrandDetails_Country_Name\"\nFROM \"Brands\" AS b\nORDER BY b.\"Name\", b.\"Id\"\nLIMIT @__p_0" + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/EntityFrameworkExecutableTests.cs b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/EntityFrameworkExecutableTests.cs index 01760993445..004745404b5 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/EntityFrameworkExecutableTests.cs +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/EntityFrameworkExecutableTests.cs @@ -1,3 +1,5 @@ +using static CookieCrumble.TestEnvironment; + namespace HotChocolate.Data; public class EntityFrameworkExecutableTests(AuthorFixture authorFixture) @@ -57,10 +59,7 @@ public async Task ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault() var result = await executable.SingleOrDefaultAsync(CancellationToken.None); // assert - new { result, executable = executable.Print() }.MatchSnapshot( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null); + new { result, executable = executable.Print() }.MatchSnapshot(Postfix([NET8_0, NET9_0])); } [Fact] diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault.snap b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault.snap index d56dccd2827..94b00172d25 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault.snap +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault.snap @@ -10,5 +10,5 @@ } ] }, - "executable": ".param set @__p_0 1\n\nSELECT \"a\".\"Id\", \"a\".\"Name\"\nFROM \"Authors\" AS \"a\"\nLIMIT @__p_0" + "executable": ".param set @p 1\n\nSELECT \"a\".\"Id\", \"a\".\"Name\"\nFROM \"Authors\" AS \"a\"\nLIMIT @p" } diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET10_0.snap b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET8_0_NET9_0.snap similarity index 56% rename from src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET10_0.snap rename to src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET8_0_NET9_0.snap index 94b00172d25..d56dccd2827 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/EntityFrameworkExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET8_0_NET9_0.snap @@ -10,5 +10,5 @@ } ] }, - "executable": ".param set @p 1\n\nSELECT \"a\".\"Id\", \"a\".\"Name\"\nFROM \"Authors\" AS \"a\"\nLIMIT @p" + "executable": ".param set @__p_0 1\n\nSELECT \"a\".\"Id\", \"a\".\"Name\"\nFROM \"Authors\" AS \"a\"\nLIMIT @__p_0" } diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs index b30dc0c65ee..0f5f82b3883 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs @@ -6,6 +6,7 @@ using HotChocolate.Data.TestContext; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Predicates; @@ -38,10 +39,7 @@ public async Task Filter_With_Expression() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -74,10 +72,7 @@ public async Task Filter_With_Multi_Expression() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0], [NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -110,10 +105,7 @@ public async Task Filter_With_Filtering() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -149,10 +141,7 @@ public async Task Filter_With_Aliased_Filtering() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -185,10 +174,7 @@ public async Task Filter_With_Expression_Null() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorBooleanTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorBooleanTests.cs index 6baeab8aa87..8f1e1d44fbd 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorBooleanTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorBooleanTests.cs @@ -1,4 +1,5 @@ using HotChocolate.Execution; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Filters; @@ -39,8 +40,8 @@ public async Task Create_BooleanEqual_Expression() // assert await Snapshot .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework + postFix: TargetFramework == "NET10_0" + ? TargetFramework : null) .AddResult(res1, "true") .AddResult(res2, "false") @@ -67,8 +68,8 @@ public async Task Create_BooleanNotEqual_Expression() // assert await Snapshot .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework + postFix: TargetFramework == "NET10_0" + ? TargetFramework : null) .AddResult(res1, "true") .AddResult(res2, "false") @@ -99,10 +100,7 @@ public async Task Create_NullableBooleanEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "true") .AddResult(res2, "false") .AddResult(res3, "null") @@ -134,10 +132,7 @@ public async Task Create_NullableBooleanNotEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "true") .AddResult(res2, "false") .AddResult(res3, "null") diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorComparableTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorComparableTests.cs index 1b8ef636259..a1c9a368b4f 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorComparableTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorComparableTests.cs @@ -1,4 +1,5 @@ using HotChocolate.Execution; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Filters; @@ -45,10 +46,7 @@ public async Task Create_ShortEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "null") @@ -79,10 +77,7 @@ public async Task Create_ShortNotEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "null") @@ -118,10 +113,7 @@ public async Task Create_ShortGreaterThan_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -158,10 +150,7 @@ public async Task Create_ShortNotGreaterThan_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -198,10 +187,7 @@ public async Task Create_ShortGreaterThanOrEquals_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -238,10 +224,7 @@ public async Task Create_ShortNotGreaterThanOrEquals_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -278,10 +261,7 @@ public async Task Create_ShortLowerThan_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -318,10 +298,7 @@ public async Task Create_ShortNotLowerThan_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -358,10 +335,7 @@ public async Task Create_ShortLowerThanOrEquals_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -398,10 +372,7 @@ public async Task Create_ShortNotLowerThanOrEquals_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -433,10 +404,7 @@ public async Task Create_ShortIn_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12and13") .AddResult(res2, "13and14") .AddResult(res3, "nullAnd14") @@ -467,10 +435,7 @@ public async Task Create_ShortNotIn_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12and13") .AddResult(res2, "13and14") .AddResult(res3, "nullAnd14") @@ -501,10 +466,7 @@ public async Task Create_ShortNullableEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "null") @@ -535,10 +497,7 @@ public async Task Create_ShortNullableNotEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "null") @@ -574,10 +533,7 @@ public async Task Create_ShortNullableGreaterThan_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -614,7 +570,7 @@ public async Task Create_ShortNullableNotGreaterThan_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -651,10 +607,7 @@ public async Task Create_ShortNullableGreaterThanOrEquals_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -691,7 +644,7 @@ public async Task Create_ShortNullableNotGreaterThanOrEquals_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -728,10 +681,7 @@ public async Task Create_ShortNullableLowerThan_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -768,7 +718,7 @@ public async Task Create_ShortNullableNotLowerThan_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -805,10 +755,7 @@ public async Task Create_ShortNullableLowerThanOrEquals_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -845,7 +792,7 @@ public async Task Create_ShortNullableNotLowerThanOrEquals_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "14") @@ -877,7 +824,7 @@ public async Task Create_ShortNullableIn_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12and13") .AddResult(res2, "13and14") .AddResult(res3, "13andNull") @@ -908,7 +855,7 @@ public async Task Create_ShortNullableNotIn_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12and13") .AddResult(res2, "13and14") .AddResult(res3, "13andNull") diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorEnumTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorEnumTests.cs index ecde8bc4703..8854d121356 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorEnumTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorEnumTests.cs @@ -1,4 +1,5 @@ using HotChocolate.Execution; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Filters; @@ -47,10 +48,7 @@ public async Task Create_EnumEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BAR") .AddResult(res2, "FOO") .AddResult(res3, "null") @@ -81,10 +79,7 @@ public async Task Create_EnumNotEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BAR") .AddResult(res2, "FOO") .AddResult(res3, "null") @@ -115,10 +110,7 @@ public async Task Create_EnumIn_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BarAndFoo") .AddResult(res2, "FOO") .AddResult(res3, "nullAndFoo") @@ -149,10 +141,7 @@ public async Task Create_EnumNotIn_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BarAndFoo") .AddResult(res2, "FOO") .AddResult(res3, "nullAndFoo") @@ -184,10 +173,7 @@ public async Task Create_NullableEnumEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BAR") .AddResult(res2, "FOO") .AddResult(res3, "null") @@ -218,10 +204,7 @@ public async Task Create_NullableEnumNotEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BAR") .AddResult(res2, "FOO") .AddResult(res3, "null") @@ -252,7 +235,7 @@ public async Task Create_NullableEnumIn_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BarAndFoo") .AddResult(res2, "FOO") .AddResult(res3, "nullAndFoo") @@ -283,7 +266,7 @@ public async Task Create_NullableEnumNotIn_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BarAndFoo") .AddResult(res2, "FOO") .AddResult(res3, "nullAndFoo") diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorExpressionTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorExpressionTests.cs index 54d72e83d63..2870e939ae2 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorExpressionTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorExpressionTests.cs @@ -1,4 +1,5 @@ using HotChocolate.Execution; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Filters; @@ -54,10 +55,7 @@ public async Task Create_StringConcatExpression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "Sam_Sampleman") .AddResult(res2, "NoMatch") .AddResult(res3, "null") @@ -88,10 +86,7 @@ public async Task Create_CollectionLengthExpression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "1") .AddResult(res2, "0") .AddResult(res3, "null") diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorInterfacesTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorInterfacesTests.cs index a1524e20471..afbc4185939 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorInterfacesTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorInterfacesTests.cs @@ -2,6 +2,7 @@ using HotChocolate.Execution; using HotChocolate.Types; using Microsoft.EntityFrameworkCore; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Filters; @@ -54,10 +55,7 @@ public async Task Create_InterfaceStringEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "a") .AddResult(res2, "ba") .AddResult(res3, "null") diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorListTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorListTests.cs index d93f3d68a1c..81d2e585aab 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorListTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorListTests.cs @@ -1,4 +1,5 @@ using HotChocolate.Execution; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Filters; @@ -90,10 +91,7 @@ public async Task Create_ArraySomeObjectStringEqualWithNull_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "a") .AddResult(res2, "d") .AddResult(res3, "null") @@ -127,10 +125,7 @@ public async Task Create_ArrayNoneObjectStringEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "a") .AddResult(res2, "d") .AddResult(res3, "null") @@ -164,10 +159,7 @@ public async Task Create_ArrayAllObjectStringEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "a") .AddResult(res2, "d") .AddResult(res3, "null") diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorObjectTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorObjectTests.cs index 8ddd461d042..38f209f07ea 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorObjectTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorObjectTests.cs @@ -1,4 +1,5 @@ using HotChocolate.Execution; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Filters; @@ -124,10 +125,7 @@ public async Task Create_ObjectShortEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "null") @@ -164,10 +162,7 @@ public async Task Create_ObjectShortIn_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12and13") .AddResult(res2, "13and14") .AddResult(res3, "nullAnd14") @@ -204,10 +199,7 @@ public async Task Create_ObjectNullableShortEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "12") .AddResult(res2, "13") .AddResult(res3, "null") @@ -244,7 +236,7 @@ public async Task Create_ObjectNullableShortIn_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(postFix: TargetFramework) .AddResult(res1, "12and13") .AddResult(res2, "13and14") .AddResult(res3, "13andNull") @@ -275,8 +267,8 @@ public async Task Create_ObjectBooleanEqual_Expression() // assert await Snapshot .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework + postFix: TargetFramework == "NET10_0" + ? TargetFramework : null) .AddResult(res1, "true") .AddResult(res2, "false") @@ -313,10 +305,7 @@ public async Task Create_ObjectNullableBooleanEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "true") .AddResult(res2, "false") .AddResult(res3, "null") @@ -353,10 +342,7 @@ public async Task Create_ObjectEnumEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BAR") .AddResult(res2, "FOO") .AddResult(res3, "null") @@ -393,10 +379,7 @@ public async Task Create_ObjectEnumIn_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BarAndFoo") .AddResult(res2, "FOO") .AddResult(res3, "nullAndFoo") @@ -434,10 +417,7 @@ public async Task Create_ObjectNullableEnumEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "BAR") .AddResult(res2, "FOO") .AddResult(res3, "null") @@ -474,7 +454,7 @@ public async Task Create_ObjectNullableEnumIn_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(postFix: TargetFramework) .AddResult(res1, "BarAndFoo") .AddResult(res2, "FOO") .AddResult(res3, "nullAndFoo") @@ -510,10 +490,7 @@ public async Task Create_ObjectStringEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatest") .AddResult(res2, "testbtest") .AddResult(res3, "null") @@ -551,10 +528,7 @@ public async Task Create_ObjectStringIn_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatestAndtestb") .AddResult(res2, "testbtestAndNull") .AddResult(res3, "testatest") @@ -594,10 +568,7 @@ public async Task Create_ArrayObjectNestedArraySomeStringEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "a") .AddResult(res2, "b") .AddResult(res3, "null") @@ -673,10 +644,7 @@ public async Task Create_ObjectStringEqual_Flattened() Assert.Empty(Assert.IsType(res2).Errors); Assert.Empty(Assert.IsType(res3).Errors); await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatest") .AddResult(res2, "testbtest") .AddResult(res3, "null") @@ -716,10 +684,7 @@ public async Task Create_ObjectStringEquals_Related_Flattened() Assert.Empty(Assert.IsType(res2).Errors); Assert.Empty(Assert.IsType(res3).Errors); await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatest") .AddResult(res2, "testbtest") .AddResult(res3, "null") diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorStringTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorStringTests.cs index 06bfd2ae83a..7a6ec8dbc95 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorStringTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorStringTests.cs @@ -1,4 +1,5 @@ using HotChocolate.Execution; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Filters; @@ -43,10 +44,7 @@ public async Task Create_StringEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatest") .AddResult(res2, "testbtest") .AddResult(res3, "null") @@ -77,10 +75,7 @@ public async Task Create_StringNotEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatest") .AddResult(res2, "testbtest") .AddResult(res3, "null") @@ -112,10 +107,7 @@ public async Task Create_StringIn_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatestAndtestb") .AddResult(res2, "testbtestAndNull") .AddResult(res3, "testatest") @@ -147,7 +139,7 @@ public async Task Create_StringNotIn_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatestAndtestb") .AddResult(res2, "testbtestAndNull") .AddResult(res3, "testatest") @@ -178,10 +170,7 @@ public async Task Create_StringContains_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "a") .AddResult(res2, "b") .AddResult(res3, "null") @@ -212,7 +201,7 @@ public async Task Create_StringNoContains_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1, "a") .AddResult(res2, "b") .AddResult(res3, "null") @@ -244,7 +233,7 @@ public async Task Create_StringStartsWith_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testa") .AddResult(res2, "testb") .AddResult(res3, "null") @@ -275,7 +264,7 @@ public async Task Create_StringNotStartsWith_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testa") .AddResult(res2, "testb") .AddResult(res3, "null") @@ -306,7 +295,7 @@ public async Task Create_StringEndsWith_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "atest") .AddResult(res2, "btest") .AddResult(res3, "null") @@ -337,7 +326,7 @@ public async Task Create_StringNotEndsWith_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "atest") .AddResult(res2, "btest") .AddResult(res3, "null") @@ -368,10 +357,7 @@ public async Task Create_NullableStringEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatest") .AddResult(res2, "testbtest") .AddResult(res3, "null") @@ -403,10 +389,7 @@ public async Task Create_NullableStringNotEqual_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatest") .AddResult(res2, "testbtest") .AddResult(res3, "null") @@ -438,7 +421,7 @@ public async Task Create_NullableStringIn_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatestAndtestb") .AddResult(res2, "testbtestAndNull") .AddResult(res3, "testatest") @@ -471,7 +454,7 @@ public async Task Create_NullableStringNotIn_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testatestAndtestb") .AddResult(res2, "testbtestAndNull") .AddResult(res3, "testatest") @@ -503,10 +486,7 @@ public async Task Create_NullableStringContains_Expression() // assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "a") .AddResult(res2, "b") .AddResult(res3, "null") @@ -537,7 +517,7 @@ public async Task Create_NullableStringNoContains_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1, "a") .AddResult(res2, "b") .AddResult(res3, "null") @@ -569,7 +549,7 @@ public async Task Create_NullableStringStartsWith_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testa") .AddResult(res2, "testb") .AddResult(res3, "null") @@ -601,7 +581,7 @@ public async Task Create_NullableStringNotStartsWith_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "testa") .AddResult(res2, "testb") .AddResult(res3, "null") @@ -633,7 +613,7 @@ public async Task Create_NullableStringEndsWith_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "atest") .AddResult(res2, "btest") .AddResult(res3, "null") @@ -666,7 +646,7 @@ public async Task Create_NullableStringNotEndsWith_Expression() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0, NET9_0])) .AddResult(res1, "atest") .AddResult(res2, "btest") .AddResult(res3, "null") diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering.md index 9fbcd8f3d21..ac5f75f4fc1 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering.md @@ -3,24 +3,18 @@ ## SQL ```text -.param set @__keys_0 '[1]' -.param set @__p_1_rewritten 'Product%' +.param set @keys1 1 +.param set @p_startswith 'Product%' SELECT "p"."Id", "p"."AvailableStock", "p"."BrandId", "p"."Description", "p"."ImageFileName", "p"."MaxStockThreshold", "p"."Name", "p"."OnReorder", "p"."Price", "p"."RestockThreshold", "p"."TypeId" FROM "Products" AS "p" -WHERE "p"."BrandId" IN ( - SELECT "k"."value" - FROM json_each(@__keys_0) AS "k" -) AND "p"."Name" LIKE @__p_1_rewritten ESCAPE '\' -.param set @__keys_0 '[1]' -.param set @__p_1 'Product 0-0' +WHERE "p"."BrandId" = @keys1 AND "p"."Name" LIKE @p_startswith ESCAPE '\' +.param set @keys1 1 +.param set @p 'Product 0-0' SELECT "p"."Id", "p"."AvailableStock", "p"."BrandId", "p"."Description", "p"."ImageFileName", "p"."MaxStockThreshold", "p"."Name", "p"."OnReorder", "p"."Price", "p"."RestockThreshold", "p"."TypeId" FROM "Products" AS "p" -WHERE "p"."BrandId" IN ( - SELECT "k"."value" - FROM json_each(@__keys_0) AS "k" -) AND "p"."Name" = @__p_1 +WHERE "p"."BrandId" = @keys1 AND "p"."Name" = @p ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering_NET10_0.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering_NET8_0_NET9_0.md similarity index 64% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering_NET10_0.md rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering_NET8_0_NET9_0.md index ac5f75f4fc1..9fbcd8f3d21 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Aliased_Filtering_NET8_0_NET9_0.md @@ -3,18 +3,24 @@ ## SQL ```text -.param set @keys1 1 -.param set @p_startswith 'Product%' +.param set @__keys_0 '[1]' +.param set @__p_1_rewritten 'Product%' SELECT "p"."Id", "p"."AvailableStock", "p"."BrandId", "p"."Description", "p"."ImageFileName", "p"."MaxStockThreshold", "p"."Name", "p"."OnReorder", "p"."Price", "p"."RestockThreshold", "p"."TypeId" FROM "Products" AS "p" -WHERE "p"."BrandId" = @keys1 AND "p"."Name" LIKE @p_startswith ESCAPE '\' -.param set @keys1 1 -.param set @p 'Product 0-0' +WHERE "p"."BrandId" IN ( + SELECT "k"."value" + FROM json_each(@__keys_0) AS "k" +) AND "p"."Name" LIKE @__p_1_rewritten ESCAPE '\' +.param set @__keys_0 '[1]' +.param set @__p_1 'Product 0-0' SELECT "p"."Id", "p"."AvailableStock", "p"."BrandId", "p"."Description", "p"."ImageFileName", "p"."MaxStockThreshold", "p"."Name", "p"."OnReorder", "p"."Price", "p"."RestockThreshold", "p"."TypeId" FROM "Products" AS "p" -WHERE "p"."BrandId" = @keys1 AND "p"."Name" = @p +WHERE "p"."BrandId" IN ( + SELECT "k"."value" + FROM json_each(@__keys_0) AS "k" +) AND "p"."Name" = @__p_1 ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression.md index 65c4769d8ba..c13fb29208c 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression.md @@ -3,14 +3,11 @@ ## SQL ```text -.param set @__keys_0 '[1]' +.param set @keys1 1 SELECT "b"."Id", "b"."DisplayName", "b"."Name", "b"."Details_Country_Name" FROM "Brands" AS "b" -WHERE "b"."Id" IN ( - SELECT "k"."value" - FROM json_each(@__keys_0) AS "k" -) AND "b"."Name" LIKE 'Brand%' +WHERE "b"."Id" = @keys1 AND "b"."Name" LIKE 'Brand%' ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_NET10_0.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_NET8_0_NET9_0.md similarity index 63% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_NET10_0.md rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_NET8_0_NET9_0.md index c13fb29208c..65c4769d8ba 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_NET8_0_NET9_0.md @@ -3,11 +3,14 @@ ## SQL ```text -.param set @keys1 1 +.param set @__keys_0 '[1]' SELECT "b"."Id", "b"."DisplayName", "b"."Name", "b"."Details_Country_Name" FROM "Brands" AS "b" -WHERE "b"."Id" = @keys1 AND "b"."Name" LIKE 'Brand%' +WHERE "b"."Id" IN ( + SELECT "k"."value" + FROM json_each(@__keys_0) AS "k" +) AND "b"."Name" LIKE 'Brand%' ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null.md index 1abde9f88ba..e755e0ad0c9 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null.md @@ -3,14 +3,11 @@ ## SQL ```text -.param set @__keys_0 '[1]' +.param set @keys1 1 SELECT "b"."Id", "b"."DisplayName", "b"."Name", "b"."Details_Country_Name" FROM "Brands" AS "b" -WHERE "b"."Id" IN ( - SELECT "k"."value" - FROM json_each(@__keys_0) AS "k" -) +WHERE "b"."Id" = @keys1 ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null_NET10_0.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null_NET8_0_NET9_0.md similarity index 69% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null_NET10_0.md rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null_NET8_0_NET9_0.md index e755e0ad0c9..1abde9f88ba 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Expression_Null_NET8_0_NET9_0.md @@ -3,11 +3,14 @@ ## SQL ```text -.param set @keys1 1 +.param set @__keys_0 '[1]' SELECT "b"."Id", "b"."DisplayName", "b"."Name", "b"."Details_Country_Name" FROM "Brands" AS "b" -WHERE "b"."Id" = @keys1 +WHERE "b"."Id" IN ( + SELECT "k"."value" + FROM json_each(@__keys_0) AS "k" +) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering.md index ca3fde604fb..c12cd0441b4 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering.md @@ -3,15 +3,12 @@ ## SQL ```text -.param set @__keys_0 '[1]' -.param set @__p_1_rewritten 'Product%' +.param set @keys1 1 +.param set @p_startswith 'Product%' SELECT "p"."Id", "p"."AvailableStock", "p"."BrandId", "p"."Description", "p"."ImageFileName", "p"."MaxStockThreshold", "p"."Name", "p"."OnReorder", "p"."Price", "p"."RestockThreshold", "p"."TypeId" FROM "Products" AS "p" -WHERE "p"."BrandId" IN ( - SELECT "k"."value" - FROM json_each(@__keys_0) AS "k" -) AND "p"."Name" LIKE @__p_1_rewritten ESCAPE '\' +WHERE "p"."BrandId" = @keys1 AND "p"."Name" LIKE @p_startswith ESCAPE '\' ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering_NET10_0.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering_NET8_0_NET9_0.md similarity index 65% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering_NET10_0.md rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering_NET8_0_NET9_0.md index c12cd0441b4..ca3fde604fb 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering_NET8_0_NET9_0.md @@ -3,12 +3,15 @@ ## SQL ```text -.param set @keys1 1 -.param set @p_startswith 'Product%' +.param set @__keys_0 '[1]' +.param set @__p_1_rewritten 'Product%' SELECT "p"."Id", "p"."AvailableStock", "p"."BrandId", "p"."Description", "p"."ImageFileName", "p"."MaxStockThreshold", "p"."Name", "p"."OnReorder", "p"."Price", "p"."RestockThreshold", "p"."TypeId" FROM "Products" AS "p" -WHERE "p"."BrandId" = @keys1 AND "p"."Name" LIKE @p_startswith ESCAPE '\' +WHERE "p"."BrandId" IN ( + SELECT "k"."value" + FROM json_each(@__keys_0) AS "k" +) AND "p"."Name" LIKE @__p_1_rewritten ESCAPE '\' ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression.md index d6aef0e50c8..06619e6f94c 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression.md @@ -3,29 +3,21 @@ ## SQL ```text +.param set @keys1 1 +SELECT "b"."Id", "b"."DisplayName", "b"."Name", "b"."Details_Country_Name" +FROM "Brands" AS "b" +WHERE "b"."Id" = @keys1 AND "b"."Name" LIKE 'Brand%' AND "b"."Name" LIKE '%0' ``` ## Result ```json { - "errors": [ - { - "message": "Unexpected Execution Error", - "path": [ - "multiFilterExpression" - ], - "extensions": { - "exception": { - "message": "The LINQ expression 'DbSet()\n .Where(b => __keys_0\n .Contains(b.Id))\n .Where(b => b.Name.StartsWith(\"Brand\") && b.Name.EndsWith(0))' could not be translated. Additional information: Translation of method 'string.EndsWith' failed. If this method can be mapped to your custom function, see https://go.microsoft.com/fwlink/?linkid=2132413 for more information. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.", - "stackTrace": " at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.Translate(Expression expression)\n at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.Translate(Expression expression)\n at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)\n at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_0`1.b__0()\n at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)\n at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)\n at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToQueryString(IQueryable source)\n at HotChocolate.Data.Predicates.DataLoaderTests.BrandByIdDataLoader.LoadBatchAsync(IReadOnlyList`1 keys, DataLoaderFetchContext`1 context, CancellationToken cancellationToken) in /workspaces/repo/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs:line 275\n at GreenDonut.StatefulBatchDataLoader`2.FetchAsync(IReadOnlyList`1 keys, Memory`1 results, DataLoaderFetchContext`1 context, CancellationToken cancellationToken) in /workspaces/repo/src/GreenDonut/src/GreenDonut/BatchDataLoader.cs:line 116\n at GreenDonut.DataLoaderBase`2.<>c__DisplayClass34_0.<g__StartDispatchingAsync|0>d.MoveNext() in /workspaces/repo/src/GreenDonut/src/GreenDonut/DataLoaderBase.cs:line 372\n--- End of stack trace from previous location ---\n at HotChocolate.Data.Predicates.DataLoaderTests.Query.MultiFilterExpression(Int32 id, BrandByIdDataLoader brandById, CancellationToken cancellationToken) in /workspaces/repo/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs:line 211\n at HotChocolate.Resolvers.Expressions.ExpressionHelper.AwaitTaskHelper[T](Task`1 task) in /workspaces/repo/src/HotChocolate/Core/src/Types/Resolvers/Expressions/ExpressionHelper.cs:line 16\n at HotChocolate.Types.Helpers.FieldMiddlewareCompiler.<>c__DisplayClass9_0.<b__0>d.MoveNext() in /workspaces/repo/src/HotChocolate/Core/src/Types/Types/Helpers/FieldMiddlewareCompiler.cs:line 127\n--- End of stack trace from previous location ---\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.ExecuteResolverPipelineAsync(CancellationToken cancellationToken) in /workspaces/repo/src/HotChocolate/Core/src/Types/Execution/Processing/Tasks/ResolverTask.Execute.cs:line 135\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.TryExecuteAsync(CancellationToken cancellationToken) in /workspaces/repo/src/HotChocolate/Core/src/Types/Execution/Processing/Tasks/ResolverTask.Execute.cs:line 81" - } - } - } - ], "data": { - "multiFilterExpression": null + "multiFilterExpression": { + "name": "Brand0" + } } } ``` diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression_NET10_0.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression_NET10_0.md deleted file mode 100644 index 06619e6f94c..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression_NET10_0.md +++ /dev/null @@ -1,23 +0,0 @@ -# Filter_With_Multi_Expression - -## SQL - -```text -.param set @keys1 1 - -SELECT "b"."Id", "b"."DisplayName", "b"."Name", "b"."Details_Country_Name" -FROM "Brands" AS "b" -WHERE "b"."Id" = @keys1 AND "b"."Name" LIKE 'Brand%' AND "b"."Name" LIKE '%0' -``` - -## Result - -```json -{ - "data": { - "multiFilterExpression": { - "name": "Brand0" - } - } -} -``` diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression_NET8_0.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression_NET8_0.md new file mode 100644 index 00000000000..5599950fbde --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression_NET8_0.md @@ -0,0 +1,31 @@ +# Filter_With_Multi_Expression + +## SQL + +```text + +``` + +## Result + +```json +{ + "errors": [ + { + "message": "Unexpected Execution Error", + "path": [ + "multiFilterExpression" + ], + "extensions": { + "exception": { + "message": "The LINQ expression 'DbSet()\n .Where(b => __keys_0\n .Contains(b.Id))\n .Where(b => b.Name.StartsWith(\"Brand\") && b.Name.EndsWith(0))' could not be translated. Additional information: Translation of method 'string.EndsWith' failed. If this method can be mapped to your custom function, see https://go.microsoft.com/fwlink/?linkid=2132413 for more information. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.", + "stackTrace": " at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.Translate(Expression expression)\n at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.Translate(Expression expression)\n at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)\n at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_0`1.b__0()\n at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)\n at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)\n at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToQueryString(IQueryable source)\n at HotChocolate.Data.Predicates.DataLoaderTests.BrandByIdDataLoader.LoadBatchAsync(IReadOnlyList`1 keys, DataLoaderFetchContext`1 context, CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Data\\test\\Data.Filters.SqlServer.Tests\\DataLoaderTests.cs:line 261\n at GreenDonut.StatefulBatchDataLoader`2.FetchAsync(IReadOnlyList`1 keys, Memory`1 results, DataLoaderFetchContext`1 context, CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\GreenDonut\\src\\GreenDonut\\BatchDataLoader.cs:line 116\n at GreenDonut.DataLoaderBase`2.<>c__DisplayClass34_0.<g__StartDispatchingAsync|0>d.MoveNext() in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\GreenDonut\\src\\GreenDonut\\DataLoaderBase.cs:line 372\n--- End of stack trace from previous location ---\n at HotChocolate.Data.Predicates.DataLoaderTests.Query.MultiFilterExpression(Int32 id, BrandByIdDataLoader brandById, CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Data\\test\\Data.Filters.SqlServer.Tests\\DataLoaderTests.cs:line 197\n at HotChocolate.Resolvers.Expressions.ExpressionHelper.AwaitTaskHelper[T](Task`1 task) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Core\\src\\Types\\Resolvers\\Expressions\\ExpressionHelper.cs:line 16\n at HotChocolate.Types.Helpers.FieldMiddlewareCompiler.<>c__DisplayClass9_0.<b__0>d.MoveNext() in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Core\\src\\Types\\Types\\Helpers\\FieldMiddlewareCompiler.cs:line 127\n--- End of stack trace from previous location ---\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.ExecuteResolverPipelineAsync(CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Core\\src\\Types\\Execution\\Processing\\Tasks\\ResolverTask.Execute.cs:line 135\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.TryExecuteAsync(CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Core\\src\\Types\\Execution\\Processing\\Tasks\\ResolverTask.Execute.cs:line 81" + } + } + } + ], + "data": { + "multiFilterExpression": null + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression_NET9_0.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression_NET9_0.md new file mode 100644 index 00000000000..4f32ed08e5a --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Multi_Expression_NET9_0.md @@ -0,0 +1,31 @@ +# Filter_With_Multi_Expression + +## SQL + +```text + +``` + +## Result + +```json +{ + "errors": [ + { + "message": "Unexpected Execution Error", + "path": [ + "multiFilterExpression" + ], + "extensions": { + "exception": { + "message": "The LINQ expression 'DbSet()\n .Where(b => __keys_0\n .Contains(b.Id))\n .Where(b => b.Name.StartsWith(\"Brand\") && b.Name.EndsWith(0))' could not be translated. Additional information: Translation of method 'string.EndsWith' failed. If this method can be mapped to your custom function, see https://go.microsoft.com/fwlink/?linkid=2132413 for more information. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.", + "stackTrace": " at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.Translate(Expression expression)\n at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutorExpression[TResult](Expression query)\n at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)\n at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass11_0`1.b__0()\n at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteCore[TResult](Expression query, Boolean async, CancellationToken cancellationToken)\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)\n at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)\n at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToQueryString(IQueryable source)\n at HotChocolate.Data.Predicates.DataLoaderTests.BrandByIdDataLoader.LoadBatchAsync(IReadOnlyList`1 keys, DataLoaderFetchContext`1 context, CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Data\\test\\Data.Filters.SqlServer.Tests\\DataLoaderTests.cs:line 261\n at GreenDonut.StatefulBatchDataLoader`2.FetchAsync(IReadOnlyList`1 keys, Memory`1 results, DataLoaderFetchContext`1 context, CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\GreenDonut\\src\\GreenDonut\\BatchDataLoader.cs:line 116\n at GreenDonut.DataLoaderBase`2.<>c__DisplayClass34_0.<g__StartDispatchingAsync|0>d.MoveNext() in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\GreenDonut\\src\\GreenDonut\\DataLoaderBase.cs:line 372\n--- End of stack trace from previous location ---\n at HotChocolate.Data.Predicates.DataLoaderTests.Query.MultiFilterExpression(Int32 id, BrandByIdDataLoader brandById, CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Data\\test\\Data.Filters.SqlServer.Tests\\DataLoaderTests.cs:line 197\n at HotChocolate.Resolvers.Expressions.ExpressionHelper.AwaitTaskHelper[T](Task`1 task) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Core\\src\\Types\\Resolvers\\Expressions\\ExpressionHelper.cs:line 16\n at HotChocolate.Types.Helpers.FieldMiddlewareCompiler.<>c__DisplayClass9_0.<b__0>d.MoveNext() in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Core\\src\\Types\\Types\\Helpers\\FieldMiddlewareCompiler.cs:line 127\n--- End of stack trace from previous location ---\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.ExecuteResolverPipelineAsync(CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Core\\src\\Types\\Execution\\Processing\\Tasks\\ResolverTask.Execute.cs:line 135\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.TryExecuteAsync(CancellationToken cancellationToken) in D:\\Programming\\Projects\\ChilliCream\\graphql-platform\\graphql-platform-misc\\src\\HotChocolate\\Core\\src\\Types\\Execution\\Processing\\Tasks\\ResolverTask.Execute.cs:line 81" + } + } + } + ], + "data": { + "multiFilterExpression": null + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression.snap index 1acea75d7a1..f458a1c5844 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression.snap @@ -13,11 +13,11 @@ true Result: true SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @__p_0 +WHERE "d"."Bar" = @p --------------- false Result: @@ -35,11 +35,11 @@ false Result: false SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @__p_0 +WHERE "d"."Bar" = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression_NET8_0_NET9_0.snap similarity index 88% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression_NET8_0_NET9_0.snap index f458a1c5844..1acea75d7a1 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanEqual_Expression_NET8_0_NET9_0.snap @@ -13,11 +13,11 @@ true Result: true SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @p +WHERE "d"."Bar" = @__p_0 --------------- false Result: @@ -35,11 +35,11 @@ false Result: false SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @p +WHERE "d"."Bar" = @__p_0 --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression.snap index c05143c3c25..66aef7e7af7 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression.snap @@ -16,11 +16,11 @@ true Result: true SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @__p_0 OR "d"."Bar" IS NULL +WHERE "d"."Bar" <> @p OR "d"."Bar" IS NULL --------------- false Result: @@ -41,11 +41,11 @@ false Result: false SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @__p_0 OR "d"."Bar" IS NULL +WHERE "d"."Bar" <> @p OR "d"."Bar" IS NULL --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression_NET8_0_NET9_0.snap similarity index 85% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression_NET8_0_NET9_0.snap index 66aef7e7af7..c05143c3c25 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorBooleanTests.Create_NullableBooleanNotEqual_Expression_NET8_0_NET9_0.snap @@ -16,11 +16,11 @@ true Result: true SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @p OR "d"."Bar" IS NULL +WHERE "d"."Bar" <> @__p_0 OR "d"."Bar" IS NULL --------------- false Result: @@ -41,11 +41,11 @@ false Result: false SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @p OR "d"."Bar" IS NULL +WHERE "d"."Bar" <> @__p_0 OR "d"."Bar" IS NULL --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression.snap index a17939f55fa..db3bf4a24b4 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression.snap @@ -13,11 +13,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" = @__p_0 +WHERE "d"."BarShort" = @p --------------- 13 Result: @@ -35,11 +35,11 @@ WHERE "d"."BarShort" = @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" = @__p_0 +WHERE "d"."BarShort" = @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression_NET8_0_NET9_0.snap similarity index 91% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression_NET8_0_NET9_0.snap index db3bf4a24b4..a17939f55fa 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortEqual_Expression_NET8_0_NET9_0.snap @@ -13,11 +13,11 @@ 12 SQL: --------------- -.param set @p 12 +.param set @__p_0 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" = @p +WHERE "d"."BarShort" = @__p_0 --------------- 13 Result: @@ -35,11 +35,11 @@ WHERE "d"."BarShort" = @p 13 SQL: --------------- -.param set @p 13 +.param set @__p_0 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" = @p +WHERE "d"."BarShort" = @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThanOrEquals_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThanOrEquals_Expression.snap index 99ff8e2b063..6a883fa3fa1 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThanOrEquals_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThanOrEquals_Expression.snap @@ -19,11 +19,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" >= @__p_0 +WHERE "d"."BarShort" >= @p --------------- 13 Result: @@ -44,11 +44,11 @@ WHERE "d"."BarShort" >= @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" >= @__p_0 +WHERE "d"."BarShort" >= @p --------------- 14 Result: @@ -66,11 +66,11 @@ WHERE "d"."BarShort" >= @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" >= @__p_0 +WHERE "d"."BarShort" >= @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThanOrEquals_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThanOrEquals_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..99ff8e2b063 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThanOrEquals_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,102 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" >= @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" >= @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + } + ] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" >= @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `gte` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 34 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThan_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThan_Expression.snap index 4e8fb7b75a3..59c6f1619da 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThan_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThan_Expression.snap @@ -16,11 +16,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @__p_0 +WHERE "d"."BarShort" > @p --------------- 13 Result: @@ -38,11 +38,11 @@ WHERE "d"."BarShort" > @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @__p_0 +WHERE "d"."BarShort" > @p --------------- 14 Result: @@ -56,11 +56,11 @@ WHERE "d"."BarShort" > @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @__p_0 +WHERE "d"."BarShort" > @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThan_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThan_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..4e8fb7b75a3 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortGreaterThan_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,92 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" > @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" > @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" > @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `gt` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 33 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression.snap index a22ffff9cca..29169ac9085 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression.snap @@ -16,14 +16,12 @@ 12and13 SQL: --------------- -.param set @__p_0 '[12,13]' +.param set @p1 12 +.param set @p2 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarShort" IN (@p1, @p2) --------------- 13and14 Result: @@ -44,14 +42,12 @@ WHERE "d"."BarShort" IN ( 13and14 SQL: --------------- -.param set @__p_0 '[13,14]' +.param set @p1 13 +.param set @p2 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarShort" IN (@p1, @p2) --------------- nullAnd14 diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..a22ffff9cca --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,83 @@ +12and13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +12and13 SQL: +--------------- +.param set @__p_0 '[12,13]' + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) +--------------- + +13and14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +13and14 SQL: +--------------- +.param set @__p_0 '[13,14]' + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) +--------------- + +nullAnd14 +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `in` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 33 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "[Short!]", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThanOrEquals_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThanOrEquals_Expression.snap index 640e056d88f..63a34989ec9 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThanOrEquals_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThanOrEquals_Expression.snap @@ -13,11 +13,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <= @__p_0 +WHERE "d"."BarShort" <= @p --------------- 13 Result: @@ -38,11 +38,11 @@ WHERE "d"."BarShort" <= @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <= @__p_0 +WHERE "d"."BarShort" <= @p --------------- 14 Result: @@ -66,11 +66,11 @@ WHERE "d"."BarShort" <= @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <= @__p_0 +WHERE "d"."BarShort" <= @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThanOrEquals_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThanOrEquals_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..640e056d88f --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThanOrEquals_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,102 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <= @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <= @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <= @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `lte` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 34 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThan_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThan_Expression.snap index c48d26fdcb3..6cc8d7f6821 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThan_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThan_Expression.snap @@ -9,11 +9,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" < @__p_0 +WHERE "d"."BarShort" < @p --------------- 13 Result: @@ -31,11 +31,11 @@ WHERE "d"."BarShort" < @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" < @__p_0 +WHERE "d"."BarShort" < @p --------------- 14 Result: @@ -56,11 +56,11 @@ WHERE "d"."BarShort" < @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" < @__p_0 +WHERE "d"."BarShort" < @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThan_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThan_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..c48d26fdcb3 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortLowerThan_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,92 @@ +12 Result: +--------------- +{ + "data": { + "root": [] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" < @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" < @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" < @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `lt` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 33 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotEqual_Expression.snap index 8a60b5a2115..b4cdf6cf28e 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotEqual_Expression.snap @@ -16,11 +16,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <> @__p_0 +WHERE "d"."BarShort" <> @p --------------- 13 Result: @@ -41,11 +41,11 @@ WHERE "d"."BarShort" <> @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <> @__p_0 +WHERE "d"."BarShort" <> @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotEqual_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotEqual_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..8a60b5a2115 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotEqual_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,77 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <> @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 14 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <> @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `neq` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 34 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThanOrEquals_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThanOrEquals_Expression.snap index 7c5543b5641..925ef96bc4e 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThanOrEquals_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThanOrEquals_Expression.snap @@ -9,11 +9,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" < @__p_0 +WHERE "d"."BarShort" < @p --------------- 13 Result: @@ -31,11 +31,11 @@ WHERE "d"."BarShort" < @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" < @__p_0 +WHERE "d"."BarShort" < @p --------------- 14 Result: @@ -56,11 +56,11 @@ WHERE "d"."BarShort" < @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" < @__p_0 +WHERE "d"."BarShort" < @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThanOrEquals_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThanOrEquals_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..7c5543b5641 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThanOrEquals_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,92 @@ +12 Result: +--------------- +{ + "data": { + "root": [] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" < @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" < @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" < @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `ngte` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 35 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThan_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThan_Expression.snap index 667b53e2d47..407a872dd15 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThan_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThan_Expression.snap @@ -13,11 +13,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <= @__p_0 +WHERE "d"."BarShort" <= @p --------------- 13 Result: @@ -38,11 +38,11 @@ WHERE "d"."BarShort" <= @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <= @__p_0 +WHERE "d"."BarShort" <= @p --------------- 14 Result: @@ -66,11 +66,11 @@ WHERE "d"."BarShort" <= @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <= @__p_0 +WHERE "d"."BarShort" <= @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThan_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThan_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..667b53e2d47 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotGreaterThan_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,102 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <= @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <= @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <= @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `ngt` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 34 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression.snap index 6da4fd4e544..fbd1d43ab08 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression.snap @@ -13,14 +13,12 @@ 12and13 SQL: --------------- -.param set @__p_0 '[12,13]' +.param set @p1 12 +.param set @p2 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarShort" NOT IN (@p1, @p2) --------------- 13and14 Result: @@ -38,14 +36,12 @@ WHERE "d"."BarShort" NOT IN ( 13and14 SQL: --------------- -.param set @__p_0 '[13,14]' +.param set @p1 13 +.param set @p2 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarShort" NOT IN (@p1, @p2) --------------- nullAnd14 diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..6da4fd4e544 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,77 @@ +12and13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + } + ] + } +} +--------------- + +12and13 SQL: +--------------- +.param set @__p_0 '[12,13]' + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" NOT IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) +--------------- + +13and14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + } + ] + } +} +--------------- + +13and14 SQL: +--------------- +.param set @__p_0 '[13,14]' + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" NOT IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) +--------------- + +nullAnd14 +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `nin` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 34 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "[Short!]", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThanOrEquals_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThanOrEquals_Expression.snap index 290cddb29de..712a3b28bb5 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThanOrEquals_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThanOrEquals_Expression.snap @@ -16,11 +16,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @__p_0 +WHERE "d"."BarShort" > @p --------------- 13 Result: @@ -38,11 +38,11 @@ WHERE "d"."BarShort" > @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @__p_0 +WHERE "d"."BarShort" > @p --------------- 14 Result: @@ -56,11 +56,11 @@ WHERE "d"."BarShort" > @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @__p_0 +WHERE "d"."BarShort" > @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThanOrEquals_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThanOrEquals_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..290cddb29de --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThanOrEquals_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,92 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" > @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" > @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" > @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `nlte` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 35 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThan_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThan_Expression.snap index 3c7f19803ea..8d9e9239a07 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThan_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThan_Expression.snap @@ -19,11 +19,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" >= @__p_0 +WHERE "d"."BarShort" >= @p --------------- 13 Result: @@ -44,11 +44,11 @@ WHERE "d"."BarShort" >= @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" >= @__p_0 +WHERE "d"."BarShort" >= @p --------------- 14 Result: @@ -66,11 +66,11 @@ WHERE "d"."BarShort" >= @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" >= @__p_0 +WHERE "d"."BarShort" >= @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThan_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThan_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..3c7f19803ea --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotLowerThan_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,102 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" >= @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" >= @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + } + ] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" >= @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `nlt` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 34 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableEqual_Expression.snap index e64920be970..aae7a91081f 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableEqual_Expression.snap @@ -13,11 +13,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" = @__p_0 +WHERE "d"."BarShort" = @p --------------- 13 Result: @@ -35,11 +35,11 @@ WHERE "d"."BarShort" = @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" = @__p_0 +WHERE "d"."BarShort" = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableEqual_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableEqual_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..e64920be970 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableEqual_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,63 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" = @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 13 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" = @__p_0 +--------------- + +null Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": null + } + ] + } +} +--------------- + +null SQL: +--------------- +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" IS NULL +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThanOrEquals_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThanOrEquals_Expression.snap index 2f039cb53a5..50376b84291 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThanOrEquals_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThanOrEquals_Expression.snap @@ -19,11 +19,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" >= @__p_0 +WHERE "d"."BarShort" >= @p --------------- 13 Result: @@ -44,11 +44,11 @@ WHERE "d"."BarShort" >= @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" >= @__p_0 +WHERE "d"."BarShort" >= @p --------------- 14 Result: @@ -66,11 +66,11 @@ WHERE "d"."BarShort" >= @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" >= @__p_0 +WHERE "d"."BarShort" >= @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThanOrEquals_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThanOrEquals_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..2f039cb53a5 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThanOrEquals_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,102 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" >= @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" >= @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 14 + } + ] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" >= @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `gte` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 34 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression.snap index f1e76dbc41d..c1bea0679f4 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression.snap @@ -16,11 +16,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @__p_0 +WHERE "d"."BarShort" > @p --------------- 13 Result: @@ -38,11 +38,11 @@ WHERE "d"."BarShort" > @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @__p_0 +WHERE "d"."BarShort" > @p --------------- 14 Result: @@ -56,11 +56,11 @@ WHERE "d"."BarShort" > @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @__p_0 +WHERE "d"."BarShort" > @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression_NET8_0_NET9_0.snap similarity index 88% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression_NET8_0_NET9_0.snap index c1bea0679f4..f1e76dbc41d 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableGreaterThan_Expression_NET8_0_NET9_0.snap @@ -16,11 +16,11 @@ 12 SQL: --------------- -.param set @p 12 +.param set @__p_0 12 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @p +WHERE "d"."BarShort" > @__p_0 --------------- 13 Result: @@ -38,11 +38,11 @@ WHERE "d"."BarShort" > @p 13 SQL: --------------- -.param set @p 13 +.param set @__p_0 13 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @p +WHERE "d"."BarShort" > @__p_0 --------------- 14 Result: @@ -56,11 +56,11 @@ WHERE "d"."BarShort" > @p 14 SQL: --------------- -.param set @p 14 +.param set @__p_0 14 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" > @p +WHERE "d"."BarShort" > @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThanOrEquals_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThanOrEquals_Expression.snap index 3cb54d1be73..180a1a6ee28 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThanOrEquals_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThanOrEquals_Expression.snap @@ -13,11 +13,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <= @__p_0 +WHERE "d"."BarShort" <= @p --------------- 13 Result: @@ -38,11 +38,11 @@ WHERE "d"."BarShort" <= @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <= @__p_0 +WHERE "d"."BarShort" <= @p --------------- 14 Result: @@ -66,11 +66,11 @@ WHERE "d"."BarShort" <= @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <= @__p_0 +WHERE "d"."BarShort" <= @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThanOrEquals_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThanOrEquals_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..3cb54d1be73 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThanOrEquals_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,102 @@ +12 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + } + ] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <= @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <= @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 14 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" <= @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `lte` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 34 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThan_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThan_Expression.snap index c65fb798240..54e49a5f24e 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThan_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThan_Expression.snap @@ -9,11 +9,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" < @__p_0 +WHERE "d"."BarShort" < @p --------------- 13 Result: @@ -31,11 +31,11 @@ WHERE "d"."BarShort" < @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" < @__p_0 +WHERE "d"."BarShort" < @p --------------- 14 Result: @@ -56,11 +56,11 @@ WHERE "d"."BarShort" < @__p_0 14 SQL: --------------- -.param set @__p_0 14 +.param set @p 14 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" < @__p_0 +WHERE "d"."BarShort" < @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThan_Expression_NET8_0_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThan_Expression_NET8_0_NET9_0.snap new file mode 100644 index 00000000000..c65fb798240 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableLowerThan_Expression_NET8_0_NET9_0.snap @@ -0,0 +1,92 @@ +12 Result: +--------------- +{ + "data": { + "root": [] + } +} +--------------- + +12 SQL: +--------------- +.param set @__p_0 12 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" < @__p_0 +--------------- + +13 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + } + ] + } +} +--------------- + +13 SQL: +--------------- +.param set @__p_0 13 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" < @__p_0 +--------------- + +14 Result: +--------------- +{ + "data": { + "root": [ + { + "barShort": 12 + }, + { + "barShort": 13 + } + ] + } +} +--------------- + +14 SQL: +--------------- +.param set @__p_0 14 + +SELECT "d"."Id", "d"."BarShort" +FROM "Data" AS "d" +WHERE "d"."BarShort" < @__p_0 +--------------- + +null +--------------- +{ + "errors": [ + { + "message": "The provided value for filter `lt` of type ShortOperationFilterInput is invalid. Null values are not supported.", + "locations": [ + { + "line": 1, + "column": 33 + } + ], + "path": [ + "root" + ], + "extensions": { + "code": "HC0026", + "expectedType": "Short!", + "filterType": "ShortOperationFilterInput" + } + } + ], + "data": { + "root": null + } +} +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotEqual_Expression.snap index b3b7074d1e5..6f3647798f5 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotEqual_Expression.snap @@ -19,11 +19,11 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <> @__p_0 OR "d"."BarShort" IS NULL +WHERE "d"."BarShort" <> @p OR "d"."BarShort" IS NULL --------------- 13 Result: @@ -47,11 +47,11 @@ WHERE "d"."BarShort" <> @__p_0 OR "d"."BarShort" IS NULL 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" <> @__p_0 OR "d"."BarShort" IS NULL +WHERE "d"."BarShort" <> @p OR "d"."BarShort" IS NULL --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotEqual_Expression_NET8_0_NET9_0.snap similarity index 57% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET9_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotEqual_Expression_NET8_0_NET9_0.snap index 39ff3fefa3b..b3b7074d1e5 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET9_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotEqual_Expression_NET8_0_NET9_0.snap @@ -1,10 +1,13 @@ -12and13 Result: +12 Result: --------------- { "data": { "root": [ { - "barShort": 12 + "barShort": null + }, + { + "barShort": 14 }, { "barShort": 13 @@ -14,53 +17,53 @@ } --------------- -12and13 SQL: +12 SQL: --------------- -.param set @__p_0 '[12,13]' +.param set @__p_0 12 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarShort" <> @__p_0 OR "d"."BarShort" IS NULL --------------- -13and14 Result: +13 Result: --------------- { "data": { "root": [ { - "barShort": 14 + "barShort": 12 }, { - "barShort": 13 + "barShort": null + }, + { + "barShort": 14 } ] } } --------------- -13and14 SQL: +13 SQL: --------------- -.param set @__p_0 '[13,14]' +.param set @__p_0 13 SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarShort" <> @__p_0 OR "d"."BarShort" IS NULL --------------- -13andNull Result: +null Result: --------------- { "data": { "root": [ { - "barShort": null + "barShort": 12 + }, + { + "barShort": 14 }, { "barShort": 13 @@ -70,14 +73,9 @@ WHERE "d"."BarShort" IN ( } --------------- -13andNull SQL: +null SQL: --------------- -.param set @__p_0_without_nulls '[13]' - SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IN ( - SELECT "p"."value" - FROM json_each(@__p_0_without_nulls) AS "p" -) OR "d"."BarShort" IS NULL +WHERE "d"."BarShort" IS NOT NULL --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotGreaterThanOrEquals_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotGreaterThanOrEquals_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotGreaterThanOrEquals_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotGreaterThanOrEquals_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotGreaterThan_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotGreaterThan_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotGreaterThan_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotGreaterThan_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET9_0.snap deleted file mode 100644 index 120bf90817f..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET9_0.snap +++ /dev/null @@ -1,83 +0,0 @@ -12and13 Result: ---------------- -{ - "data": { - "root": [ - { - "barShort": null - }, - { - "barShort": 14 - } - ] - } -} ---------------- - -12and13 SQL: ---------------- -.param set @__p_0 '[12,13]' - -SELECT "d"."Id", "d"."BarShort" -FROM "Data" AS "d" -WHERE "d"."BarShort" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) OR "d"."BarShort" IS NULL ---------------- - -13and14 Result: ---------------- -{ - "data": { - "root": [ - { - "barShort": 12 - }, - { - "barShort": null - } - ] - } -} ---------------- - -13and14 SQL: ---------------- -.param set @__p_0 '[13,14]' - -SELECT "d"."Id", "d"."BarShort" -FROM "Data" AS "d" -WHERE "d"."BarShort" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) OR "d"."BarShort" IS NULL ---------------- - -13andNull Result: ---------------- -{ - "data": { - "root": [ - { - "barShort": 12 - }, - { - "barShort": 14 - } - ] - } -} ---------------- - -13andNull SQL: ---------------- -.param set @__p_0_without_nulls '[13]' - -SELECT "d"."Id", "d"."BarShort" -FROM "Data" AS "d" -WHERE "d"."BarShort" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0_without_nulls) AS "p" -) AND "d"."BarShort" IS NOT NULL ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotLowerThanOrEquals_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotLowerThanOrEquals_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotLowerThanOrEquals_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotLowerThanOrEquals_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotLowerThan_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotLowerThan_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotLowerThan_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotLowerThan_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression.snap index fee4eb3d4af..efdcd684f79 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression.snap @@ -13,11 +13,11 @@ BAR Result: BAR SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = @__p_0 +WHERE "d"."BarEnum" = @p --------------- FOO Result: @@ -35,11 +35,11 @@ FOO Result: FOO SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = @__p_0 +WHERE "d"."BarEnum" = @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression_NET8_0_NET9_0.snap similarity index 90% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression_NET8_0_NET9_0.snap index efdcd684f79..fee4eb3d4af 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumEqual_Expression_NET8_0_NET9_0.snap @@ -13,11 +13,11 @@ BAR Result: BAR SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = @p +WHERE "d"."BarEnum" = @__p_0 --------------- FOO Result: @@ -35,11 +35,11 @@ FOO Result: FOO SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = @p +WHERE "d"."BarEnum" = @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression.snap index 42b18f8395a..4c04960d38d 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression.snap @@ -16,14 +16,12 @@ BarAndFoo Result: BarAndFoo SQL: --------------- -.param set @__p_0 '[1,0]' +.param set @p1 1 +.param set @p2 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarEnum" IN (@p1, @p2) --------------- FOO Result: @@ -41,14 +39,11 @@ FOO Result: FOO SQL: --------------- -.param set @__p_0 '[0]' +.param set @p1 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarEnum" = @p1 --------------- nullAndFoo Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET8_0_NET9_0.snap similarity index 82% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET8_0_NET9_0.snap index 4c04960d38d..42b18f8395a 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET8_0_NET9_0.snap @@ -16,12 +16,14 @@ BarAndFoo Result: BarAndFoo SQL: --------------- -.param set @p1 1 -.param set @p2 0 +.param set @__p_0 '[1,0]' SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" IN (@p1, @p2) +WHERE "d"."BarEnum" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- FOO Result: @@ -39,11 +41,14 @@ FOO Result: FOO SQL: --------------- -.param set @p1 0 +.param set @__p_0 '[0]' SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = @p1 +WHERE "d"."BarEnum" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAndFoo Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression.snap index 5432abc2324..70e79e6972d 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression.snap @@ -19,11 +19,11 @@ BAR Result: BAR SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> @__p_0 +WHERE "d"."BarEnum" <> @p --------------- FOO Result: @@ -47,11 +47,11 @@ FOO Result: FOO SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> @__p_0 +WHERE "d"."BarEnum" <> @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression_NET8_0_NET9_0.snap similarity index 91% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression_NET8_0_NET9_0.snap index 70e79e6972d..5432abc2324 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotEqual_Expression_NET8_0_NET9_0.snap @@ -19,11 +19,11 @@ BAR Result: BAR SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> @p +WHERE "d"."BarEnum" <> @__p_0 --------------- FOO Result: @@ -47,11 +47,11 @@ FOO Result: FOO SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> @p +WHERE "d"."BarEnum" <> @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression.snap index 6a07ddc74d4..f629d538a25 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression.snap @@ -16,14 +16,12 @@ BarAndFoo Result: BarAndFoo SQL: --------------- -.param set @__p_0 '[1,0]' +.param set @p1 1 +.param set @p2 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarEnum" NOT IN (@p1, @p2) --------------- FOO Result: @@ -47,14 +45,11 @@ FOO Result: FOO SQL: --------------- -.param set @__p_0 '[0]' +.param set @p1 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."BarEnum" <> @p1 --------------- nullAndFoo Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET8_0_NET9_0.snap similarity index 83% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET8_0_NET9_0.snap index f629d538a25..6a07ddc74d4 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET8_0_NET9_0.snap @@ -16,12 +16,14 @@ BarAndFoo Result: BarAndFoo SQL: --------------- -.param set @p1 1 -.param set @p2 0 +.param set @__p_0 '[1,0]' SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" NOT IN (@p1, @p2) +WHERE "d"."BarEnum" NOT IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- FOO Result: @@ -45,11 +47,14 @@ FOO Result: FOO SQL: --------------- -.param set @p1 0 +.param set @__p_0 '[0]' SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> @p1 +WHERE "d"."BarEnum" NOT IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAndFoo Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression.snap index f313eae7a6e..a1a3271c78b 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression.snap @@ -13,11 +13,11 @@ BAR Result: BAR SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = @__p_0 +WHERE "d"."BarEnum" = @p --------------- FOO Result: @@ -35,11 +35,11 @@ FOO Result: FOO SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = @__p_0 +WHERE "d"."BarEnum" = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression_NET8_0_NET9_0.snap similarity index 87% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression_NET8_0_NET9_0.snap index a1a3271c78b..f313eae7a6e 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumEqual_Expression_NET8_0_NET9_0.snap @@ -13,11 +13,11 @@ BAR Result: BAR SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = @p +WHERE "d"."BarEnum" = @__p_0 --------------- FOO Result: @@ -35,11 +35,11 @@ FOO Result: FOO SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = @p +WHERE "d"."BarEnum" = @__p_0 --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET9_0.snap deleted file mode 100644 index 6e98dc2b031..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET9_0.snap +++ /dev/null @@ -1,80 +0,0 @@ -BarAndFoo Result: ---------------- -{ - "data": { - "root": [ - { - "barEnum": "BAR" - }, - { - "barEnum": "FOO" - } - ] - } -} ---------------- - -BarAndFoo SQL: ---------------- -.param set @__p_0 '[1,0]' - -SELECT "d"."Id", "d"."BarEnum" -FROM "Data" AS "d" -WHERE "d"."BarEnum" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) ---------------- - -FOO Result: ---------------- -{ - "data": { - "root": [ - { - "barEnum": "FOO" - } - ] - } -} ---------------- - -FOO SQL: ---------------- -.param set @__p_0 '[0]' - -SELECT "d"."Id", "d"."BarEnum" -FROM "Data" AS "d" -WHERE "d"."BarEnum" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) ---------------- - -nullAndFoo Result: ---------------- -{ - "data": { - "root": [ - { - "barEnum": "FOO" - }, - { - "barEnum": null - } - ] - } -} ---------------- - -nullAndFoo SQL: ---------------- -.param set @__p_0_without_nulls '[0]' - -SELECT "d"."Id", "d"."BarEnum" -FROM "Data" AS "d" -WHERE "d"."BarEnum" IN ( - SELECT "p"."value" - FROM json_each(@__p_0_without_nulls) AS "p" -) OR "d"."BarEnum" IS NULL ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression.snap index 944014046d2..05109068c3f 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression.snap @@ -22,11 +22,11 @@ BAR Result: BAR SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> @__p_0 OR "d"."BarEnum" IS NULL +WHERE "d"."BarEnum" <> @p OR "d"."BarEnum" IS NULL --------------- FOO Result: @@ -53,11 +53,11 @@ FOO Result: FOO SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> @__p_0 OR "d"."BarEnum" IS NULL +WHERE "d"."BarEnum" <> @p OR "d"."BarEnum" IS NULL --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression_NET8_0_NET9_0.snap similarity index 87% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression_NET8_0_NET9_0.snap index 05109068c3f..944014046d2 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotEqual_Expression_NET8_0_NET9_0.snap @@ -22,11 +22,11 @@ BAR Result: BAR SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> @p OR "d"."BarEnum" IS NULL +WHERE "d"."BarEnum" <> @__p_0 OR "d"."BarEnum" IS NULL --------------- FOO Result: @@ -53,11 +53,11 @@ FOO Result: FOO SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> @p OR "d"."BarEnum" IS NULL +WHERE "d"."BarEnum" <> @__p_0 OR "d"."BarEnum" IS NULL --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET9_0.snap deleted file mode 100644 index 250998cf0fb..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET9_0.snap +++ /dev/null @@ -1,95 +0,0 @@ -BarAndFoo Result: ---------------- -{ - "data": { - "root": [ - { - "barEnum": "BAZ" - }, - { - "barEnum": null - }, - { - "barEnum": "QUX" - } - ] - } -} ---------------- - -BarAndFoo SQL: ---------------- -.param set @__p_0 '[1,0]' - -SELECT "d"."Id", "d"."BarEnum" -FROM "Data" AS "d" -WHERE "d"."BarEnum" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) OR "d"."BarEnum" IS NULL ---------------- - -FOO Result: ---------------- -{ - "data": { - "root": [ - { - "barEnum": "BAR" - }, - { - "barEnum": "BAZ" - }, - { - "barEnum": null - }, - { - "barEnum": "QUX" - } - ] - } -} ---------------- - -FOO SQL: ---------------- -.param set @__p_0 '[0]' - -SELECT "d"."Id", "d"."BarEnum" -FROM "Data" AS "d" -WHERE "d"."BarEnum" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) OR "d"."BarEnum" IS NULL ---------------- - -nullAndFoo Result: ---------------- -{ - "data": { - "root": [ - { - "barEnum": "BAR" - }, - { - "barEnum": "BAZ" - }, - { - "barEnum": "QUX" - } - ] - } -} ---------------- - -nullAndFoo SQL: ---------------- -.param set @__p_0_without_nulls '[0]' - -SELECT "d"."Id", "d"."BarEnum" -FROM "Data" AS "d" -WHERE "d"."BarEnum" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0_without_nulls) AS "p" -) AND "d"."BarEnum" IS NOT NULL ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression.snap index 68ee52add58..ef7a8b954f0 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression.snap @@ -14,14 +14,14 @@ 1 SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."LastName", "d"."Name" FROM "Data" AS "d" WHERE ( SELECT COUNT(*) FROM "Bar" AS "b" - WHERE "d"."Id" = "b"."FooId") = @__p_0 + WHERE "d"."Id" = "b"."FooId") = @p --------------- 0 Result: @@ -40,14 +40,14 @@ WHERE ( 0 SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."LastName", "d"."Name" FROM "Data" AS "d" WHERE ( SELECT COUNT(*) FROM "Bar" AS "b" - WHERE "d"."Id" = "b"."FooId") = @__p_0 + WHERE "d"."Id" = "b"."FooId") = @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression_NET8_0_NET9_0.snap similarity index 89% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression_NET8_0_NET9_0.snap index ef7a8b954f0..68ee52add58 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_CollectionLengthExpression_NET8_0_NET9_0.snap @@ -14,14 +14,14 @@ 1 SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."LastName", "d"."Name" FROM "Data" AS "d" WHERE ( SELECT COUNT(*) FROM "Bar" AS "b" - WHERE "d"."Id" = "b"."FooId") = @p + WHERE "d"."Id" = "b"."FooId") = @__p_0 --------------- 0 Result: @@ -40,14 +40,14 @@ WHERE ( 0 SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."LastName", "d"."Name" FROM "Data" AS "d" WHERE ( SELECT COUNT(*) FROM "Bar" AS "b" - WHERE "d"."Id" = "b"."FooId") = @p + WHERE "d"."Id" = "b"."FooId") = @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression.snap index efa4d42ba1a..fe3e80799ce 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression.snap @@ -14,11 +14,11 @@ Sam_Sampleman Result: Sam_Sampleman SQL: --------------- -.param set @__p_0 'Sam Sampleman' +.param set @p 'Sam Sampleman' SELECT "d"."Id", "d"."LastName", "d"."Name" FROM "Data" AS "d" -WHERE COALESCE("d"."Name", '') || ' ' || COALESCE("d"."LastName", '') = @__p_0 +WHERE COALESCE("d"."Name", '') || ' ' || COALESCE("d"."LastName", '') = @p --------------- NoMatch Result: @@ -32,11 +32,11 @@ NoMatch Result: NoMatch SQL: --------------- -.param set @__p_0 'NoMatch' +.param set @p 'NoMatch' SELECT "d"."Id", "d"."LastName", "d"."Name" FROM "Data" AS "d" -WHERE COALESCE("d"."Name", '') || ' ' || COALESCE("d"."LastName", '') = @__p_0 +WHERE COALESCE("d"."Name", '') || ' ' || COALESCE("d"."LastName", '') = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression_NET8_0_NET9_0.snap similarity index 89% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression_NET8_0_NET9_0.snap index fe3e80799ce..efa4d42ba1a 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorExpressionTests.Create_StringConcatExpression_NET8_0_NET9_0.snap @@ -14,11 +14,11 @@ Sam_Sampleman Result: Sam_Sampleman SQL: --------------- -.param set @p 'Sam Sampleman' +.param set @__p_0 'Sam Sampleman' SELECT "d"."Id", "d"."LastName", "d"."Name" FROM "Data" AS "d" -WHERE COALESCE("d"."Name", '') || ' ' || COALESCE("d"."LastName", '') = @p +WHERE COALESCE("d"."Name", '') || ' ' || COALESCE("d"."LastName", '') = @__p_0 --------------- NoMatch Result: @@ -32,11 +32,11 @@ NoMatch Result: NoMatch SQL: --------------- -.param set @p 'NoMatch' +.param set @__p_0 'NoMatch' SELECT "d"."Id", "d"."LastName", "d"."Name" FROM "Data" AS "d" -WHERE COALESCE("d"."Name", '') || ' ' || COALESCE("d"."LastName", '') = @p +WHERE COALESCE("d"."Name", '') || ' ' || COALESCE("d"."LastName", '') = @__p_0 --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression.snap index 30f200ccb38..245c50adcc7 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression.snap @@ -15,12 +15,12 @@ a Result: a SQL: --------------- -.param set @__p_0 'a' +.param set @p 'a' SELECT "d"."Id", "d"."TestId" FROM "Data" AS "d" INNER JOIN "Test" AS "t" ON "d"."TestId" = "t"."Id" -WHERE "t"."Prop" = @__p_0 +WHERE "t"."Prop" = @p --------------- ba Result: @@ -40,12 +40,12 @@ ba Result: ba SQL: --------------- -.param set @__p_0 'b' +.param set @p 'b' SELECT "d"."Id", "d"."TestId" FROM "Data" AS "d" INNER JOIN "Test" AS "t" ON "d"."TestId" = "t"."Id" -WHERE "t"."Prop" = @__p_0 +WHERE "t"."Prop" = @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression_NET8_0_NET9_0.snap similarity index 91% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression_NET8_0_NET9_0.snap index 245c50adcc7..30f200ccb38 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorInterfacesTests.Create_InterfaceStringEqual_Expression_NET8_0_NET9_0.snap @@ -15,12 +15,12 @@ a Result: a SQL: --------------- -.param set @p 'a' +.param set @__p_0 'a' SELECT "d"."Id", "d"."TestId" FROM "Data" AS "d" INNER JOIN "Test" AS "t" ON "d"."TestId" = "t"."Id" -WHERE "t"."Prop" = @p +WHERE "t"."Prop" = @__p_0 --------------- ba Result: @@ -40,12 +40,12 @@ ba Result: ba SQL: --------------- -.param set @p 'b' +.param set @__p_0 'b' SELECT "d"."Id", "d"."TestId" FROM "Data" AS "d" INNER JOIN "Test" AS "t" ON "d"."TestId" = "t"."Id" -WHERE "t"."Prop" = @p +WHERE "t"."Prop" = @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression.snap index 5d6f8c0f35a..a30b15c44e3 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression.snap @@ -23,14 +23,14 @@ a Result: a SQL: --------------- -.param set @__p_0 'a' +.param set @p 'a' SELECT "d"."Id" FROM "Data" AS "d" WHERE NOT EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND ("f"."Bar" <> @__p_0 OR "f"."Bar" IS NULL)) + WHERE "d"."Id" = "f"."FooId" AND ("f"."Bar" <> @p OR "f"."Bar" IS NULL)) --------------- d Result: @@ -44,14 +44,14 @@ d Result: d SQL: --------------- -.param set @__p_0 'd' +.param set @p 'd' SELECT "d"."Id" FROM "Data" AS "d" WHERE NOT EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND ("f"."Bar" <> @__p_0 OR "f"."Bar" IS NULL)) + WHERE "d"."Id" = "f"."FooId" AND ("f"."Bar" <> @p OR "f"."Bar" IS NULL)) --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression_NET8_0_NET9_0.snap similarity index 81% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression_NET8_0_NET9_0.snap index a30b15c44e3..5d6f8c0f35a 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayAllObjectStringEqual_Expression_NET8_0_NET9_0.snap @@ -23,14 +23,14 @@ a Result: a SQL: --------------- -.param set @p 'a' +.param set @__p_0 'a' SELECT "d"."Id" FROM "Data" AS "d" WHERE NOT EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND ("f"."Bar" <> @p OR "f"."Bar" IS NULL)) + WHERE "d"."Id" = "f"."FooId" AND ("f"."Bar" <> @__p_0 OR "f"."Bar" IS NULL)) --------------- d Result: @@ -44,14 +44,14 @@ d Result: d SQL: --------------- -.param set @p 'd' +.param set @__p_0 'd' SELECT "d"."Id" FROM "Data" AS "d" WHERE NOT EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND ("f"."Bar" <> @p OR "f"."Bar" IS NULL)) + WHERE "d"."Id" = "f"."FooId" AND ("f"."Bar" <> @__p_0 OR "f"."Bar" IS NULL)) --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression.snap index 63822313708..8125c203591 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression.snap @@ -36,14 +36,14 @@ a Result: a SQL: --------------- -.param set @__p_0 'a' +.param set @p 'a' SELECT "d"."Id" FROM "Data" AS "d" WHERE NOT EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @__p_0) + WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @p) --------------- d Result: @@ -84,14 +84,14 @@ d Result: d SQL: --------------- -.param set @__p_0 'd' +.param set @p 'd' SELECT "d"."Id" FROM "Data" AS "d" WHERE NOT EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @__p_0) + WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @p) --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression_NET8_0_NET9_0.snap similarity index 93% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression_NET8_0_NET9_0.snap index 8125c203591..63822313708 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArrayNoneObjectStringEqual_Expression_NET8_0_NET9_0.snap @@ -36,14 +36,14 @@ a Result: a SQL: --------------- -.param set @p 'a' +.param set @__p_0 'a' SELECT "d"."Id" FROM "Data" AS "d" WHERE NOT EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @p) + WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @__p_0) --------------- d Result: @@ -84,14 +84,14 @@ d Result: d SQL: --------------- -.param set @p 'd' +.param set @__p_0 'd' SELECT "d"."Id" FROM "Data" AS "d" WHERE NOT EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @p) + WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @__p_0) --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression.snap index c29562a4db0..8ab6907cc03 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression.snap @@ -49,14 +49,14 @@ a Result: a SQL: --------------- -.param set @__p_0 'a' +.param set @p 'a' SELECT "d"."Id" FROM "Data" AS "d" WHERE EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @__p_0) + WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @p) --------------- d Result: @@ -110,14 +110,14 @@ d Result: d SQL: --------------- -.param set @__p_0 'd' +.param set @p 'd' SELECT "d"."Id" FROM "Data" AS "d" WHERE EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @__p_0) + WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @p) --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression_NET8_0_NET9_0.snap similarity index 92% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression_NET8_0_NET9_0.snap index 8ab6907cc03..c29562a4db0 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorListTests.Create_ArraySomeObjectStringEqualWithNull_Expression_NET8_0_NET9_0.snap @@ -49,14 +49,14 @@ a Result: a SQL: --------------- -.param set @p 'a' +.param set @__p_0 'a' SELECT "d"."Id" FROM "Data" AS "d" WHERE EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @p) + WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @__p_0) --------------- d Result: @@ -110,14 +110,14 @@ d Result: d SQL: --------------- -.param set @p 'd' +.param set @__p_0 'd' SELECT "d"."Id" FROM "Data" AS "d" WHERE EXISTS ( SELECT 1 FROM "FooNested" AS "f" - WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @p) + WHERE "d"."Id" = "f"."FooId" AND "f"."Bar" = @__p_0) --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression.snap index 1474f5f43c0..67fa1c8b66d 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression.snap @@ -9,7 +9,7 @@ a Result: a SQL: --------------- -.param set @__p_0 'a' +.param set @p 'a' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" @@ -18,7 +18,7 @@ WHERE EXISTS ( SELECT 1 FROM "Data" AS "d0" INNER JOIN "Foo" AS "f0" ON "d0"."FooId" = "f0"."Id" - WHERE "f"."Id" = "d0"."FooId" AND "f0"."BarString" = @__p_0) + WHERE "f"."Id" = "d0"."FooId" AND "f0"."BarString" = @p) --------------- b Result: @@ -32,7 +32,7 @@ b Result: b SQL: --------------- -.param set @__p_0 'd' +.param set @p 'd' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" @@ -41,7 +41,7 @@ WHERE EXISTS ( SELECT 1 FROM "Data" AS "d0" INNER JOIN "Foo" AS "f0" ON "d0"."FooId" = "f0"."Id" - WHERE "f"."Id" = "d0"."FooId" AND "f0"."BarString" = @__p_0) + WHERE "f"."Id" = "d0"."FooId" AND "f0"."BarString" = @p) --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression_NET8_0_NET9_0.snap similarity index 87% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression_NET8_0_NET9_0.snap index 67fa1c8b66d..1474f5f43c0 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ArrayObjectNestedArraySomeStringEqual_Expression_NET8_0_NET9_0.snap @@ -9,7 +9,7 @@ a Result: a SQL: --------------- -.param set @p 'a' +.param set @__p_0 'a' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" @@ -18,7 +18,7 @@ WHERE EXISTS ( SELECT 1 FROM "Data" AS "d0" INNER JOIN "Foo" AS "f0" ON "d0"."FooId" = "f0"."Id" - WHERE "f"."Id" = "d0"."FooId" AND "f0"."BarString" = @p) + WHERE "f"."Id" = "d0"."FooId" AND "f0"."BarString" = @__p_0) --------------- b Result: @@ -32,7 +32,7 @@ b Result: b SQL: --------------- -.param set @p 'd' +.param set @__p_0 'd' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" @@ -41,7 +41,7 @@ WHERE EXISTS ( SELECT 1 FROM "Data" AS "d0" INNER JOIN "Foo" AS "f0" ON "d0"."FooId" = "f0"."Id" - WHERE "f"."Id" = "d0"."FooId" AND "f0"."BarString" = @p) + WHERE "f"."Id" = "d0"."FooId" AND "f0"."BarString" = @__p_0) --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression.snap index 3369f483965..5071856339a 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression.snap @@ -20,12 +20,12 @@ BAR Result: BAR SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = @__p_0 +WHERE "f"."BarEnum" = @p --------------- FOO Result: @@ -45,12 +45,12 @@ FOO Result: FOO SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = @__p_0 +WHERE "f"."BarEnum" = @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression_NET8_0_NET9_0.snap similarity index 92% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression_NET8_0_NET9_0.snap index 5071856339a..3369f483965 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumEqual_Expression_NET8_0_NET9_0.snap @@ -20,12 +20,12 @@ BAR Result: BAR SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = @p +WHERE "f"."BarEnum" = @__p_0 --------------- FOO Result: @@ -45,12 +45,12 @@ FOO Result: FOO SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = @p +WHERE "f"."BarEnum" = @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression.snap index 80992004192..cb4eb7bcddf 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression.snap @@ -25,15 +25,13 @@ BarAndFoo Result: BarAndFoo SQL: --------------- -.param set @__p_0 '[1,0]' +.param set @p1 1 +.param set @p2 0 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "f"."BarEnum" IN (@p1, @p2) --------------- FOO Result: @@ -53,15 +51,12 @@ FOO Result: FOO SQL: --------------- -.param set @__p_0 '[0]' +.param set @p1 0 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "f"."BarEnum" = @p1 --------------- nullAndFoo Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET8_0_NET9_0.snap similarity index 85% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET8_0_NET9_0.snap index cb4eb7bcddf..80992004192 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET8_0_NET9_0.snap @@ -25,13 +25,15 @@ BarAndFoo Result: BarAndFoo SQL: --------------- -.param set @p1 1 -.param set @p2 0 +.param set @__p_0 '[1,0]' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" IN (@p1, @p2) +WHERE "f"."BarEnum" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- FOO Result: @@ -51,12 +53,15 @@ FOO Result: FOO SQL: --------------- -.param set @p1 0 +.param set @__p_0 '[0]' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = @p1 +WHERE "f"."BarEnum" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAndFoo Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression.snap index d926087a0f8..a8119069e64 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression.snap @@ -20,12 +20,12 @@ true Result: true SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarBool" = @__p_0 +WHERE "f"."BarBool" = @p --------------- false Result: @@ -55,12 +55,12 @@ false Result: false SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarBool" = @__p_0 +WHERE "f"."BarBool" = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression_NET8_0_NET9_0.snap similarity index 92% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression_NET8_0_NET9_0.snap index a8119069e64..d926087a0f8 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableBooleanEqual_Expression_NET8_0_NET9_0.snap @@ -20,12 +20,12 @@ true Result: true SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarBool" = @p +WHERE "f"."BarBool" = @__p_0 --------------- false Result: @@ -55,12 +55,12 @@ false Result: false SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarBool" = @p +WHERE "f"."BarBool" = @__p_0 --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression.snap index 19dd8f2cbb0..f2765c76788 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression.snap @@ -20,12 +20,12 @@ BAR Result: BAR SQL: --------------- -.param set @__p_0 1 +.param set @p 1 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = @__p_0 +WHERE "f"."BarEnum" = @p --------------- FOO Result: @@ -45,12 +45,12 @@ FOO Result: FOO SQL: --------------- -.param set @__p_0 0 +.param set @p 0 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = @__p_0 +WHERE "f"."BarEnum" = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression_NET8_0_NET9_0.snap similarity index 90% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression_NET8_0_NET9_0.snap index f2765c76788..19dd8f2cbb0 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumEqual_Expression_NET8_0_NET9_0.snap @@ -20,12 +20,12 @@ BAR Result: BAR SQL: --------------- -.param set @p 1 +.param set @__p_0 1 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = @p +WHERE "f"."BarEnum" = @__p_0 --------------- FOO Result: @@ -45,12 +45,12 @@ FOO Result: FOO SQL: --------------- -.param set @p 0 +.param set @__p_0 0 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = @p +WHERE "f"."BarEnum" = @__p_0 --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumIn_Expression_NET11_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumIn_Expression_NET11_0.snap new file mode 100644 index 00000000000..80b7405fafd --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumIn_Expression_NET11_0.snap @@ -0,0 +1,85 @@ +BarAndFoo Result: +--------------- +{ + "data": { + "root": [ + { + "foo": { + "barEnum": "BAR" + } + }, + { + "foo": { + "barEnum": "BAR" + } + }, + { + "foo": { + "barEnum": "FOO" + } + } + ] + } +} +--------------- + +BarAndFoo SQL: +--------------- +.param set @p1 1 +.param set @p2 0 + +SELECT "d"."Id", "d"."FooId" +FROM "Data" AS "d" +LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" +WHERE "f"."BarEnum" IN (@p1, @p2) +--------------- + +FOO Result: +--------------- +{ + "data": { + "root": [ + { + "foo": { + "barEnum": "FOO" + } + } + ] + } +} +--------------- + +FOO SQL: +--------------- +.param set @p1 0 + +SELECT "d"."Id", "d"."FooId" +FROM "Data" AS "d" +LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" +WHERE "f"."BarEnum" = @p1 +--------------- + +nullAndFoo Result: +--------------- +{ + "data": { + "root": [ + { + "foo": { + "barEnum": "FOO" + } + } + ] + } +} +--------------- + +nullAndFoo SQL: +--------------- +.param set @p1 0 + +SELECT "d"."Id", "d"."FooId" +FROM "Data" AS "d" +LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" +WHERE "f"."BarEnum" IS NULL OR "f"."BarEnum" = @p1 +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression.snap index f9fa821e049..e250bf97941 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression.snap @@ -20,12 +20,12 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" = @__p_0 +WHERE "f"."BarShort" = @p --------------- 13 Result: @@ -45,12 +45,12 @@ WHERE "f"."BarShort" = @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" = @__p_0 +WHERE "f"."BarShort" = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression_NET8_0_NET9_0.snap similarity index 91% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression_NET8_0_NET9_0.snap index e250bf97941..f9fa821e049 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortEqual_Expression_NET8_0_NET9_0.snap @@ -20,12 +20,12 @@ 12 SQL: --------------- -.param set @p 12 +.param set @__p_0 12 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" = @p +WHERE "f"."BarShort" = @__p_0 --------------- 13 Result: @@ -45,12 +45,12 @@ WHERE "f"."BarShort" = @p 13 SQL: --------------- -.param set @p 13 +.param set @__p_0 13 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" = @p +WHERE "f"."BarShort" = @__p_0 --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortIn_Expression_NET11_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortIn_Expression_NET11_0.snap new file mode 100644 index 00000000000..23906540d03 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortIn_Expression_NET11_0.snap @@ -0,0 +1,106 @@ +12and13 Result: +--------------- +{ + "data": { + "root": [ + { + "foo": { + "barShort": 12 + } + }, + { + "foo": { + "barShort": 12 + } + }, + { + "foo": { + "barShort": 13 + } + } + ] + } +} +--------------- + +12and13 SQL: +--------------- +.param set @p1 12 +.param set @p2 13 + +SELECT "d"."Id", "d"."FooId" +FROM "Data" AS "d" +LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" +WHERE "f"."BarShort" IN (@p1, @p2) +--------------- + +13and14 Result: +--------------- +{ + "data": { + "root": [ + { + "foo": { + "barShort": 14 + } + }, + { + "foo": { + "barShort": 14 + } + }, + { + "foo": { + "barShort": 13 + } + } + ] + } +} +--------------- + +13and14 SQL: +--------------- +.param set @p1 13 +.param set @p2 14 + +SELECT "d"."Id", "d"."FooId" +FROM "Data" AS "d" +LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" +WHERE "f"."BarShort" IN (@p1, @p2) +--------------- + +13andNull Result: +--------------- +{ + "data": { + "root": [ + { + "foo": { + "barShort": null + } + }, + { + "foo": { + "barShort": null + } + }, + { + "foo": { + "barShort": 13 + } + } + ] + } +} +--------------- + +13andNull SQL: +--------------- +.param set @p1 13 + +SELECT "d"."Id", "d"."FooId" +FROM "Data" AS "d" +LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" +WHERE "f"."BarShort" IS NULL OR "f"."BarShort" = @p1 +--------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression.snap index bfa7f565a8d..c8b5e0e6aac 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression.snap @@ -20,12 +20,12 @@ 12 SQL: --------------- -.param set @__p_0 12 +.param set @p 12 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" = @__p_0 +WHERE "f"."BarShort" = @p --------------- 13 Result: @@ -45,12 +45,12 @@ WHERE "f"."BarShort" = @__p_0 13 SQL: --------------- -.param set @__p_0 13 +.param set @p 13 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" = @__p_0 +WHERE "f"."BarShort" = @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression_NET8_0_NET9_0.snap similarity index 91% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression_NET8_0_NET9_0.snap index c8b5e0e6aac..bfa7f565a8d 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortEqual_Expression_NET8_0_NET9_0.snap @@ -20,12 +20,12 @@ 12 SQL: --------------- -.param set @p 12 +.param set @__p_0 12 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" = @p +WHERE "f"."BarShort" = @__p_0 --------------- 13 Result: @@ -45,12 +45,12 @@ WHERE "f"."BarShort" = @p 13 SQL: --------------- -.param set @p 13 +.param set @__p_0 13 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" = @p +WHERE "f"."BarShort" = @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression.snap index 9e5609e3733..19610fc49f5 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression.snap @@ -25,15 +25,13 @@ 12and13 SQL: --------------- -.param set @__p_0 '[12,13]' +.param set @p1 12 +.param set @p2 13 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "f"."BarShort" IN (@p1, @p2) --------------- 13and14 Result: @@ -63,15 +61,13 @@ WHERE "f"."BarShort" IN ( 13and14 SQL: --------------- -.param set @__p_0 '[13,14]' +.param set @p1 13 +.param set @p2 14 SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "f"."BarShort" IN (@p1, @p2) --------------- nullAnd14 diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET8_0_NET9_0.snap similarity index 86% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET8_0_NET9_0.snap index 19610fc49f5..9e5609e3733 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET8_0_NET9_0.snap @@ -25,13 +25,15 @@ 12and13 SQL: --------------- -.param set @p1 12 -.param set @p2 13 +.param set @__p_0 '[12,13]' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" IN (@p1, @p2) +WHERE "f"."BarShort" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- 13and14 Result: @@ -61,13 +63,15 @@ WHERE "f"."BarShort" IN (@p1, @p2) 13and14 SQL: --------------- -.param set @p1 13 -.param set @p2 14 +.param set @__p_0 '[13,14]' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" IN (@p1, @p2) +WHERE "f"."BarShort" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAnd14 diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression.snap index e9902a99e08..0b6a2b661c1 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression.snap @@ -20,12 +20,12 @@ testatest Result: testatest SQL: --------------- -.param set @__p_0 'testatest' +.param set @p 'testatest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = @__p_0 +WHERE "f"."BarString" = @p --------------- testbtest Result: @@ -50,12 +50,12 @@ testbtest Result: testbtest SQL: --------------- -.param set @__p_0 'testbtest' +.param set @p 'testbtest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = @__p_0 +WHERE "f"."BarString" = @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression_NET8_0_NET9_0.snap similarity index 91% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression_NET8_0_NET9_0.snap index 0b6a2b661c1..e9902a99e08 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Expression_NET8_0_NET9_0.snap @@ -20,12 +20,12 @@ testatest Result: testatest SQL: --------------- -.param set @p 'testatest' +.param set @__p_0 'testatest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = @p +WHERE "f"."BarString" = @__p_0 --------------- testbtest Result: @@ -50,12 +50,12 @@ testbtest Result: testbtest SQL: --------------- -.param set @p 'testbtest' +.param set @__p_0 'testbtest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = @p +WHERE "f"."BarString" = @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened.snap index a30aaf90887..31e0af75765 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened.snap @@ -20,12 +20,12 @@ testatest Result: testatest SQL: --------------- -.param set @__p_0 'testatest' +.param set @p 'testatest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = @__p_0 +WHERE "f"."BarString" = @p --------------- testbtest Result: @@ -50,12 +50,12 @@ testbtest Result: testbtest SQL: --------------- -.param set @__p_0 'testbtest' +.param set @p 'testbtest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = @__p_0 +WHERE "f"."BarString" = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened_NET8_0_NET9_0.snap similarity index 89% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened_NET8_0_NET9_0.snap index 31e0af75765..a30aaf90887 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEqual_Flattened_NET8_0_NET9_0.snap @@ -20,12 +20,12 @@ testatest Result: testatest SQL: --------------- -.param set @p 'testatest' +.param set @__p_0 'testatest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = @p +WHERE "f"."BarString" = @__p_0 --------------- testbtest Result: @@ -50,12 +50,12 @@ testbtest Result: testbtest SQL: --------------- -.param set @p 'testbtest' +.param set @__p_0 'testbtest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = @p +WHERE "f"."BarString" = @__p_0 --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened.snap index 016bb0dd8e4..7a9d431d8b1 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened.snap @@ -17,13 +17,13 @@ testatest Result: testatest SQL: --------------- -.param set @__p_0 'testatest' +.param set @p 'testatest' SELECT "d"."Id", "d"."BarId" FROM "Data" AS "d" INNER JOIN "Bar" AS "b" ON "d"."BarId" = "b"."Id" INNER JOIN "Foo" AS "f" ON "b"."FooId" = "f"."Id" -WHERE "f"."BarString" = @__p_0 +WHERE "f"."BarString" = @p --------------- testbtest Result: @@ -45,13 +45,13 @@ testbtest Result: testbtest SQL: --------------- -.param set @__p_0 'testbtest' +.param set @p 'testbtest' SELECT "d"."Id", "d"."BarId" FROM "Data" AS "d" INNER JOIN "Bar" AS "b" ON "d"."BarId" = "b"."Id" INNER JOIN "Foo" AS "f" ON "b"."FooId" = "f"."Id" -WHERE "f"."BarString" = @__p_0 +WHERE "f"."BarString" = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened_NET8_0_NET9_0.snap similarity index 89% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened_NET8_0_NET9_0.snap index 7a9d431d8b1..016bb0dd8e4 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringEquals_Related_Flattened_NET8_0_NET9_0.snap @@ -17,13 +17,13 @@ testatest Result: testatest SQL: --------------- -.param set @p 'testatest' +.param set @__p_0 'testatest' SELECT "d"."Id", "d"."BarId" FROM "Data" AS "d" INNER JOIN "Bar" AS "b" ON "d"."BarId" = "b"."Id" INNER JOIN "Foo" AS "f" ON "b"."FooId" = "f"."Id" -WHERE "f"."BarString" = @p +WHERE "f"."BarString" = @__p_0 --------------- testbtest Result: @@ -45,13 +45,13 @@ testbtest Result: testbtest SQL: --------------- -.param set @p 'testbtest' +.param set @__p_0 'testbtest' SELECT "d"."Id", "d"."BarId" FROM "Data" AS "d" INNER JOIN "Bar" AS "b" ON "d"."BarId" = "b"."Id" INNER JOIN "Foo" AS "f" ON "b"."FooId" = "f"."Id" -WHERE "f"."BarString" = @p +WHERE "f"."BarString" = @__p_0 --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression.snap index 15c6c31d2b8..444587d84f3 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression.snap @@ -30,15 +30,13 @@ testatestAndtestb Result: testatestAndtestb SQL: --------------- -.param set @__p_0 '["testatest","testbtest"]' +.param set @p1 'testatest' +.param set @p2 'testbtest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "f"."BarString" IN (@p1, @p2) --------------- testbtestAndNull @@ -91,13 +89,10 @@ testatest Result: testatest SQL: --------------- -.param set @__p_0 '["testatest"]' +.param set @p1 'testatest' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "f"."BarString" = @p1 --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET8_0_NET9_0.snap similarity index 85% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET8_0_NET9_0.snap index 444587d84f3..15c6c31d2b8 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET8_0_NET9_0.snap @@ -30,13 +30,15 @@ testatestAndtestb Result: testatestAndtestb SQL: --------------- -.param set @p1 'testatest' -.param set @p2 'testbtest' +.param set @__p_0 '["testatest","testbtest"]' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" IN (@p1, @p2) +WHERE "f"."BarString" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- testbtestAndNull @@ -89,10 +91,13 @@ testatest Result: testatest SQL: --------------- -.param set @p1 'testatest' +.param set @__p_0 '["testatest"]' SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = @p1 +WHERE "f"."BarString" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression.snap index 65b8d3c118b..a0ace3f2075 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression.snap @@ -13,11 +13,11 @@ a Result: a SQL: --------------- -.param set @__p_0 'a' +.param set @p 'a' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IS NOT NULL AND instr("d"."Bar", @__p_0) > 0 +WHERE "d"."Bar" IS NOT NULL AND instr("d"."Bar", @p) > 0 --------------- b Result: @@ -35,11 +35,11 @@ b Result: b SQL: --------------- -.param set @__p_0 'b' +.param set @p 'b' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IS NOT NULL AND instr("d"."Bar", @__p_0) > 0 +WHERE "d"."Bar" IS NOT NULL AND instr("d"."Bar", @p) > 0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression_NET8_0_NET9_0.snap similarity index 85% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression_NET8_0_NET9_0.snap index a0ace3f2075..65b8d3c118b 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringContains_Expression_NET8_0_NET9_0.snap @@ -13,11 +13,11 @@ a Result: a SQL: --------------- -.param set @p 'a' +.param set @__p_0 'a' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IS NOT NULL AND instr("d"."Bar", @p) > 0 +WHERE "d"."Bar" IS NOT NULL AND instr("d"."Bar", @__p_0) > 0 --------------- b Result: @@ -35,11 +35,11 @@ b Result: b SQL: --------------- -.param set @p 'b' +.param set @__p_0 'b' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IS NOT NULL AND instr("d"."Bar", @p) > 0 +WHERE "d"."Bar" IS NOT NULL AND instr("d"."Bar", @__p_0) > 0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression_NET9_0.snap deleted file mode 100644 index 1b1d2c51906..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEndsWith_Expression_NET9_0.snap +++ /dev/null @@ -1,71 +0,0 @@ -atest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - } - ] - } -} ---------------- - -atest SQL: ---------------- -.param set @__p_0_endswith '%atest' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IS NOT NULL AND "d"."Bar" LIKE @__p_0_endswith ESCAPE '\' ---------------- - -btest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - } - ] - } -} ---------------- - -btest SQL: ---------------- -.param set @__p_0_endswith '%btest' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IS NOT NULL AND "d"."Bar" LIKE @__p_0_endswith ESCAPE '\' ---------------- - -null ---------------- -{ - "errors": [ - { - "message": "The provided value for filter `endsWith` of type StringOperationFilterInput is invalid. Null values are not supported.", - "locations": [ - { - "line": 1, - "column": 34 - } - ], - "path": [ - "root" - ], - "extensions": { - "code": "HC0026", - "expectedType": "String!", - "filterType": "StringOperationFilterInput" - } - } - ], - "data": { - "root": null - } -} ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression.snap index 9729777a87f..5614588b332 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression.snap @@ -13,11 +13,11 @@ testatest Result: testatest SQL: --------------- -.param set @__p_0 'testatest' +.param set @p 'testatest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @__p_0 +WHERE "d"."Bar" = @p --------------- testbtest Result: @@ -35,11 +35,11 @@ testbtest Result: testbtest SQL: --------------- -.param set @__p_0 'testbtest' +.param set @p 'testbtest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @__p_0 +WHERE "d"."Bar" = @p --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression_NET8_0_NET9_0.snap similarity index 86% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression_NET8_0_NET9_0.snap index 5614588b332..9729777a87f 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringEqual_Expression_NET8_0_NET9_0.snap @@ -13,11 +13,11 @@ testatest Result: testatest SQL: --------------- -.param set @p 'testatest' +.param set @__p_0 'testatest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @p +WHERE "d"."Bar" = @__p_0 --------------- testbtest Result: @@ -35,11 +35,11 @@ testbtest Result: testbtest SQL: --------------- -.param set @p 'testbtest' +.param set @__p_0 'testbtest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @p +WHERE "d"."Bar" = @__p_0 --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET9_0.snap deleted file mode 100644 index 9059a2331b1..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET9_0.snap +++ /dev/null @@ -1,80 +0,0 @@ -testatestAndtestb Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - }, - { - "bar": "testbtest" - } - ] - } -} ---------------- - -testatestAndtestb SQL: ---------------- -.param set @__p_0 '["testatest","testbtest"]' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) ---------------- - -testbtestAndNull Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - }, - { - "bar": null - } - ] - } -} ---------------- - -testbtestAndNull SQL: ---------------- -.param set @__p_0_without_nulls '["testbtest"]' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IN ( - SELECT "p"."value" - FROM json_each(@__p_0_without_nulls) AS "p" -) OR "d"."Bar" IS NULL ---------------- - -testatest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - } - ] - } -} ---------------- - -testatest SQL: ---------------- -.param set @__p_0 '["testatest"]' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNoContains_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNoContains_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNoContains_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNoContains_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression_NET9_0.snap deleted file mode 100644 index 96e427a0820..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEndsWith_Expression_NET9_0.snap +++ /dev/null @@ -1,77 +0,0 @@ -atest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - }, - { - "bar": null - } - ] - } -} ---------------- - -atest SQL: ---------------- -.param set @__p_0_endswith '%atest' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IS NULL OR "d"."Bar" NOT LIKE @__p_0_endswith ESCAPE '\' ---------------- - -btest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - }, - { - "bar": null - } - ] - } -} ---------------- - -btest SQL: ---------------- -.param set @__p_0_endswith '%btest' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IS NULL OR "d"."Bar" NOT LIKE @__p_0_endswith ESCAPE '\' ---------------- - -null ---------------- -{ - "errors": [ - { - "message": "The provided value for filter `nendsWith` of type StringOperationFilterInput is invalid. Null values are not supported.", - "locations": [ - { - "line": 1, - "column": 35 - } - ], - "path": [ - "root" - ], - "extensions": { - "code": "HC0026", - "expectedType": "String!", - "filterType": "StringOperationFilterInput" - } - } - ], - "data": { - "root": null - } -} ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression.snap index 53b3004c365..59770b8a362 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression.snap @@ -16,11 +16,11 @@ testatest Result: testatest SQL: --------------- -.param set @__p_0 'testatest' +.param set @p 'testatest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @__p_0 OR "d"."Bar" IS NULL +WHERE "d"."Bar" <> @p OR "d"."Bar" IS NULL --------------- testbtest Result: @@ -41,11 +41,11 @@ testbtest Result: testbtest SQL: --------------- -.param set @__p_0 'testbtest' +.param set @p 'testbtest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @__p_0 OR "d"."Bar" IS NULL +WHERE "d"."Bar" <> @p OR "d"."Bar" IS NULL --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression_NET8_0_NET9_0.snap similarity index 84% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression_NET8_0_NET9_0.snap index 59770b8a362..53b3004c365 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotEqual_Expression_NET8_0_NET9_0.snap @@ -16,11 +16,11 @@ testatest Result: testatest SQL: --------------- -.param set @p 'testatest' +.param set @__p_0 'testatest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @p OR "d"."Bar" IS NULL +WHERE "d"."Bar" <> @__p_0 OR "d"."Bar" IS NULL --------------- testbtest Result: @@ -41,11 +41,11 @@ testbtest Result: testbtest SQL: --------------- -.param set @p 'testbtest' +.param set @__p_0 'testbtest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @p OR "d"."Bar" IS NULL +WHERE "d"."Bar" <> @__p_0 OR "d"."Bar" IS NULL --------------- null Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET9_0.snap deleted file mode 100644 index ffa93543cda..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET9_0.snap +++ /dev/null @@ -1,77 +0,0 @@ -testatestAndtestb Result: ---------------- -{ - "data": { - "root": [ - { - "bar": null - } - ] - } -} ---------------- - -testatestAndtestb SQL: ---------------- -.param set @__p_0 '["testatest","testbtest"]' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) OR "d"."Bar" IS NULL ---------------- - -testbtestAndNull Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - } - ] - } -} ---------------- - -testbtestAndNull SQL: ---------------- -.param set @__p_0_without_nulls '["testbtest"]' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0_without_nulls) AS "p" -) AND "d"."Bar" IS NOT NULL ---------------- - -testatest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - }, - { - "bar": null - } - ] - } -} ---------------- - -testatest SQL: ---------------- -.param set @__p_0 '["testatest"]' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) OR "d"."Bar" IS NULL ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression_NET9_0.snap deleted file mode 100644 index 77a754414f2..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotStartsWith_Expression_NET9_0.snap +++ /dev/null @@ -1,77 +0,0 @@ -testa Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - }, - { - "bar": null - } - ] - } -} ---------------- - -testa SQL: ---------------- -.param set @__p_0_startswith 'testa%' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IS NULL OR "d"."Bar" NOT LIKE @__p_0_startswith ESCAPE '\' ---------------- - -testb Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - }, - { - "bar": null - } - ] - } -} ---------------- - -testb SQL: ---------------- -.param set @__p_0_startswith 'testb%' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IS NULL OR "d"."Bar" NOT LIKE @__p_0_startswith ESCAPE '\' ---------------- - -null ---------------- -{ - "errors": [ - { - "message": "The provided value for filter `nstartsWith` of type StringOperationFilterInput is invalid. Null values are not supported.", - "locations": [ - { - "line": 1, - "column": 37 - } - ], - "path": [ - "root" - ], - "extensions": { - "code": "HC0026", - "expectedType": "String!", - "filterType": "StringOperationFilterInput" - } - } - ], - "data": { - "root": null - } -} ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression_NET9_0.snap deleted file mode 100644 index ef3b1890a74..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringStartsWith_Expression_NET9_0.snap +++ /dev/null @@ -1,71 +0,0 @@ -testa Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - } - ] - } -} ---------------- - -testa SQL: ---------------- -.param set @__p_0_startswith 'testa%' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IS NOT NULL AND "d"."Bar" LIKE @__p_0_startswith ESCAPE '\' ---------------- - -testb Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - } - ] - } -} ---------------- - -testb SQL: ---------------- -.param set @__p_0_startswith 'testb%' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" IS NOT NULL AND "d"."Bar" LIKE @__p_0_startswith ESCAPE '\' ---------------- - -null ---------------- -{ - "errors": [ - { - "message": "The provided value for filter `startsWith` of type StringOperationFilterInput is invalid. Null values are not supported.", - "locations": [ - { - "line": 1, - "column": 36 - } - ], - "path": [ - "root" - ], - "extensions": { - "code": "HC0026", - "expectedType": "String!", - "filterType": "StringOperationFilterInput" - } - } - ], - "data": { - "root": null - } -} ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression.snap index 06a53f9909b..bcacc6b82ed 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression.snap @@ -13,11 +13,11 @@ a Result: a SQL: --------------- -.param set @__p_0 'a' +.param set @p 'a' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE instr("d"."Bar", @__p_0) > 0 +WHERE instr("d"."Bar", @p) > 0 --------------- b Result: @@ -35,11 +35,11 @@ b Result: b SQL: --------------- -.param set @__p_0 'b' +.param set @p 'b' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE instr("d"."Bar", @__p_0) > 0 +WHERE instr("d"."Bar", @p) > 0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression_NET8_0_NET9_0.snap similarity index 89% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression_NET8_0_NET9_0.snap index bcacc6b82ed..06a53f9909b 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringContains_Expression_NET8_0_NET9_0.snap @@ -13,11 +13,11 @@ a Result: a SQL: --------------- -.param set @p 'a' +.param set @__p_0 'a' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE instr("d"."Bar", @p) > 0 +WHERE instr("d"."Bar", @__p_0) > 0 --------------- b Result: @@ -35,11 +35,11 @@ b Result: b SQL: --------------- -.param set @p 'b' +.param set @__p_0 'b' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE instr("d"."Bar", @p) > 0 +WHERE instr("d"."Bar", @__p_0) > 0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression_NET9_0.snap deleted file mode 100644 index bdf5a199f37..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEndsWith_Expression_NET9_0.snap +++ /dev/null @@ -1,71 +0,0 @@ -atest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - } - ] - } -} ---------------- - -atest SQL: ---------------- -.param set @__p_0_endswith '%atest' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" LIKE @__p_0_endswith ESCAPE '\' ---------------- - -btest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - } - ] - } -} ---------------- - -btest SQL: ---------------- -.param set @__p_0_endswith '%btest' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" LIKE @__p_0_endswith ESCAPE '\' ---------------- - -null ---------------- -{ - "errors": [ - { - "message": "The provided value for filter `endsWith` of type StringOperationFilterInput is invalid. Null values are not supported.", - "locations": [ - { - "line": 1, - "column": 34 - } - ], - "path": [ - "root" - ], - "extensions": { - "code": "HC0026", - "expectedType": "String!", - "filterType": "StringOperationFilterInput" - } - } - ], - "data": { - "root": null - } -} ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression.snap index d7944d2311b..30a4100fe0e 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression.snap @@ -13,11 +13,11 @@ testatest Result: testatest SQL: --------------- -.param set @__p_0 'testatest' +.param set @p 'testatest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @__p_0 +WHERE "d"."Bar" = @p --------------- testbtest Result: @@ -35,11 +35,11 @@ testbtest Result: testbtest SQL: --------------- -.param set @__p_0 'testbtest' +.param set @p 'testbtest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @__p_0 +WHERE "d"."Bar" = @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression_NET8_0_NET9_0.snap similarity index 89% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression_NET8_0_NET9_0.snap index 30a4100fe0e..d7944d2311b 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringEqual_Expression_NET8_0_NET9_0.snap @@ -13,11 +13,11 @@ testatest Result: testatest SQL: --------------- -.param set @p 'testatest' +.param set @__p_0 'testatest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @p +WHERE "d"."Bar" = @__p_0 --------------- testbtest Result: @@ -35,11 +35,11 @@ testbtest Result: testbtest SQL: --------------- -.param set @p 'testbtest' +.param set @__p_0 'testbtest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @p +WHERE "d"."Bar" = @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression.snap index ea83f18bfb9..82855f7cd00 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression.snap @@ -16,14 +16,12 @@ testatestAndtestb Result: testatestAndtestb SQL: --------------- -.param set @__p_0 '["testatest","testbtest"]' +.param set @p1 'testatest' +.param set @p2 'testbtest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."Bar" IN (@p1, @p2) --------------- testbtestAndNull @@ -69,12 +67,9 @@ testatest Result: testatest SQL: --------------- -.param set @__p_0 '["testatest"]' +.param set @p1 'testatest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) +WHERE "d"."Bar" = @p1 --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET8_0_NET9_0.snap similarity index 81% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET8_0_NET9_0.snap index 82855f7cd00..ea83f18bfb9 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET8_0_NET9_0.snap @@ -16,12 +16,14 @@ testatestAndtestb Result: testatestAndtestb SQL: --------------- -.param set @p1 'testatest' -.param set @p2 'testbtest' +.param set @__p_0 '["testatest","testbtest"]' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IN (@p1, @p2) +WHERE "d"."Bar" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- testbtestAndNull @@ -67,9 +69,12 @@ testatest Result: testatest SQL: --------------- -.param set @p1 'testatest' +.param set @__p_0 '["testatest"]' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = @p1 +WHERE "d"."Bar" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNoContains_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNoContains_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNoContains_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNoContains_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression_NET9_0.snap deleted file mode 100644 index d9d444861dd..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEndsWith_Expression_NET9_0.snap +++ /dev/null @@ -1,71 +0,0 @@ -atest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - } - ] - } -} ---------------- - -atest SQL: ---------------- -.param set @__p_0_endswith '%atest' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" NOT LIKE @__p_0_endswith ESCAPE '\' ---------------- - -btest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - } - ] - } -} ---------------- - -btest SQL: ---------------- -.param set @__p_0_endswith '%btest' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" NOT LIKE @__p_0_endswith ESCAPE '\' ---------------- - -null ---------------- -{ - "errors": [ - { - "message": "The provided value for filter `nendsWith` of type StringOperationFilterInput is invalid. Null values are not supported.", - "locations": [ - { - "line": 1, - "column": 35 - } - ], - "path": [ - "root" - ], - "extensions": { - "code": "HC0026", - "expectedType": "String!", - "filterType": "StringOperationFilterInput" - } - } - ], - "data": { - "root": null - } -} ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression.snap index c7eb9403233..546ed5e6b5f 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression.snap @@ -13,11 +13,11 @@ testatest Result: testatest SQL: --------------- -.param set @__p_0 'testatest' +.param set @p 'testatest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @__p_0 +WHERE "d"."Bar" <> @p --------------- testbtest Result: @@ -35,11 +35,11 @@ testbtest Result: testbtest SQL: --------------- -.param set @__p_0 'testbtest' +.param set @p 'testbtest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @__p_0 +WHERE "d"."Bar" <> @p --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression_NET8_0_NET9_0.snap similarity index 89% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression_NET8_0_NET9_0.snap index 546ed5e6b5f..c7eb9403233 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression_NET10_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotEqual_Expression_NET8_0_NET9_0.snap @@ -13,11 +13,11 @@ testatest Result: testatest SQL: --------------- -.param set @p 'testatest' +.param set @__p_0 'testatest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @p +WHERE "d"."Bar" <> @__p_0 --------------- testbtest Result: @@ -35,11 +35,11 @@ testbtest Result: testbtest SQL: --------------- -.param set @p 'testbtest' +.param set @__p_0 'testbtest' SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> @p +WHERE "d"."Bar" <> @__p_0 --------------- null diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET9_0.snap deleted file mode 100644 index 43523d406a8..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET9_0.snap +++ /dev/null @@ -1,73 +0,0 @@ -testatestAndtestb Result: ---------------- -{ - "data": { - "root": [] - } -} ---------------- - -testatestAndtestb SQL: ---------------- -.param set @__p_0 '["testatest","testbtest"]' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) ---------------- - -testbtestAndNull ---------------- -{ - "errors": [ - { - "message": "The provided value for filter `nin` of type StringOperationFilterInput is invalid. Null values are not supported.", - "locations": [ - { - "line": 1, - "column": 29 - } - ], - "path": [ - "root" - ], - "extensions": { - "code": "HC0026", - "expectedType": "[String!]", - "filterType": "StringOperationFilterInput" - } - } - ], - "data": { - "root": null - } -} ---------------- - -testatest Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - } - ] - } -} ---------------- - -testatest SQL: ---------------- -.param set @__p_0 '["testatest"]' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" NOT IN ( - SELECT "p"."value" - FROM json_each(@__p_0) AS "p" -) ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression_NET9_0.snap deleted file mode 100644 index 058fd6ff261..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotStartsWith_Expression_NET9_0.snap +++ /dev/null @@ -1,71 +0,0 @@ -testa Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - } - ] - } -} ---------------- - -testa SQL: ---------------- -.param set @__p_0_startswith 'testa%' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" NOT LIKE @__p_0_startswith ESCAPE '\' ---------------- - -testb Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - } - ] - } -} ---------------- - -testb SQL: ---------------- -.param set @__p_0_startswith 'testb%' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" NOT LIKE @__p_0_startswith ESCAPE '\' ---------------- - -null ---------------- -{ - "errors": [ - { - "message": "The provided value for filter `nstartsWith` of type StringOperationFilterInput is invalid. Null values are not supported.", - "locations": [ - { - "line": 1, - "column": 37 - } - ], - "path": [ - "root" - ], - "extensions": { - "code": "HC0026", - "expectedType": "String!", - "filterType": "StringOperationFilterInput" - } - } - ], - "data": { - "root": null - } -} ---------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression_NET10_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression_NET8_0_NET9_0.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression_NET8_0.snap rename to src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression_NET8_0_NET9_0.snap diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression_NET9_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression_NET9_0.snap deleted file mode 100644 index 3a8dc9fdd38..00000000000 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringStartsWith_Expression_NET9_0.snap +++ /dev/null @@ -1,71 +0,0 @@ -testa Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testatest" - } - ] - } -} ---------------- - -testa SQL: ---------------- -.param set @__p_0_startswith 'testa%' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" LIKE @__p_0_startswith ESCAPE '\' ---------------- - -testb Result: ---------------- -{ - "data": { - "root": [ - { - "bar": "testbtest" - } - ] - } -} ---------------- - -testb SQL: ---------------- -.param set @__p_0_startswith 'testb%' - -SELECT "d"."Id", "d"."Bar" -FROM "Data" AS "d" -WHERE "d"."Bar" LIKE @__p_0_startswith ESCAPE '\' ---------------- - -null ---------------- -{ - "errors": [ - { - "message": "The provided value for filter `startsWith` of type StringOperationFilterInput is invalid. Null values are not supported.", - "locations": [ - { - "line": 1, - "column": 36 - } - ], - "path": [ - "root" - ], - "extensions": { - "code": "HC0026", - "expectedType": "String!", - "filterType": "StringOperationFilterInput" - } - } - ], - "data": { - "root": null - } -} ---------------- diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/DataLoaderTests.cs b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/DataLoaderTests.cs index 310e3a6cf75..6d5d1f8af4d 100644 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/DataLoaderTests.cs +++ b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/DataLoaderTests.cs @@ -7,6 +7,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Squadron; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data; @@ -36,7 +37,7 @@ public async Task Include_On_List_Results() // assert Assert.Equal(10, products.Count); - interceptor.MatchSnapshot(); + interceptor.MatchSnapshot(Postfix([NET8_0, NET9_0])); } [Fact] @@ -62,7 +63,7 @@ public async Task Include_On_Array_Results() // assert Assert.Equal(10, products.Length); - interceptor.MatchSnapshot(); + interceptor.MatchSnapshot(Postfix([NET8_0, NET9_0])); } [Fact] @@ -89,7 +90,7 @@ public async Task Include_On_Page_Results() // assert Assert.Equal(5, products.Count); - interceptor.MatchSnapshot(); + interceptor.MatchSnapshot(Postfix([NET8_0], [NET9_0])); } private ServiceProvider CreateServer() @@ -125,9 +126,10 @@ private ServiceProvider CreateServer() file static class Extensions { public static void MatchSnapshot( - this TestQueryInterceptor queryInterceptor) + this TestQueryInterceptor queryInterceptor, + string? postfix) { - var snapshot = Snapshot.Create(postFix: TestEnvironment.TargetFramework); + var snapshot = Snapshot.Create(postfix); for (var i = 0; i < queryInterceptor.Queries.Count; i++) { diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/IgnoredObjectFieldIntegrationTests.cs b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/IgnoredObjectFieldIntegrationTests.cs index 99d0d9c2081..744f3f15090 100644 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/IgnoredObjectFieldIntegrationTests.cs +++ b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/IgnoredObjectFieldIntegrationTests.cs @@ -10,6 +10,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Squadron; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data; @@ -64,7 +65,7 @@ public async Task Sort_Query_Should_Work_When_ObjectType_Ignores_Field() interceptor.Queries, query => query.Contains("\"Name\"", StringComparison.Ordinal)); - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -115,7 +116,7 @@ public async Task Filter_Query_Should_Work_When_ObjectType_Ignores_Field() interceptor.Queries, query => query.Contains("\"Name\"", StringComparison.Ordinal)); - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0], [NET10_0])); } private static ServiceProvider CreateServer(string connectionString) @@ -146,9 +147,10 @@ private static ServiceProvider CreateServer(string connectionString) private static void MatchSnapshot( IExecutionResult result, - TestQueryInterceptor queryInterceptor) + TestQueryInterceptor queryInterceptor, + string? postfix) { - var snapshot = Snapshot.Create(postFix: TestEnvironment.TargetFramework); + var snapshot = Snapshot.Create(postfix); snapshot.Add(result.ToJson(), "Result", MarkdownLanguages.Json); diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/IntegrationTests.cs b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/IntegrationTests.cs index fb1761a4dec..a9c50e3f910 100644 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/IntegrationTests.cs +++ b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/IntegrationTests.cs @@ -15,6 +15,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Text.RegularExpressions; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data; @@ -52,7 +53,7 @@ public async Task Query_Brands() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -75,7 +76,7 @@ public async Task Query_Brands_First_2() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -104,7 +105,7 @@ public async Task Query_Brands_First_2_And_Products_First_2() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0], [NET9_0])); } [Fact] @@ -128,7 +129,7 @@ public async Task Query_Brands_With_BatchResolver_ProductCount() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -155,7 +156,7 @@ public async Task Query_Brands_With_BatchResolver_Supplier() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -184,7 +185,7 @@ public async Task Query_Brands_First_2_And_Products_First_2_Name_Desc() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0], [NET9_0])); } [Fact] @@ -215,7 +216,7 @@ public async Task Query_Brands_First_2_And_Products_First_2_Name_Desc_Brand_Name """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0], [NET9_0])); } [Fact] @@ -238,7 +239,7 @@ ... on Product { """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -261,7 +262,7 @@ ... on Brand { """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -286,7 +287,7 @@ public async Task Query_Products_First_2_And_Brand() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -309,7 +310,7 @@ public async Task Project_Into_1to1_Relation() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0], [NET9_0])); } [Fact] @@ -336,7 +337,7 @@ public async Task Query_Products_First_2_With_4_EndCursors() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0], [NET9_0])); } [Fact] @@ -363,7 +364,7 @@ public async Task Query_Products_First_2_With_4_EndCursors_Skip_4() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0], [NET10_0])); } [Fact] @@ -393,7 +394,7 @@ public async Task Query_Brands_First_2_Products_First_2_ForwardCursors() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0], [NET9_0])); } [Fact] @@ -419,7 +420,7 @@ public async Task Verify_That_PageInfo_Flag_Is_Correctly_Inferred() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -443,7 +444,7 @@ public async Task Query_Products_Include_TotalCount() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0], [NET9_0])); } [Fact] @@ -466,7 +467,7 @@ public async Task Query_Products_Exclude_TotalCount() """); // assert - MatchSnapshot(result, interceptor); + MatchSnapshot(result, interceptor, Postfix([NET8_0, NET9_0])); } [Fact] @@ -778,9 +779,10 @@ private async Task ExecuteAsync(string sourceText) private static void MatchSnapshot( IExecutionResult result, - TestQueryInterceptor queryInterceptor) + TestQueryInterceptor queryInterceptor, + string? postfix = null) { - var snapshot = Snapshot.Create(postFix: TestEnvironment.TargetFramework); + var snapshot = Snapshot.Create(postfix); var queries = NormalizeBrandLookupBatching(queryInterceptor.Queries); snapshot.Add(result.ToJson(), "Result", MarkdownLanguages.Json); diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results_NET9_0.md deleted file mode 100644 index 33964c97293..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Array_Results_NET9_0.md +++ /dev/null @@ -1,9 +0,0 @@ -# Include_On_Array_Results - -```sql --- @__brandIds_0={ '1' } (DbType = Object) -SELECT p."BrandId", p."Name", p."Price" -FROM "Products" AS p -WHERE p."BrandId" = ANY (@__brandIds_0) -ORDER BY p."BrandId" -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results_NET9_0.md deleted file mode 100644 index fbdb8d3c7c6..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_List_Results_NET9_0.md +++ /dev/null @@ -1,9 +0,0 @@ -# Include_On_List_Results - -```sql --- @__brandIds_0={ '1' } (DbType = Object) -SELECT p."BrandId", p."Name", p."Price" -FROM "Products" AS p -WHERE p."BrandId" = ANY (@__brandIds_0) -ORDER BY p."BrandId" -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Page_Results_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Page_Results.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Page_Results_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/DataLoaderTests.Include_On_Page_Results.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field.md similarity index 81% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field_NET9_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field.md index 13e30f21485..5fbd9e2e6a6 100644 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field_NET9_0.md +++ b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field.md @@ -19,11 +19,11 @@ ## Query 1 ```sql --- @__p_0='1' --- @__p_1='11' +-- @p='1' +-- @p1='11' SELECT p."Id" FROM "ProductTypes" AS p -WHERE p."Id" = @__p_0 +WHERE p."Id" = @p ORDER BY p."Id" -LIMIT @__p_1 +LIMIT @p1 ``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Filter_Query_Should_Work_When_ObjectType_Ignores_Field_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field_NET9_0.md deleted file mode 100644 index 20e3d3ae6f7..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IgnoredObjectFieldIntegrationTests.Sort_Query_Should_Work_When_ObjectType_Ignores_Field_NET9_0.md +++ /dev/null @@ -1,48 +0,0 @@ -# Sort_Query_Should_Work_When_ObjectType_Ignores_Field - -## Result - -```json -{ - "data": { - "hiddenNameProductTypes": { - "nodes": [ - { - "id": 8 - }, - { - "id": 7 - }, - { - "id": 6 - }, - { - "id": 5 - }, - { - "id": 4 - }, - { - "id": 3 - }, - { - "id": 2 - }, - { - "id": 1 - } - ] - } - } -} -``` - -## Query 1 - -```sql --- @__p_0='11' -SELECT p."Id" -FROM "ProductTypes" AS p -ORDER BY p."Id" DESC -LIMIT @__p_0 -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored_NET8_0.md deleted file mode 100644 index 3ff19837d04..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored_NET8_0.md +++ /dev/null @@ -1,25 +0,0 @@ -# Ensure_That_Self_Requirement_Is_Honored - -## Result - -```json -{ - "data": { - "singleProperties": [ - { - "id": "0" - }, - { - "id": "1" - } - ] - } -} -``` - -## Query 1 - -```sql -SELECT s."Id" -FROM "SingleProperties" AS s -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored_NET9_0.md deleted file mode 100644 index 3ff19837d04..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Ensure_That_Self_Requirement_Is_Honored_NET9_0.md +++ /dev/null @@ -1,25 +0,0 @@ -# Ensure_That_Self_Requirement_Is_Honored - -## Result - -```json -{ - "data": { - "singleProperties": [ - { - "id": "0" - }, - { - "id": "1" - } - ] - } -} -``` - -## Query 1 - -```sql -SELECT s."Id" -FROM "SingleProperties" AS s -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable_NET8_0.md deleted file mode 100644 index 85428680828..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable_NET8_0.md +++ /dev/null @@ -1,25 +0,0 @@ -# Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable - -## Result - -```json -{ - "data": { - "singleProperties": [ - { - "__typename": "SingleProperty" - }, - { - "__typename": "SingleProperty" - } - ] - } -} -``` - -## Query 1 - -```sql -SELECT s."Id" -FROM "SingleProperties" AS s -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable_NET9_0.md deleted file mode 100644 index 85428680828..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable_NET9_0.md +++ /dev/null @@ -1,25 +0,0 @@ -# Fallback_To_Runtime_Properties_When_No_Field_Is_Bindable - -## Result - -```json -{ - "data": { - "singleProperties": [ - { - "__typename": "SingleProperty" - }, - { - "__typename": "SingleProperty" - } - ] - } -} -``` - -## Query 1 - -```sql -SELECT s."Id" -FROM "SingleProperties" AS s -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Project_Into_1to1_Relation_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Project_Into_1to1_Relation.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Project_Into_1to1_Relation_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Project_Into_1to1_Relation.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_Name_Desc_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_Name_Desc.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_Name_Desc_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_Name_Desc.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_Name_Desc_Brand_Name_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_Name_Desc_Brand_Name.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_Name_Desc_Brand_Name_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_And_Products_First_2_Name_Desc_Brand_Name.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_NET9_0.md deleted file mode 100644 index 44733b6d02d..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_NET9_0.md +++ /dev/null @@ -1,32 +0,0 @@ -# Query_Brands_First_2 - -## Result - -```json -{ - "data": { - "brands": { - "nodes": [ - { - "id": "QnJhbmQ6MTE=", - "name": "Zephyr" - }, - { - "id": "QnJhbmQ6MTM=", - "name": "XE" - } - ] - } - } -} -``` - -## Query 1 - -```sql --- @__p_0='3' -SELECT b."Id", b."Name" -FROM "Brands" AS b -ORDER BY b."Name" DESC, b."Id" -LIMIT @__p_0 -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_Products_First_2_ForwardCursors_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_Products_First_2_ForwardCursors.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_Products_First_2_ForwardCursors_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_First_2_Products_First_2_ForwardCursors.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_NET9_0.md deleted file mode 100644 index f24407fb81c..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_NET9_0.md +++ /dev/null @@ -1,64 +0,0 @@ -# Query_Brands - -## Result - -```json -{ - "data": { - "brands": { - "nodes": [ - { - "id": "QnJhbmQ6MTE=", - "name": "Zephyr" - }, - { - "id": "QnJhbmQ6MTM=", - "name": "XE" - }, - { - "id": "QnJhbmQ6Mw==", - "name": "WildRunner" - }, - { - "id": "QnJhbmQ6Nw==", - "name": "Solstix" - }, - { - "id": "QnJhbmQ6Ng==", - "name": "Raptor Elite" - }, - { - "id": "QnJhbmQ6NA==", - "name": "Quester" - }, - { - "id": "QnJhbmQ6MTI=", - "name": "Legend" - }, - { - "id": "QnJhbmQ6OA==", - "name": "Grolltex" - }, - { - "id": "QnJhbmQ6MTA=", - "name": "Green Equipment" - }, - { - "id": "QnJhbmQ6Mg==", - "name": "Gravitator" - } - ] - } - } -} -``` - -## Query 1 - -```sql --- @__p_0='11' -SELECT b."Id", b."Name" -FROM "Brands" AS b -ORDER BY b."Name" DESC, b."Id" -LIMIT @__p_0 -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount_NET9_0.md deleted file mode 100644 index 53d792e90cb..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_ProductCount_NET9_0.md +++ /dev/null @@ -1,49 +0,0 @@ -# Query_Brands_With_BatchResolver_ProductCount - -## Result - -```json -{ - "data": { - "brands": { - "nodes": [ - { - "id": "QnJhbmQ6MTE=", - "name": "Zephyr", - "productCount": 6 - }, - { - "id": "QnJhbmQ6MTM=", - "name": "XE", - "productCount": 3 - }, - { - "id": "QnJhbmQ6Mw==", - "name": "WildRunner", - "productCount": 11 - }, - { - "id": "QnJhbmQ6Nw==", - "name": "Solstix", - "productCount": 9 - }, - { - "id": "QnJhbmQ6Ng==", - "name": "Raptor Elite", - "productCount": 11 - } - ] - } - } -} -``` - -## Query 1 - -```sql --- @__p_0='6' -SELECT b."Id", b."Name" -FROM "Brands" AS b -ORDER BY b."Name" DESC, b."Id" -LIMIT @__p_0 -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier_NET9_0.md deleted file mode 100644 index 4322c3e7471..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Brands_With_BatchResolver_Supplier_NET9_0.md +++ /dev/null @@ -1,73 +0,0 @@ -# Query_Brands_With_BatchResolver_Supplier - -## Result - -```json -{ - "data": { - "brands": { - "nodes": [ - { - "id": "QnJhbmQ6MTE=", - "name": "Zephyr", - "supplier": { - "name": "Prime Distribution", - "website": "https://primedist.example.com" - } - }, - { - "id": "QnJhbmQ6MTM=", - "name": "XE", - "supplier": { - "name": "Global Supply Co.", - "website": "https://globalsupply.example.com" - } - }, - { - "id": "QnJhbmQ6Mw==", - "name": "WildRunner", - "supplier": { - "name": "Atlas Logistics", - "website": "https://atlaslogistics.example.com" - } - }, - { - "id": "QnJhbmQ6Nw==", - "name": "Solstix", - "supplier": { - "name": "Global Supply Co.", - "website": "https://globalsupply.example.com" - } - }, - { - "id": "QnJhbmQ6Ng==", - "name": "Raptor Elite", - "supplier": { - "name": "Atlas Logistics", - "website": "https://atlaslogistics.example.com" - } - } - ] - } - } -} -``` - -## Query 1 - -```sql --- @__p_0='6' -SELECT b."Id", b."Name", b."SupplierId" -FROM "Brands" AS b -ORDER BY b."Name" DESC, b."Id" -LIMIT @__p_0 -``` - -## Query 2 - -```sql --- @__supplierIds_0={ '2', '1', '3' } (DbType = Object) -SELECT s."Name", s."Website", s."Id" -FROM "Suppliers" AS s -WHERE s."Id" = ANY (@__supplierIds_0) -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand_NET9_0.md deleted file mode 100644 index 3c300eba1ee..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Brand_NET9_0.md +++ /dev/null @@ -1,23 +0,0 @@ -# Query_Node_Brand - -## Result - -```json -{ - "data": { - "brand": { - "id": "QnJhbmQ6MQ==", - "name": "Daybird" - } - } -} -``` - -## Query 1 - -```sql --- @__ids_0={ '1' } (DbType = Object) -SELECT b."Id", b."Name" -FROM "Brands" AS b -WHERE b."Id" = ANY (@__ids_0) -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product_NET9_0.md deleted file mode 100644 index 5f94ffcf937..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Node_Product_NET9_0.md +++ /dev/null @@ -1,23 +0,0 @@ -# Query_Node_Product - -## Result - -```json -{ - "data": { - "product": { - "id": "UHJvZHVjdDox", - "name": "Wanderer Black Hiking Boots" - } - } -} -``` - -## Query 1 - -```sql --- @__ids_0={ '1' } (DbType = Object) -SELECT p."Id", p."Name" -FROM "Products" AS p -WHERE p."Id" = ANY (@__ids_0) -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount_NET9_0.md deleted file mode 100644 index 76e5fc5da00..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Exclude_TotalCount_NET9_0.md +++ /dev/null @@ -1,30 +0,0 @@ -# Query_Products_Exclude_TotalCount - -## Result - -```json -{ - "data": { - "productsNonRelative": { - "nodes": [ - { - "name": "Zero Gravity Ski Goggles" - }, - { - "name": "Zenith Cycling Jersey" - } - ] - } - } -} -``` - -## Query 1 - -```sql --- @__p_0='3' -SELECT p."Name", p."Id" -FROM "Products" AS p -ORDER BY p."Name" DESC, p."Id" -LIMIT @__p_0 -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand_NET9_0.md deleted file mode 100644 index dccfbcbc0b5..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_And_Brand_NET9_0.md +++ /dev/null @@ -1,45 +0,0 @@ -# Query_Products_First_2_And_Brand - -## Result - -```json -{ - "data": { - "products": { - "nodes": [ - { - "name": "Zero Gravity Ski Goggles", - "brand": { - "name": "Gravitator" - } - }, - { - "name": "Zenith Cycling Jersey", - "brand": { - "name": "B&R" - } - } - ] - } - } -} -``` - -## Query 1 - -```sql --- @__p_0='3' -SELECT p."BrandId", p."Name", p."Id" -FROM "Products" AS p -ORDER BY p."Name" DESC, p."Id" -LIMIT @__p_0 -``` - -## Query 2 - -```sql --- @__ids_0={ '2', '5' } (DbType = Object) -SELECT b."Name", b."Id" -FROM "Brands" AS b -WHERE b."Id" = ANY (@__ids_0) -``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4.md similarity index 76% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4_NET9_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4.md index e3eccc3ae77..19a8dd74d70 100644 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4_NET9_0.md +++ b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4.md @@ -34,22 +34,22 @@ ## Query 1 ```sql --- @__value_0='Zenith Cycling Jersey' --- @__value_1='46' --- @__p_3='3' --- @__p_2='6' +-- @value='Zenith Cycling Jersey' +-- @value2='46' +-- @p4='3' +-- @p='6' SELECT p."BrandId", p."Name", p."Id" FROM "Products" AS p -WHERE p."Name" < @__value_0 OR (p."Name" = @__value_0 AND p."Id" > @__value_1) +WHERE p."Name" < @value OR (p."Name" = @value AND p."Id" > @value2) ORDER BY p."Name" DESC, p."Id" -LIMIT @__p_3 OFFSET @__p_2 +LIMIT @p4 OFFSET @p ``` ## Query 2 ```sql --- @__ids_0={ '6' } (DbType = Object) +-- @ids={ '6' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__ids_0) +WHERE b."Id" = ANY (@ids) ``` diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_First_2_With_4_EndCursors_Skip_4_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Include_TotalCount_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Include_TotalCount.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Include_TotalCount_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Query_Products_Include_TotalCount.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred_NET10_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred_NET10_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred_NET8_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred_NET8_0_NET9_0.md similarity index 100% rename from src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred_NET8_0.md rename to src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred_NET8_0_NET9_0.md diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred_NET9_0.md b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred_NET9_0.md deleted file mode 100644 index eb7778f6850..00000000000 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/__snapshots__/IntegrationTests.Verify_That_PageInfo_Flag_Is_Correctly_Inferred_NET9_0.md +++ /dev/null @@ -1,31 +0,0 @@ -# Verify_That_PageInfo_Flag_Is_Correctly_Inferred - -## Result - -```json -{ - "data": { - "brands": { - "nodes": [ - { - "products": { - "pageInfo": { - "endCursor": null - } - } - } - ] - } - } -} -``` - -## Query 1 - -```sql --- @__p_0='2' -SELECT b."Id", b."Name" -FROM "Brands" AS b -ORDER BY b."Name" DESC, b."Id" -LIMIT @__p_0 -``` diff --git a/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/QueryableProjectionFilterTests.cs b/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/QueryableProjectionFilterTests.cs index 9d18e463aca..63bf2d9a60f 100644 --- a/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/QueryableProjectionFilterTests.cs +++ b/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/QueryableProjectionFilterTests.cs @@ -1,5 +1,6 @@ using HotChocolate.Execution; using Microsoft.EntityFrameworkCore; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data.Projections; @@ -137,7 +138,7 @@ public async Task Create_DeepFilterObjectTwoProjections() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1) .MatchAsync(); } @@ -179,7 +180,7 @@ public async Task Create_ListObjectDifferentLevelProjection() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1) .MatchAsync(); } @@ -220,7 +221,7 @@ public async Task Create_DeepFilterObjectTwoProjections_Nullable() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1) .MatchAsync(); } @@ -262,7 +263,7 @@ public async Task Create_ListObjectDifferentLevelProjection_Nullable() // assert await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddResult(res1) .MatchAsync(); } diff --git a/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_DeepFilterObjectTwoProjections_NET10_0.snap b/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_DeepFilterObjectTwoProjections.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_DeepFilterObjectTwoProjections_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_DeepFilterObjectTwoProjections.snap diff --git a/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_DeepFilterObjectTwoProjections_Nullable_NET10_0.snap b/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_DeepFilterObjectTwoProjections_Nullable.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_DeepFilterObjectTwoProjections_Nullable_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_DeepFilterObjectTwoProjections_Nullable.snap diff --git a/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_ListObjectDifferentLevelProjection_NET10_0.snap b/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_ListObjectDifferentLevelProjection.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_ListObjectDifferentLevelProjection_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_ListObjectDifferentLevelProjection.snap diff --git a/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_ListObjectDifferentLevelProjection_Nullable_NET10_0.snap b/src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_ListObjectDifferentLevelProjection_Nullable.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_ListObjectDifferentLevelProjection_Nullable_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Projections.SqlServer.Tests/__snapshots__/QueryableProjectionFilterTests.Create_ListObjectDifferentLevelProjection_Nullable.snap diff --git a/src/HotChocolate/Data/test/Data.Tests/ExecutableTests.cs b/src/HotChocolate/Data/test/Data.Tests/ExecutableTests.cs index b81f0e87dc5..8ed4b3c8c54 100644 --- a/src/HotChocolate/Data/test/Data.Tests/ExecutableTests.cs +++ b/src/HotChocolate/Data/test/Data.Tests/ExecutableTests.cs @@ -1,3 +1,5 @@ +using static CookieCrumble.TestEnvironment; + namespace HotChocolate.Data; public class ExecutableTests(AuthorFixture authorFixture) : IClassFixture @@ -55,7 +57,7 @@ public async Task ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault() // assert new { result, executable = executable.Print() } - .MatchSnapshot(postFix: TestEnvironment.TargetFramework); + .MatchSnapshot(Postfix([NET8_0])); } [Fact] diff --git a/src/HotChocolate/Data/test/Data.Tests/InterfaceIntegrationTests.cs b/src/HotChocolate/Data/test/Data.Tests/InterfaceIntegrationTests.cs index f9cb5802e37..2838c27dc8d 100644 --- a/src/HotChocolate/Data/test/Data.Tests/InterfaceIntegrationTests.cs +++ b/src/HotChocolate/Data/test/Data.Tests/InterfaceIntegrationTests.cs @@ -10,6 +10,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Squadron; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data; @@ -66,7 +67,7 @@ public async Task Query_Owner_Animals() operationResult.Extensions = []; await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddQueries(queries) .Add(operationResult) .MatchMarkdownAsync(); @@ -119,7 +120,7 @@ public async Task Query_Owner_Animals_With_TotalCount() operationResult.Extensions = []; await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddQueries(queries) .Add(operationResult) .MatchMarkdownAsync(); @@ -176,7 +177,7 @@ ... on Cat { operationResult.Extensions = []; await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddQueries(queries) .Add(operationResult) .MatchMarkdownAsync(); @@ -220,10 +221,7 @@ public async Task Query_Pets() operationResult.Extensions = []; await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add(operationResult) .MatchMarkdownAsync(); diff --git a/src/HotChocolate/Data/test/Data.Tests/PagingHelperIntegrationTests.cs b/src/HotChocolate/Data/test/Data.Tests/PagingHelperIntegrationTests.cs index c5d9b01f0ee..2b64d527e2a 100644 --- a/src/HotChocolate/Data/test/Data.Tests/PagingHelperIntegrationTests.cs +++ b/src/HotChocolate/Data/test/Data.Tests/PagingHelperIntegrationTests.cs @@ -10,6 +10,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Squadron; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data; @@ -59,10 +60,7 @@ public async Task GetDefaultPage() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add(result, "Result") .MatchMarkdownAsync(); @@ -106,10 +104,7 @@ public async Task GetDefaultPage2() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add(result, "Result") .MatchMarkdownAsync(); @@ -153,10 +148,7 @@ public async Task GetSecondPage_With_2_Items() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0], [NET10_0])) .AddQueries(queries) .Add(result, "Result") .MatchMarkdownAsync(); @@ -209,10 +201,7 @@ public async Task GetDefaultPage_With_Nullable() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add(result, "Result") .MatchMarkdownAsync(); @@ -266,10 +255,7 @@ public async Task GetDefaultPage_With_Nullable_SecondPage() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0], [NET10_0])) .AddQueries(queries) .Add(result, "Result") .MatchMarkdownAsync(); @@ -322,10 +308,7 @@ public async Task GetDefaultPage_With_Nullable_Fallback() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add(result, "Result") .MatchMarkdownAsync(); @@ -379,10 +362,7 @@ public async Task GetDefaultPage_With_Nullable_Fallback_SecondPage() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0], [NET10_0])) .AddQueries(queries) .Add(result, "Result") .MatchMarkdownAsync(); @@ -435,10 +415,7 @@ public async Task GetDefaultPage_With_Deep() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add(result, "Result") .MatchMarkdownAsync(); @@ -491,10 +468,7 @@ public async Task GetDefaultPage_With_Deep_SecondPage() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0], [NET10_0])) .AddQueries(queries) .Add(result, "Result") .MatchMarkdownAsync(); @@ -549,7 +523,7 @@ public async Task Nested_Paging_First_2() operationResult.Extensions = []; await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddQueries(queries) .Add(operationResult) .MatchMarkdownAsync(); @@ -604,7 +578,7 @@ public async Task Nested_Paging_First_2_With_Projections() var operationResult = result.ExpectOperationResult(); await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddQueries(queries) .Add(operationResult, "Result") .MatchMarkdownAsync(); @@ -627,10 +601,7 @@ public async Task Paging_Empty_PagingArgs() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add( new @@ -663,10 +634,7 @@ public async Task Paging_First_5() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add( new @@ -703,10 +671,7 @@ public async Task Paging_First_5_After_Id_13() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0], [NET10_0])) .AddQueries(queries) .Add( new @@ -739,10 +704,7 @@ public async Task Paging_Last_5() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add( new @@ -779,10 +741,7 @@ public async Task Paging_First_5_Before_Id_96() // Assert await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0], [NET10_0])) .AddQueries(queries) .Add( new @@ -987,10 +946,7 @@ public async Task Map_Page_To_Connection_With_Dto() var operationResult = result.ExpectOperationResult(); await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add(operationResult) .MatchMarkdownAsync(); @@ -1036,10 +992,7 @@ public async Task Map_Page_To_Connection_With_Dto_2() var operationResult = result.ExpectOperationResult(); await Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddQueries(queries) .Add(operationResult) .MatchMarkdownAsync(); @@ -1093,7 +1046,7 @@ public async Task Ensure_Nullable_Connections_Dont_Throw() var operationResult = result.ExpectOperationResult(); await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddQueries(queries) .Add(operationResult, "Result") .MatchMarkdownAsync(); @@ -1149,7 +1102,7 @@ public async Task Ensure_Nullable_Connections_Dont_Throw_2() var operationResult = result.ExpectOperationResult(); await Snapshot - .Create(postFix: TestEnvironment.TargetFramework) + .Create(Postfix([NET8_0], [NET9_0])) .AddQueries(queries) .Add(operationResult, "Result") .MatchMarkdownAsync(); diff --git a/src/HotChocolate/Data/test/Data.Tests/ProjectableDataLoaderTests.cs b/src/HotChocolate/Data/test/Data.Tests/ProjectableDataLoaderTests.cs index ce301a9d885..40aabe9fe4c 100644 --- a/src/HotChocolate/Data/test/Data.Tests/ProjectableDataLoaderTests.cs +++ b/src/HotChocolate/Data/test/Data.Tests/ProjectableDataLoaderTests.cs @@ -9,6 +9,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Squadron; +using static CookieCrumble.TestEnvironment; namespace HotChocolate.Data; @@ -46,10 +47,7 @@ public async Task Brand_With_Name() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -81,10 +79,7 @@ public async Task Brand_With_Name_Selector_is_Null() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -116,10 +111,7 @@ public async Task Manual_Include_Of_Brand() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -186,10 +178,7 @@ public async Task Do_Not_Project() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -224,10 +213,7 @@ public async Task Project_And_Do_Not_Project() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -262,10 +248,7 @@ public async Task Product_With_Name_And_Brand_With_Name() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -306,10 +289,7 @@ public async Task Force_A_Branch() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -350,10 +330,7 @@ public async Task Branches_Are_Merged() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -390,10 +367,7 @@ public async Task Brand_Details_Country_Name() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -431,10 +405,7 @@ public async Task Brand_Details_Country_Name_With_Details_As_Custom_Resolver() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -467,10 +438,7 @@ public async Task Brand_Details_Requires_Brand_Name() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -503,10 +471,7 @@ public async Task Brand_Details_Requires_Brand_Name_With_Proper_Type() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -539,10 +504,7 @@ public async Task Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explic """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -576,10 +538,7 @@ public async Task Brand_Details_Requires_Brand_Name_2() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -615,10 +574,7 @@ public async Task Brand_Products_TypeName() // Brand.Products is getter-only and cannot be assigned by AsSelector, // so products will be empty and the selector falls back to brand.Id. Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -651,10 +607,7 @@ public async Task Brand_Only_TypeName() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -690,10 +643,7 @@ ... on Brand { """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -728,10 +678,7 @@ ... on Brand { """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -764,10 +711,7 @@ public async Task Brand_With_Default_Field_Over_Node() """); Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .AddResult(result) .MatchMarkdownSnapshot(); @@ -799,10 +743,7 @@ public async Task Project_Key_To_Collection_Expression() // Assert Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .MatchMarkdownSnapshot(); } @@ -834,10 +775,7 @@ public async Task Project_Key_To_Collection_Expression_Integration() """); // Assert Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .Add(result, "Result") .MatchMarkdownSnapshot(); @@ -871,10 +809,7 @@ public async Task Product_With_Nullable_Reference_Property_Set_To_Null() // Assert Snapshot - .Create( - postFix: TestEnvironment.TargetFramework == "NET10_0" - ? TestEnvironment.TargetFramework - : null) + .Create(Postfix([NET8_0, NET9_0])) .AddSql(queries) .Add(result, "Result") .MatchMarkdownSnapshot(); diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET10_0.snap b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault.snap similarity index 100% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET10_0.snap rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault.snap diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET9_0.snap b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET9_0.snap deleted file mode 100644 index be38bb5dff6..00000000000 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ExecutableTests.ExecuteAsync_Should_OnlyOneItem_When_SingleOrDefault_NET9_0.snap +++ /dev/null @@ -1,17 +0,0 @@ -{ - "result": { - "Id": 1, - "Name": "Foo", - "Books": [ - { - "Id": 1, - "AuthorId": 0, - "Title": "Foo1", - "Author": null, - "Publisher": null - } - ], - "Publishers": [] - }, - "executable": "System.Linq.Enumerable+IListSkipTakeIterator`1[HotChocolate.Data.Author]" -} diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals.md similarity index 100% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals.md diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_With_Fragments_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_With_Fragments.md similarity index 100% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_With_Fragments_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_With_Fragments.md diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_With_TotalCount_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_With_TotalCount.md similarity index 100% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_With_TotalCount_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Owner_Animals_With_TotalCount.md diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets.md index a06c0f946d3..1a920c5800d 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='11' +-- @p='11' SELECT p."AnimalType" = 'Dog', p."Id", p."Name", p."AnimalType" = 'Cat' FROM "Pets" AS p ORDER BY p."Name", p."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets_NET8_0_NET9_0.md similarity index 97% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets_NET8_0_NET9_0.md index 1a920c5800d..a06c0f946d3 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/InterfaceIntegrationTests.Query_Pets_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @p='11' +-- @__p_0='11' SELECT p."AnimalType" = 'Dog', p."Id", p."Name", p."AnimalType" = 'Cat' FROM "Pets" AS p ORDER BY p."Name", p."Id" -LIMIT @p +LIMIT @__p_0 ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Ensure_Nullable_Connections_Dont_Throw_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Ensure_Nullable_Connections_Dont_Throw.md similarity index 100% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Ensure_Nullable_Connections_Dont_Throw_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Ensure_Nullable_Connections_Dont_Throw.md diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Ensure_Nullable_Connections_Dont_Throw_2_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Ensure_Nullable_Connections_Dont_Throw_2.md similarity index 100% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Ensure_Nullable_Connections_Dont_Throw_2_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Ensure_Nullable_Connections_Dont_Throw_2.md diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage.md index 4b983c226e5..1d6876a0213 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='11' +-- @p='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2.md index 1e93cb9ce7e..a01b7a90066 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='11' +-- @p='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2_NET8_0_NET9_0.md similarity index 97% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2_NET8_0_NET9_0.md index a01b7a90066..1e93cb9ce7e 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage2_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @p='11' +-- @__p_0='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."Id" -LIMIT @p +LIMIT @__p_0 ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_NET8_0_NET9_0.md similarity index 97% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_NET8_0_NET9_0.md index 1d6876a0213..4b983c226e5 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @p='11' +-- @__p_0='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."Id" -LIMIT @p +LIMIT @__p_0 ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep.md index 8d95e586fe6..fd812bf165f 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='11' +-- @p='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."BrandDetails_Country_Name", b."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_NET8_0_NET9_0.md similarity index 99% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_NET8_0_NET9_0.md index fd812bf165f..8d95e586fe6 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @p='11' +-- @__p_0='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."BrandDetails_Country_Name", b."Id" -LIMIT @p +LIMIT @__p_0 ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_SecondPage.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_SecondPage.md index dbc8d91dc99..ad493e694e9 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_SecondPage.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_SecondPage.md @@ -3,14 +3,14 @@ ## SQL 0 ```sql --- @__value_0='Country1' --- @__value_1='2' --- @__p_2='3' +-- @value='Country1' +-- @value2='2' +-- @p='3' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b -WHERE b."BrandDetails_Country_Name" > @__value_0 OR (b."BrandDetails_Country_Name" = @__value_0 AND b."Id" > @__value_1) +WHERE b."BrandDetails_Country_Name" > @value OR (b."BrandDetails_Country_Name" = @value AND b."Id" > @value2) ORDER BY b."BrandDetails_Country_Name", b."Id" -LIMIT @__p_2 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_SecondPage_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_SecondPage_NET8_0_NET9_0.md new file mode 100644 index 00000000000..dbc8d91dc99 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Deep_SecondPage_NET8_0_NET9_0.md @@ -0,0 +1,67 @@ +# GetDefaultPage_With_Deep_SecondPage + +## SQL 0 + +```sql +-- @__value_0='Country1' +-- @__value_1='2' +-- @__p_2='3' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +WHERE b."BrandDetails_Country_Name" > @__value_0 OR (b."BrandDetails_Country_Name" = @__value_0 AND b."Id" > @__value_1) +ORDER BY b."BrandDetails_Country_Name", b."Id" +LIMIT @__p_2 +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(x => x.BrandDetails.Country.Name).ThenBy(t => t.Id).Where(t => ((t.BrandDetails.Country.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) > 0) OrElse ((t.BrandDetails.Country.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) == 0) AndAlso (t.Id.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.Int32]).value) > 0)))).Take(3) +``` + +## Result + +```json +{ + "data": { + "brandsDeep": { + "edges": [ + { + "cursor": "e31Db3VudHJ5MTA6MTE=" + }, + { + "cursor": "e31Db3VudHJ5MTE6MTI=" + } + ], + "nodes": [ + { + "id": 11, + "name": "Brand:10", + "displayName": "BrandDisplay10", + "brandDetails": { + "country": { + "name": "Country10" + } + } + }, + { + "id": 12, + "name": "Brand:11", + "displayName": null, + "brandDetails": { + "country": { + "name": "Country11" + } + } + } + ], + "pageInfo": { + "hasNextPage": true, + "hasPreviousPage": true, + "startCursor": "e31Db3VudHJ5MTA6MTE=", + "endCursor": "e31Db3VudHJ5MTE6MTI=" + } + } + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable.md index fba164327b3..6bf59e96e87 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='11' +-- @p='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."AlwaysNull", b."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback.md index 71c5d317dd3..88d5e271a23 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='11' +-- @p='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY COALESCE(b."DisplayName", b."Name"), b."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_NET8_0_NET9_0.md similarity index 99% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_NET8_0_NET9_0.md index 88d5e271a23..71c5d317dd3 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @p='11' +-- @__p_0='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY COALESCE(b."DisplayName", b."Name"), b."Id" -LIMIT @p +LIMIT @__p_0 ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_SecondPage.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_SecondPage.md index 8b67613feef..d7caab46842 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_SecondPage.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_SecondPage.md @@ -3,14 +3,14 @@ ## SQL 0 ```sql --- @__value_0='Brand:11' --- @__value_1='12' --- @__p_2='3' +-- @value='Brand:11' +-- @value2='12' +-- @p='3' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b -WHERE COALESCE(b."DisplayName", b."Name") > @__value_0 OR (COALESCE(b."DisplayName", b."Name") = @__value_0 AND b."Id" > @__value_1) +WHERE COALESCE(b."DisplayName", b."Name") > @value OR (COALESCE(b."DisplayName", b."Name") = @value AND b."Id" > @value2) ORDER BY COALESCE(b."DisplayName", b."Name"), b."Id" -LIMIT @__p_2 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_SecondPage_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_SecondPage_NET8_0_NET9_0.md new file mode 100644 index 00000000000..8b67613feef --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_Fallback_SecondPage_NET8_0_NET9_0.md @@ -0,0 +1,67 @@ +# GetDefaultPage_With_Nullable_Fallback_SecondPage + +## SQL 0 + +```sql +-- @__value_0='Brand:11' +-- @__value_1='12' +-- @__p_2='3' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +WHERE COALESCE(b."DisplayName", b."Name") > @__value_0 OR (COALESCE(b."DisplayName", b."Name") = @__value_0 AND b."Id" > @__value_1) +ORDER BY COALESCE(b."DisplayName", b."Name"), b."Id" +LIMIT @__p_2 +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => (t.DisplayName ?? t.Name)).ThenBy(t => t.Id).Where(t => (((t.DisplayName ?? t.Name).CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) > 0) OrElse (((t.DisplayName ?? t.Name).CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) == 0) AndAlso (t.Id.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.Int32]).value) > 0)))).Take(3) +``` + +## Result + +```json +{ + "data": { + "brandsNullableFallback": { + "edges": [ + { + "cursor": "e31CcmFuZFw6MTM6MTQ=" + }, + { + "cursor": "e31CcmFuZFw6MTU6MTY=" + } + ], + "nodes": [ + { + "id": 14, + "name": "Brand:13", + "displayName": null, + "brandDetails": { + "country": { + "name": "Country13" + } + } + }, + { + "id": 16, + "name": "Brand:15", + "displayName": null, + "brandDetails": { + "country": { + "name": "Country15" + } + } + } + ], + "pageInfo": { + "hasNextPage": true, + "hasPreviousPage": true, + "startCursor": "e31CcmFuZFw6MTM6MTQ=", + "endCursor": "e31CcmFuZFw6MTU6MTY=" + } + } + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_NET8_0_NET9_0.md similarity index 99% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_NET8_0_NET9_0.md index 6bf59e96e87..fba164327b3 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @p='11' +-- @__p_0='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."AlwaysNull", b."Id" -LIMIT @p +LIMIT @__p_0 ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_SecondPage.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_SecondPage.md index 6eee21c65e6..a8be528ad8b 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_SecondPage.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_SecondPage.md @@ -3,14 +3,14 @@ ## SQL 0 ```sql --- @__value_0='Brand10' --- @__value_1='11' --- @__p_2='3' +-- @value='Brand10' +-- @value3='11' +-- @p='3' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b -WHERE b."Name" > @__value_0 OR (b."Name" = @__value_0 AND b."AlwaysNull" IS NULL AND b."Id" > @__value_1) +WHERE b."Name" > @value OR (b."Name" = @value AND b."AlwaysNull" IS NULL AND b."Id" > @value3) ORDER BY b."Name", b."AlwaysNull", b."Id" -LIMIT @__p_2 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_SecondPage_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_SecondPage_NET8_0_NET9_0.md new file mode 100644 index 00000000000..6eee21c65e6 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetDefaultPage_With_Nullable_SecondPage_NET8_0_NET9_0.md @@ -0,0 +1,67 @@ +# GetDefaultPage_With_Nullable_SecondPage + +## SQL 0 + +```sql +-- @__value_0='Brand10' +-- @__value_1='11' +-- @__p_2='3' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +WHERE b."Name" > @__value_0 OR (b."Name" = @__value_0 AND b."AlwaysNull" IS NULL AND b."Id" > @__value_1) +ORDER BY b."Name", b."AlwaysNull", b."Id" +LIMIT @__p_2 +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Name).ThenBy(x => x.AlwaysNull).ThenBy(t => t.Id).Where(t => (((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) > 0) OrElse ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) == 0) AndAlso False)) OrElse (((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) == 0) AndAlso (t.AlwaysNull == null)) AndAlso (t.Id.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.Int32]).value) > 0)))).Take(3) +``` + +## Result + +```json +{ + "data": { + "brandsNullable": { + "edges": [ + { + "cursor": "e31CcmFuZFw6MTE6XG51bGw6MTI=" + }, + { + "cursor": "e31CcmFuZFw6MTI6XG51bGw6MTM=" + } + ], + "nodes": [ + { + "id": 12, + "name": "Brand:11", + "displayName": null, + "brandDetails": { + "country": { + "name": "Country11" + } + } + }, + { + "id": 13, + "name": "Brand:12", + "displayName": "BrandDisplay12", + "brandDetails": { + "country": { + "name": "Country12" + } + } + } + ], + "pageInfo": { + "hasNextPage": true, + "hasPreviousPage": true, + "startCursor": "e31CcmFuZFw6MTE6XG51bGw6MTI=", + "endCursor": "e31CcmFuZFw6MTI6XG51bGw6MTM=" + } + } + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetSecondPage_With_2_Items.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetSecondPage_With_2_Items.md index de79aaa6e9d..b698b34e2ec 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetSecondPage_With_2_Items.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetSecondPage_With_2_Items.md @@ -3,14 +3,14 @@ ## SQL 0 ```sql --- @__value_0='Brand17' --- @__value_1='18' --- @__p_2='3' +-- @value='Brand17' +-- @value2='18' +-- @p='3' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b -WHERE b."Name" > @__value_0 OR (b."Name" = @__value_0 AND b."Id" > @__value_1) +WHERE b."Name" > @value OR (b."Name" = @value AND b."Id" > @value2) ORDER BY b."Name", b."Id" -LIMIT @__p_2 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetSecondPage_With_2_Items_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetSecondPage_With_2_Items_NET8_0_NET9_0.md new file mode 100644 index 00000000000..de79aaa6e9d --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.GetSecondPage_With_2_Items_NET8_0_NET9_0.md @@ -0,0 +1,47 @@ +# GetSecondPage_With_2_Items + +## SQL 0 + +```sql +-- @__value_0='Brand17' +-- @__value_1='18' +-- @__p_2='3' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +WHERE b."Name" > @__value_0 OR (b."Name" = @__value_0 AND b."Id" > @__value_1) +ORDER BY b."Name", b."Id" +LIMIT @__p_2 +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Name).ThenBy(t => t.Id).Where(t => ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) > 0) OrElse ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) == 0) AndAlso (t.Id.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.Int32]).value) > 0)))).Take(3) +``` + +## Result + +```json +{ + "data": { + "brands": { + "nodes": [ + { + "id": 19, + "name": "Brand:18" + }, + { + "id": 20, + "name": "Brand:19" + } + ], + "pageInfo": { + "hasNextPage": true, + "hasPreviousPage": true, + "startCursor": "e31CcmFuZFw6MTg6MTk=", + "endCursor": "e31CcmFuZFw6MTk6MjA=" + } + } + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto.md index a9721d091b3..6ee57f482e3 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='3' +-- @p='3' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2.md index faee62c0e17..1c559881590 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='3' +-- @p='3' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2_NET8_0_NET9_0.md similarity index 96% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2_NET8_0_NET9_0.md index 1c559881590..faee62c0e17 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_2_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @p='3' +-- @__p_0='3' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."Id" -LIMIT @p +LIMIT @__p_0 ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_NET8_0_NET9_0.md new file mode 100644 index 00000000000..a9721d091b3 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Map_Page_To_Connection_With_Dto_NET8_0_NET9_0.md @@ -0,0 +1,46 @@ +# Map_Page_To_Connection_With_Dto + +## SQL 0 + +```sql +-- @__p_0='3' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +ORDER BY b."Name", b."Id" +LIMIT @__p_0 +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Name).ThenBy(t => t.Id).Take(3) +``` + +## Result 3 + +```json +{ + "data": { + "brands": { + "edges": [ + { + "cursor": "e31CcmFuZFw6MDox", + "displayName": "BrandDisplay0", + "node": { + "id": 1, + "name": "Brand:0" + } + }, + { + "cursor": "e31CcmFuZFw6MToy", + "displayName": null, + "node": { + "id": 2, + "name": "Brand:1" + } + } + ] + } + } +} +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Nested_Paging_First_2_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Nested_Paging_First_2.md similarity index 100% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Nested_Paging_First_2_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Nested_Paging_First_2.md diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Nested_Paging_First_2_With_Projections_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Nested_Paging_First_2_With_Projections.md similarity index 100% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Nested_Paging_First_2_With_Projections_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Nested_Paging_First_2_With_Projections.md diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs.md index 80b46e13fb5..9e6906bccd4 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='11' +-- @p='11' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs_NET8_0_NET9_0.md new file mode 100644 index 00000000000..80b46e13fb5 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Empty_PagingArgs_NET8_0_NET9_0.md @@ -0,0 +1,157 @@ +# Paging_Empty_PagingArgs + +## SQL 0 + +```sql +-- @__p_0='11' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +ORDER BY b."Name", b."Id" +LIMIT @__p_0 +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Name).ThenBy(t => t.Id).Take(11) +``` + +## Result 3 + +```json +{ + "HasNextPage": true, + "HasPreviousPage": false, + "First": 1, + "FirstCursor": "e31CcmFuZFw6MDox", + "Last": 18, + "LastCursor": "e31CcmFuZFw6MTc6MTg=" +} +``` + +## Result 4 + +```json +[ + { + "Id": 1, + "Name": "Brand:0", + "DisplayName": "BrandDisplay0", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country0" + } + } + }, + { + "Id": 2, + "Name": "Brand:1", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country1" + } + } + }, + { + "Id": 11, + "Name": "Brand:10", + "DisplayName": "BrandDisplay10", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country10" + } + } + }, + { + "Id": 12, + "Name": "Brand:11", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country11" + } + } + }, + { + "Id": 13, + "Name": "Brand:12", + "DisplayName": "BrandDisplay12", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country12" + } + } + }, + { + "Id": 14, + "Name": "Brand:13", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country13" + } + } + }, + { + "Id": 15, + "Name": "Brand:14", + "DisplayName": "BrandDisplay14", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country14" + } + } + }, + { + "Id": 16, + "Name": "Brand:15", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country15" + } + } + }, + { + "Id": 17, + "Name": "Brand:16", + "DisplayName": "BrandDisplay16", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country16" + } + } + }, + { + "Id": 18, + "Name": "Brand:17", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country17" + } + } + } +] +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5.md index e6b8a3260ea..b2a15f59bab 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='6' +-- @p='6' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name", b."Id" -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13.md index 8ebd25adcb9..523d62543d2 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13.md @@ -3,14 +3,14 @@ ## SQL 0 ```sql --- @__value_0='Brand12' --- @__value_1='13' --- @__p_2='6' +-- @value='Brand12' +-- @value2='13' +-- @p='6' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b -WHERE b."Name" > @__value_0 OR (b."Name" = @__value_0 AND b."Id" > @__value_1) +WHERE b."Name" > @value OR (b."Name" = @value AND b."Id" > @value2) ORDER BY b."Name", b."Id" -LIMIT @__p_2 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13_NET8_0_NET9_0.md new file mode 100644 index 00000000000..8ebd25adcb9 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_After_Id_13_NET8_0_NET9_0.md @@ -0,0 +1,100 @@ +# Paging_First_5_After_Id_13 + +## SQL 0 + +```sql +-- @__value_0='Brand12' +-- @__value_1='13' +-- @__p_2='6' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +WHERE b."Name" > @__value_0 OR (b."Name" = @__value_0 AND b."Id" > @__value_1) +ORDER BY b."Name", b."Id" +LIMIT @__p_2 +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Name).ThenBy(t => t.Id).Where(t => ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) > 0) OrElse ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) == 0) AndAlso (t.Id.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.Int32]).value) > 0)))).Take(6) +``` + +## Result 3 + +```json +{ + "HasNextPage": true, + "HasPreviousPage": true, + "First": 14, + "FirstCursor": "e31CcmFuZFw6MTM6MTQ=", + "Last": 18, + "LastCursor": "e31CcmFuZFw6MTc6MTg=" +} +``` + +## Result 4 + +```json +[ + { + "Id": 14, + "Name": "Brand:13", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country13" + } + } + }, + { + "Id": 15, + "Name": "Brand:14", + "DisplayName": "BrandDisplay14", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country14" + } + } + }, + { + "Id": 16, + "Name": "Brand:15", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country15" + } + } + }, + { + "Id": 17, + "Name": "Brand:16", + "DisplayName": "BrandDisplay16", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country16" + } + } + }, + { + "Id": 18, + "Name": "Brand:17", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country17" + } + } + } +] +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96.md index 396d78db6c5..54541548bc0 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96.md @@ -3,14 +3,14 @@ ## SQL 0 ```sql --- @__value_0='Brand95' --- @__value_1='96' --- @__p_2='6' +-- @value='Brand95' +-- @value2='96' +-- @p='6' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b -WHERE b."Name" < @__value_0 OR (b."Name" = @__value_0 AND b."Id" < @__value_1) +WHERE b."Name" < @value OR (b."Name" = @value AND b."Id" < @value2) ORDER BY b."Name" DESC, b."Id" DESC -LIMIT @__p_2 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96_NET8_0_NET9_0.md new file mode 100644 index 00000000000..396d78db6c5 --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_Before_Id_96_NET8_0_NET9_0.md @@ -0,0 +1,100 @@ +# Paging_First_5_Before_Id_96 + +## SQL 0 + +```sql +-- @__value_0='Brand95' +-- @__value_1='96' +-- @__p_2='6' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +WHERE b."Name" < @__value_0 OR (b."Name" = @__value_0 AND b."Id" < @__value_1) +ORDER BY b."Name" DESC, b."Id" DESC +LIMIT @__p_2 +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderByDescending(t => t.Name).ThenByDescending(t => t.Id).Where(t => ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) < 0) OrElse ((t.Name.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.String]).value) == 0) AndAlso (t.Id.CompareTo(value(GreenDonut.Data.Expressions.ExpressionHelpers+<>c__DisplayClass16_0`1[System.Int32]).value) < 0)))).Take(6) +``` + +## Result 3 + +```json +{ + "HasNextPage": true, + "HasPreviousPage": true, + "First": 92, + "FirstCursor": "e31CcmFuZFw6OTE6OTI=", + "Last": 96, + "LastCursor": "e31CcmFuZFw6OTU6OTY=" +} +``` + +## Result 4 + +```json +[ + { + "Id": 92, + "Name": "Brand:91", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country91" + } + } + }, + { + "Id": 93, + "Name": "Brand:92", + "DisplayName": "BrandDisplay92", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country92" + } + } + }, + { + "Id": 94, + "Name": "Brand:93", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country93" + } + } + }, + { + "Id": 95, + "Name": "Brand:94", + "DisplayName": "BrandDisplay94", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country94" + } + } + }, + { + "Id": 96, + "Name": "Brand:95", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country95" + } + } + } +] +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_NET8_0_NET9_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_NET8_0_NET9_0.md new file mode 100644 index 00000000000..e6b8a3260ea --- /dev/null +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_First_5_NET8_0_NET9_0.md @@ -0,0 +1,97 @@ +# Paging_First_5 + +## SQL 0 + +```sql +-- @__p_0='6' +SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" +FROM "Brands" AS b +ORDER BY b."Name", b."Id" +LIMIT @__p_0 +``` + +## Expression 0 + +```text +[Microsoft.EntityFrameworkCore.Query.EntityQueryRootExpression].OrderBy(t => t.Name).ThenBy(t => t.Id).Take(6) +``` + +## Result 3 + +```json +{ + "HasNextPage": true, + "HasPreviousPage": false, + "First": 1, + "FirstCursor": "e31CcmFuZFw6MDox", + "Last": 13, + "LastCursor": "e31CcmFuZFw6MTI6MTM=" +} +``` + +## Result 4 + +```json +[ + { + "Id": 1, + "Name": "Brand:0", + "DisplayName": "BrandDisplay0", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country0" + } + } + }, + { + "Id": 2, + "Name": "Brand:1", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country1" + } + } + }, + { + "Id": 11, + "Name": "Brand:10", + "DisplayName": "BrandDisplay10", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country10" + } + } + }, + { + "Id": 12, + "Name": "Brand:11", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country11" + } + } + }, + { + "Id": 13, + "Name": "Brand:12", + "DisplayName": "BrandDisplay12", + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country12" + } + } + } +] +``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5.md index 4e213fec7ab..2a0121d131a 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @__p_0='6' +-- @p='6' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name" DESC, b."Id" DESC -LIMIT @__p_0 +LIMIT @p ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5_NET8_0_NET9_0.md similarity index 98% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5_NET8_0_NET9_0.md index 2a0121d131a..4e213fec7ab 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/PagingHelperIntegrationTests.Paging_Last_5_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL 0 ```sql --- @p='6' +-- @__p_0='6' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" FROM "Brands" AS b ORDER BY b."Name" DESC, b."Id" DESC -LIMIT @p +LIMIT @__p_0 ``` ## Expression 0 diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged.md index 4cfe46313c4..3c76e31c02d 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged.md @@ -3,11 +3,11 @@ ## SQL ```text --- @__keys_0={ '1', '2' } (DbType = Object) +-- @keys={ '1', '2' } (DbType = Object) SELECT FALSE, b."Name", p."Name", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@__keys_0) +WHERE p."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged_NET8_0_NET9_0.md similarity index 83% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged_NET8_0_NET9_0.md index 3c76e31c02d..4cfe46313c4 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Branches_Are_Merged_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL ```text --- @keys={ '1', '2' } (DbType = Object) +-- @__keys_0={ '1', '2' } (DbType = Object) SELECT FALSE, b."Name", p."Name", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@keys) +WHERE p."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name.md index f83d3d95dc5..4425bb1f30e 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Details_Country_Name" AS "Name", b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_NET8_0_NET9_0.md similarity index 81% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_NET8_0_NET9_0.md index 4425bb1f30e..f83d3d95dc5 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Details_Country_Name" AS "Name", b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver.md index b3497e762fa..28924240d6d 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver_NET8_0_NET9_0.md similarity index 81% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver_NET8_0_NET9_0.md index 28924240d6d..b3497e762fa 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Country_Name_With_Details_As_Custom_Resolver_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name.md index 32373de62b0..c5cec0ae46c 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2.md index 34bf052f977..f76d32c4922 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2_NET8_0_NET9_0.md similarity index 76% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2_NET8_0_NET9_0.md index f76d32c4922..34bf052f977 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_2_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_NET8_0_NET9_0.md similarity index 74% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_NET8_0_NET9_0.md index c5cec0ae46c..32373de62b0 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type.md index 4b7c02c4c13..6b0f30934d4 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_NET8_0_NET9_0.md similarity index 76% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_NET8_0_NET9_0.md index 6b0f30934d4..4b7c02c4c13 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic.md index 8b8ff98474e..15ce404a231 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic_NET8_0_NET9_0.md similarity index 77% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic_NET8_0_NET9_0.md index 15ce404a231..8b8ff98474e 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Details_Requires_Brand_Name_With_Proper_Type_With_Explicit_Generic_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName.md index c850b854fe1..c5071ce88ab 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName_NET8_0_NET9_0.md similarity index 71% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName_NET8_0_NET9_0.md index c5071ce88ab..c850b854fe1 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Only_TypeName_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName.md index 09888a85acb..f0fe247617f 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName_NET8_0_NET9_0.md similarity index 70% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName_NET8_0_NET9_0.md index f0fe247617f..09888a85acb 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_Products_TypeName_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node.md index 572e5ea4264..e963bfdfa37 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node_NET8_0_NET9_0.md similarity index 72% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node_NET8_0_NET9_0.md index e963bfdfa37..572e5ea4264 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Default_Field_Over_Node_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node.md index 90e65268ff6..3db4dbe81d1 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Id", b."Name" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node_NET8_0_NET9_0.md similarity index 75% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node_NET8_0_NET9_0.md index 3db4dbe81d1..90e65268ff6 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Id_And_Name_Over_Node_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Id", b."Name" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name.md index 8cf5e20c8c0..fa008bad0e6 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_NET8_0_NET9_0.md similarity index 71% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_NET8_0_NET9_0.md index fa008bad0e6..8cf5e20c8c0 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node.md index 58096c0df46..743084f1877 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node_NET8_0_NET9_0.md similarity index 71% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node_NET8_0_NET9_0.md index 743084f1877..58096c0df46 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Over_Node_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null.md index 731323f34bf..8a29f4882d5 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Id", b."DisplayName", b."Name", b."Details_Country_Name" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null_NET8_0_NET9_0.md similarity index 77% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null_NET8_0_NET9_0.md index 8a29f4882d5..731323f34bf 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Brand_With_Name_Selector_is_Null_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Id", b."DisplayName", b."Name", b."Details_Country_Name" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project.md index f8fb6311aaa..9c88a699ae5 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Id", b."DisplayName", b."Name", b."Details_Country_Name" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project_NET8_0_NET9_0.md similarity index 76% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project_NET8_0_NET9_0.md index 9c88a699ae5..f8fb6311aaa 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Do_Not_Project_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Id", b."DisplayName", b."Name", b."Details_Country_Name" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch.md index 73ef66e8b69..c5720d539a0 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch.md @@ -3,16 +3,16 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT FALSE, b."Name", p."Name", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@__keys_0) --- @__keys_0={ '1' } (DbType = Object) +WHERE p."Id" = ANY (@keys) +-- @keys={ '1' } (DbType = Object) SELECT FALSE, b."Id", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@__keys_0) +WHERE p."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch_NET8_0_NET9_0.md similarity index 76% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch_NET8_0_NET9_0.md index c5720d539a0..73ef66e8b69 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Force_A_Branch_NET8_0_NET9_0.md @@ -3,16 +3,16 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT FALSE, b."Name", p."Name", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@keys) --- @keys={ '1' } (DbType = Object) +WHERE p."Id" = ANY (@__keys_0) +-- @__keys_0={ '1' } (DbType = Object) SELECT FALSE, b."Id", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@keys) +WHERE p."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_And_Observe_Brand.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_And_Observe_Brand.md deleted file mode 100644 index 0bbedf2e3b6..00000000000 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_And_Observe_Brand.md +++ /dev/null @@ -1,23 +0,0 @@ -# Manual_Include_And_Observe_Brand - -## SQL - -```text --- @__keys_0={ '1' } (DbType = Object) -SELECT p."Id", p."AvailableStock", p."BrandId", p."Description", p."ImageFileName", p."MaxStockThreshold", p."Name", p."OnReorder", p."Price", p."RestockThreshold", p."TypeId" -FROM "Products" AS p -WHERE p."Id" = ANY (@__keys_0) -``` - -## Result - -```json -{ - "data": { - "productByIdWithBrandNoSelection": { - "name": "Product 0-0" - } - } -} -``` - diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand.md index d8aae7c89ac..03193d9ea18 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand.md @@ -3,11 +3,11 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT p."Name", b."Id", b."DisplayName", b."Name", b."Details_Country_Name", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@__keys_0) +WHERE p."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand_NET8_0_NET9_0.md similarity index 81% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand_NET8_0_NET9_0.md index 03193d9ea18..d8aae7c89ac 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Manual_Include_Of_Brand_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT p."Name", b."Id", b."DisplayName", b."Name", b."Details_Country_Name", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@keys) +WHERE p."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name.md index f1cd4bf80b5..e019f618581 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name.md @@ -3,11 +3,11 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT FALSE, b."Name", p."Name", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@__keys_0) +WHERE p."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name_NET8_0_NET9_0.md similarity index 82% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name_NET8_0_NET9_0.md index e019f618581..f1cd4bf80b5 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Name_And_Brand_With_Name_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT FALSE, b."Name", p."Name", p."Id" FROM "Products" AS p INNER JOIN "Brands" AS b ON p."BrandId" = b."Id" -WHERE p."Id" = ANY (@keys) +WHERE p."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null.md index ef0092d04f6..3abb41d1149 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null.md @@ -3,10 +3,10 @@ ## SQL ```text --- @__id_0='1' +-- @id='1' SELECT p."Name" FROM "Products" AS p -WHERE p."Id" = @__id_0 +WHERE p."Id" = @id ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null_NET8_0_NET9_0.md similarity index 85% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null_NET8_0_NET9_0.md index 3abb41d1149..ef0092d04f6 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Product_With_Nullable_Reference_Property_Set_To_Null_NET8_0_NET9_0.md @@ -3,10 +3,10 @@ ## SQL ```text --- @id='1' +-- @__id_0='1' SELECT p."Name" FROM "Products" AS p -WHERE p."Id" = @id +WHERE p."Id" = @__id_0 ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project.md index 97c95835a02..a32d4164d5a 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project.md @@ -3,14 +3,14 @@ ## SQL ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Id", b."DisplayName", b."Name", b."Details_Country_Name" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) --- @__keys_0={ '1' } (DbType = Object) +WHERE b."Id" = ANY (@keys) +-- @keys={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project_NET8_0_NET9_0.md similarity index 70% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project_NET8_0_NET9_0.md index a32d4164d5a..97c95835a02 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_And_Do_Not_Project_NET8_0_NET9_0.md @@ -3,14 +3,14 @@ ## SQL ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Id", b."DisplayName", b."Name", b."Details_Country_Name" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) --- @keys={ '1' } (DbType = Object) +WHERE b."Id" = ANY (@__keys_0) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Name", b."Id" FROM "Brands" AS b -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ``` ## Result diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression.md index 6cf1c5c4768..8ebf3d941ea 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression.md @@ -1,10 +1,10 @@ # Project_Key_To_Collection_Expression ```text --- @__keys_0={ '1' } (DbType = Object) +-- @keys={ '1' } (DbType = Object) SELECT b."Id", p."Name", p."Id" FROM "Brands" AS b LEFT JOIN "Products" AS p ON b."Id" = p."BrandId" -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ORDER BY b."Id" ``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration.md index a47c5da7c7b..1eac099ff0c 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration.md @@ -3,11 +3,11 @@ ## SQL ```text --- @__keys_0={ '1', '2' } (DbType = Object) +-- @keys={ '1', '2' } (DbType = Object) SELECT b."Id", p."Name", p."Id" FROM "Brands" AS b LEFT JOIN "Products" AS p ON b."Id" = p."BrandId" -WHERE b."Id" = ANY (@__keys_0) +WHERE b."Id" = ANY (@keys) ORDER BY b."Id" ``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration_NET8_0_NET9_0.md similarity index 99% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration_NET8_0_NET9_0.md index 1eac099ff0c..a47c5da7c7b 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_Integration_NET8_0_NET9_0.md @@ -3,11 +3,11 @@ ## SQL ```text --- @keys={ '1', '2' } (DbType = Object) +-- @__keys_0={ '1', '2' } (DbType = Object) SELECT b."Id", p."Name", p."Id" FROM "Brands" AS b LEFT JOIN "Products" AS p ON b."Id" = p."BrandId" -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ORDER BY b."Id" ``` diff --git a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_NET10_0.md b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_NET8_0_NET9_0.md similarity index 70% rename from src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_NET10_0.md rename to src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_NET8_0_NET9_0.md index 8ebf3d941ea..6cf1c5c4768 100644 --- a/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_NET10_0.md +++ b/src/HotChocolate/Data/test/Data.Tests/__snapshots__/ProjectableDataLoaderTests.Project_Key_To_Collection_Expression_NET8_0_NET9_0.md @@ -1,10 +1,10 @@ # Project_Key_To_Collection_Expression ```text --- @keys={ '1' } (DbType = Object) +-- @__keys_0={ '1' } (DbType = Object) SELECT b."Id", p."Name", p."Id" FROM "Brands" AS b LEFT JOIN "Products" AS p ON b."Id" = p."BrandId" -WHERE b."Id" = ANY (@keys) +WHERE b."Id" = ANY (@__keys_0) ORDER BY b."Id" ``` diff --git a/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ActivityExecutionDiagnosticListenerTests.cs b/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ActivityExecutionDiagnosticListenerTests.cs index f170cae244d..3cdb8ae71cd 100644 --- a/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ActivityExecutionDiagnosticListenerTests.cs +++ b/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ActivityExecutionDiagnosticListenerTests.cs @@ -4,6 +4,7 @@ using HotChocolate.PersistedOperations; using HotChocolate.Subscriptions; using HotChocolate.Types; +using static CookieCrumble.TestEnvironment; using static HotChocolate.Diagnostics.ActivityTestHelper; namespace HotChocolate.Diagnostics; @@ -514,7 +515,7 @@ public async Task SubscriptionEventError_Records_Subscription_Event_Error() } // assert - activities.MatchSnapshot(); + activities.MatchSnapshot(Postfix([NET11_0])); } } diff --git a/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/__snapshots__/ActivityExecutionDiagnosticListenerTests.SubscriptionEventError_Records_Subscription_Event_Error_NET11_0.snap b/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/__snapshots__/ActivityExecutionDiagnosticListenerTests.SubscriptionEventError_Records_Subscription_Event_Error_NET11_0.snap new file mode 100644 index 00000000000..dc174f93cc9 --- /dev/null +++ b/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/__snapshots__/ActivityExecutionDiagnosticListenerTests.SubscriptionEventError_Records_Subscription_Event_Error_NET11_0.snap @@ -0,0 +1,201 @@ +{ + "activities": [ + { + "OperationName": "GraphQL Operation", + "DisplayName": "subscription", + "Status": "Ok", + "tags": [ + { + "Key": "graphql.operation.type", + "Value": "subscription" + }, + { + "Key": "graphql.operation.name", + "Value": "OnFailingMessageSubscription" + }, + { + "Key": "graphql.document.hash", + "Value": "md5:1f38a1bfe720ad0cb6083bf8b309d3aa" + } + ], + "event": [ + { + "Name": "AddedOperationToCache", + "Tags": [] + }, + { + "Name": "AddedDocumentToCache", + "Tags": [] + } + ], + "activities": [ + { + "OperationName": "GraphQL Document Parsing", + "DisplayName": "GraphQL Document Parsing", + "Status": "Ok", + "tags": [ + { + "Key": "graphql.document.hash", + "Value": "md5:1f38a1bfe720ad0cb6083bf8b309d3aa" + } + ], + "event": [] + }, + { + "OperationName": "GraphQL Document Validation", + "DisplayName": "GraphQL Document Validation", + "Status": "Ok", + "tags": [ + { + "Key": "graphql.processing.type", + "Value": "validate" + }, + { + "Key": "graphql.document.hash", + "Value": "md5:1f38a1bfe720ad0cb6083bf8b309d3aa" + } + ], + "event": [] + }, + { + "OperationName": "GraphQL Operation Planning", + "DisplayName": "GraphQL Operation Planning", + "Status": "Ok", + "tags": [ + { + "Key": "graphql.processing.type", + "Value": "plan" + }, + { + "Key": "graphql.document.hash", + "Value": "md5:1f38a1bfe720ad0cb6083bf8b309d3aa" + }, + { + "Key": "graphql.operation.type", + "Value": "subscription" + }, + { + "Key": "graphql.operation.name", + "Value": "OnFailingMessageSubscription" + } + ], + "event": [] + }, + { + "OperationName": "GraphQL Operation Execution", + "DisplayName": "GraphQL Operation Execution", + "Status": "Ok", + "tags": [ + { + "Key": "graphql.processing.type", + "Value": "execute" + }, + { + "Key": "graphql.operation.type", + "Value": "subscription" + }, + { + "Key": "graphql.operation.name", + "Value": "OnFailingMessageSubscription" + }, + { + "Key": "graphql.document.hash", + "Value": "md5:1f38a1bfe720ad0cb6083bf8b309d3aa" + } + ], + "event": [], + "activities": [ + { + "OperationName": "GraphQL Subscription Event", + "DisplayName": "GraphQL Subscription Event", + "Status": "Ok", + "tags": [ + { + "Key": "graphql.processing.type", + "Value": "execute" + }, + { + "Key": "graphql.operation.type", + "Value": "subscription" + }, + { + "Key": "graphql.operation.name", + "Value": "OnFailingMessageSubscription" + }, + { + "Key": "graphql.document.hash", + "Value": "md5:1f38a1bfe720ad0cb6083bf8b309d3aa" + }, + { + "Key": "graphql.subscription.id", + "Value": "1" + } + ], + "event": [], + "activities": [ + { + "OperationName": "SimpleSubscription.onFailingMessage", + "DisplayName": "SimpleSubscription.onFailingMessage", + "Status": "Error", + "tags": [ + { + "Key": "graphql.processing.type", + "Value": "resolve" + }, + { + "Key": "graphql.selection.name", + "Value": "onFailingMessage" + }, + { + "Key": "graphql.selection.path", + "Value": "onFailingMessage" + }, + { + "Key": "graphql.selection.field.name", + "Value": "onFailingMessage" + }, + { + "Key": "graphql.selection.field.coordinate", + "Value": "SimpleSubscription.onFailingMessage" + }, + { + "Key": "graphql.selection.field.parent_type", + "Value": "SimpleSubscription" + } + ], + "event": [ + { + "Name": "exception", + "Tags": [ + { + "Key": "graphql.error.message", + "Value": "Unexpected Execution Error" + }, + { + "Key": "exception.message", + "Value": "Subscription event failed." + }, + { + "Key": "exception.stacktrace", + "Value": "System.InvalidOperationException: Subscription event failed.\n at HotChocolate.Diagnostics.ActivityExecutionDiagnosticListenerTests.SimpleSubscription.OnFailingMessage(String message) in ActivityExecutionDiagnosticListenerTests.cs\n at lambda_method(Closure, IResolverContext)\n at HotChocolate.Types.Helpers.FieldMiddlewareCompiler.<>c__DisplayClass9_0.b__0(IMiddlewareContext ctx) in FieldMiddlewareCompiler.cs\n--- End of stack trace from previous location ---\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.ExecuteResolverPipelineAsync(CancellationToken cancellationToken) in ResolverTask.Execute.cs\n at HotChocolate.Execution.Processing.Tasks.ResolverTask.TryExecuteAsync(CancellationToken cancellationToken) in ResolverTask.Execute.cs" + }, + { + "Key": "exception.type", + "Value": "System.InvalidOperationException" + }, + { + "Key": "graphql.error.path", + "Value": "onFailingMessage" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} diff --git a/src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/Fusion.Execution.Benchmarks.csproj b/src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/Fusion.Execution.Benchmarks.csproj index 293f667f6ee..03bfee42a9d 100644 --- a/src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/Fusion.Execution.Benchmarks.csproj +++ b/src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/Fusion.Execution.Benchmarks.csproj @@ -2,8 +2,8 @@ Exe - net10.0 - net10.0 + net11.0 + net11.0 true Preview HotChocolate.Fusion.Execution.Benchmarks diff --git a/src/HotChocolate/Fusion/benchmarks/k6/Directory.Build.props b/src/HotChocolate/Fusion/benchmarks/k6/Directory.Build.props index 404a1ca9f4d..5a34c7ed431 100644 --- a/src/HotChocolate/Fusion/benchmarks/k6/Directory.Build.props +++ b/src/HotChocolate/Fusion/benchmarks/k6/Directory.Build.props @@ -2,8 +2,8 @@ - net10.0 - net10.0 + net11.0 + net11.0 enable enable diff --git a/src/HotChocolate/Fusion/src/Fusion.Aspire/HotChocolate.Fusion.Aspire.csproj b/src/HotChocolate/Fusion/src/Fusion.Aspire/HotChocolate.Fusion.Aspire.csproj index 24cbbe0baaa..661335db124 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Aspire/HotChocolate.Fusion.Aspire.csproj +++ b/src/HotChocolate/Fusion/src/Fusion.Aspire/HotChocolate.Fusion.Aspire.csproj @@ -3,7 +3,7 @@ HotChocolate.Fusion.Aspire HotChocolate.Fusion.Aspire - net10.0; net9.0 + net11.0; net10.0; net9.0 false diff --git a/src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/__snapshots__/FusionActivityExecutionDiagnosticListenerTests.Source_Schema_Transport_Error.snap b/src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/__snapshots__/FusionActivityExecutionDiagnosticListenerTests.Source_Schema_Transport_Error.snap index 26a84ad5d80..8936d10b8f9 100644 --- a/src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/__snapshots__/FusionActivityExecutionDiagnosticListenerTests.Source_Schema_Transport_Error.snap +++ b/src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/__snapshots__/FusionActivityExecutionDiagnosticListenerTests.Source_Schema_Transport_Error.snap @@ -157,7 +157,7 @@ }, { "Key": "exception.stacktrace", - "Value": "System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).\n at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()\n at HotChocolate.Fusion.Transport.Http.GraphQLHttpResponse.ReadAsResultAsync(CancellationToken cancellationToken) in GraphQLHttpResponse.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.ReadAsResultStreamCoreAsync(CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.ReadAsResultStreamCoreAsync(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.WithResultCallback(IAsyncEnumerable`1 results, OperationPlanContext context, ExecutionNode node, Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.WithResultCallback(IAsyncEnumerable`1 results, OperationPlanContext context, ExecutionNode node, Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.WithResultCallback(IAsyncEnumerable`1 results, OperationPlanContext context, ExecutionNode node, Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()\n at HotChocolate.Fusion.Execution.Nodes.OperationExecutionNode.OnExecuteAsync(OperationPlanContext context, CancellationToken cancellationToken) in OperationExecutionNode.cs\n at HotChocolate.Fusion.Execution.Nodes.OperationExecutionNode.OnExecuteAsync(OperationPlanContext context, CancellationToken cancellationToken) in OperationExecutionNode.cs" + "Value": "System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).\n at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()\n at HotChocolate.Fusion.Transport.Http.GraphQLHttpResponse.ReadAsResultAsync(CancellationToken cancellationToken) in GraphQLHttpResponse.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.ReadAsResultStreamCoreAsync(CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.ReadAsResultStreamCoreAsync(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.WithResultCallback(IAsyncEnumerable`1 results, OperationPlanContext context, ExecutionNode node, Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.WithResultCallback(IAsyncEnumerable`1 results, OperationPlanContext context, ExecutionNode node, Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.WithResultCallback(IAsyncEnumerable`1 results, OperationPlanContext context, ExecutionNode node, Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()\n at HotChocolate.Fusion.Execution.Nodes.OperationExecutionNode.OnExecuteAsync(OperationPlanContext context, CancellationToken cancellationToken) in OperationExecutionNode.cs\n--- End of stack trace from previous location ---\n at HotChocolate.Fusion.Execution.Nodes.OperationExecutionNode.OnExecuteAsync(OperationPlanContext context, CancellationToken cancellationToken) in OperationExecutionNode.cs" }, { "Key": "exception.type", diff --git a/src/HotChocolate/Language/benchmarks/Language.Benchmarks/HotChocolate.Language.Benchmarks.csproj b/src/HotChocolate/Language/benchmarks/Language.Benchmarks/HotChocolate.Language.Benchmarks.csproj index e3fae0b7f2a..a90b8d30251 100644 --- a/src/HotChocolate/Language/benchmarks/Language.Benchmarks/HotChocolate.Language.Benchmarks.csproj +++ b/src/HotChocolate/Language/benchmarks/Language.Benchmarks/HotChocolate.Language.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 true Preview HotChocolate.Language.Benchmarks diff --git a/src/HotChocolate/Language/src/Directory.Build.props b/src/HotChocolate/Language/src/Directory.Build.props index 86473157e7d..5a8bf22bcc3 100644 --- a/src/HotChocolate/Language/src/Directory.Build.props +++ b/src/HotChocolate/Language/src/Directory.Build.props @@ -6,7 +6,7 @@ $(ExtendedTargetFrameworks) - + true diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorContainsTests.Create_Contains_Expression.snap b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorContainsTests.Create_Contains_Expression.snap index ba60d608631..088f25c5c97 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorContainsTests.Create_Contains_Expression.snap +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorContainsTests.Create_Contains_Expression.snap @@ -13,10 +13,10 @@ 1 SQL: --------------- --- @__p_0='POINT (1 1)' (DbType = Object) +-- @p='POINT (1 1)' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE ST_Contains(d."Bar", @__p_0) +WHERE ST_Contains(d."Bar", @p) --------------- 2 Result: @@ -34,8 +34,8 @@ WHERE ST_Contains(d."Bar", @__p_0) 2 SQL: --------------- --- @__p_0='POINT (-1 -1)' (DbType = Object) +-- @p='POINT (-1 -1)' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE ST_Contains(d."Bar", @__p_0) +WHERE ST_Contains(d."Bar", @p) --------------- diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorContainsTests.Create_NotContains_Expression.snap b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorContainsTests.Create_NotContains_Expression.snap index e9f641d13ca..1eafdbe7f68 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorContainsTests.Create_NotContains_Expression.snap +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorContainsTests.Create_NotContains_Expression.snap @@ -13,10 +13,10 @@ 2 SQL: --------------- --- @__p_0='POINT (1 1)' (DbType = Object) +-- @p='POINT (1 1)' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE NOT (ST_Contains(d."Bar", @__p_0)) +WHERE NOT (ST_Contains(d."Bar", @p)) --------------- 1 Result: @@ -34,8 +34,8 @@ WHERE NOT (ST_Contains(d."Bar", @__p_0)) 1 SQL: --------------- --- @__p_0='POINT (-1 -1)' (DbType = Object) +-- @p='POINT (-1 -1)' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE NOT (ST_Contains(d."Bar", @__p_0)) +WHERE NOT (ST_Contains(d."Bar", @p)) --------------- diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorDistanceTests.Create_Distance_Expression.snap b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorDistanceTests.Create_Distance_Expression.snap index 2d24bc480c4..7af3837f3f3 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorDistanceTests.Create_Distance_Expression.snap +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorDistanceTests.Create_Distance_Expression.snap @@ -13,11 +13,11 @@ 2 SQL: --------------- --- @__p_0='POINT (1 1)' (DbType = Object) --- @__p_1='1' +-- @p='POINT (1 1)' (DbType = Object) +-- @p1='1' SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE ST_Distance(d."Bar", @__p_0) > @__p_1 +WHERE ST_Distance(d."Bar", @p) > @p1 --------------- 1 Result: @@ -35,9 +35,9 @@ WHERE ST_Distance(d."Bar", @__p_0) > @__p_1 1 SQL: --------------- --- @__p_0='POINT (-1 -1)' (DbType = Object) --- @__p_1='1' +-- @p='POINT (-1 -1)' (DbType = Object) +-- @p1='1' SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE ST_Distance(d."Bar", @__p_0) > @__p_1 +WHERE ST_Distance(d."Bar", @p) > @p1 --------------- diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorIntersectsTests.Create_Intersects_Query.snap b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorIntersectsTests.Create_Intersects_Query.snap index 5efb1d37d5c..76c3ff6c623 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorIntersectsTests.Create_Intersects_Query.snap +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorIntersectsTests.Create_Intersects_Query.snap @@ -13,10 +13,10 @@ true Result: true SQL: --------------- --- @__p_0='POLYGON ((10 10, 10 90, 90 90, 90 10, 10 10))' (DbType = Object) +-- @p='POLYGON ((10 10, 10 90, 90 90, 90 10, 10 10))' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE ST_Intersects(d."Bar", @__p_0) +WHERE ST_Intersects(d."Bar", @p) --------------- false Result: @@ -34,8 +34,8 @@ false Result: false SQL: --------------- --- @__p_0='POLYGON ((10 10, 10 90, 90 90, 90 10, 10 10))' (DbType = Object) +-- @p='POLYGON ((10 10, 10 90, 90 90, 90 10, 10 10))' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE NOT (ST_Intersects(d."Bar", @__p_0)) +WHERE NOT (ST_Intersects(d."Bar", @p)) --------------- diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorOverlapsTests.Create_Overlaps_Query.snap b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorOverlapsTests.Create_Overlaps_Query.snap index 0b1d152475b..a9728871964 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorOverlapsTests.Create_Overlaps_Query.snap +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorOverlapsTests.Create_Overlaps_Query.snap @@ -13,10 +13,10 @@ true Result: true SQL: --------------- --- @__p_0='POLYGON ((150 150, 270 150, 330 150, 250 70, 190 70, 70 70, 150 150))' (DbType = Object) +-- @p='POLYGON ((150 150, 270 150, 330 150, 250 70, 190 70, 70 70, 150 150))' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE ST_Overlaps(d."Bar", @__p_0) +WHERE ST_Overlaps(d."Bar", @p) --------------- false Result: @@ -34,8 +34,8 @@ false Result: false SQL: --------------- --- @__p_0='POLYGON ((150 150, 270 150, 330 150, 250 70, 190 70, 70 70, 150 150))' (DbType = Object) +-- @p='POLYGON ((150 150, 270 150, 330 150, 250 70, 190 70, 70 70, 150 150))' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE NOT (ST_Overlaps(d."Bar", @__p_0)) +WHERE NOT (ST_Overlaps(d."Bar", @p)) --------------- diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorTouchesTests.Create_Touches_Query.snap b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorTouchesTests.Create_Touches_Query.snap index d6a7bada83c..00e46a7c3ac 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorTouchesTests.Create_Touches_Query.snap +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorTouchesTests.Create_Touches_Query.snap @@ -13,10 +13,10 @@ true Result: true SQL: --------------- --- @__p_0='POLYGON ((240 80, 140 120, 180 240, 280 200, 240 80))' (DbType = Object) +-- @p='POLYGON ((240 80, 140 120, 180 240, 280 200, 240 80))' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE ST_Touches(d."Bar", @__p_0) +WHERE ST_Touches(d."Bar", @p) --------------- false Result: @@ -34,8 +34,8 @@ false Result: false SQL: --------------- --- @__p_0='POLYGON ((240 80, 140 120, 180 240, 280 200, 240 80))' (DbType = Object) +-- @p='POLYGON ((240 80, 140 120, 180 240, 280 200, 240 80))' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE NOT (ST_Touches(d."Bar", @__p_0)) +WHERE NOT (ST_Touches(d."Bar", @p)) --------------- diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorWithinTests.Create_Within_Query.snap b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorWithinTests.Create_Within_Query.snap index 1ac4d9c73c6..019b3a55e73 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorWithinTests.Create_Within_Query.snap +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorWithinTests.Create_Within_Query.snap @@ -13,10 +13,10 @@ true Result: true SQL: --------------- --- @__p_0='POLYGON ((20 20, 140 20, 120 100, 20 100, 20 20))' (DbType = Object) +-- @p='POLYGON ((20 20, 140 20, 120 100, 20 100, 20 20))' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE ST_Within(d."Bar", @__p_0) +WHERE ST_Within(d."Bar", @p) --------------- false Result: @@ -34,8 +34,8 @@ false Result: false SQL: --------------- --- @__p_0='POLYGON ((20 20, 140 20, 120 100, 20 100, 20 20))' (DbType = Object) +-- @p='POLYGON ((20 20, 140 20, 120 100, 20 100, 20 20))' (DbType = Object) SELECT d."Id", d."Bar" FROM "Data" AS d -WHERE NOT (ST_Within(d."Bar", @__p_0)) +WHERE NOT (ST_Within(d."Bar", @p)) --------------- diff --git a/src/Mocha/benchmarks/Directory.Build.props b/src/Mocha/benchmarks/Directory.Build.props index ac7170928de..c040b6c2777 100644 --- a/src/Mocha/benchmarks/Directory.Build.props +++ b/src/Mocha/benchmarks/Directory.Build.props @@ -1,7 +1,7 @@ - net10.0 - net10.0 + net11.0 + net11.0 diff --git a/src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Mocha.Mediator.Benchmarks.csproj b/src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Mocha.Mediator.Benchmarks.csproj index dcdeb19350b..4b998227f44 100644 --- a/src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Mocha.Mediator.Benchmarks.csproj +++ b/src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Mocha.Mediator.Benchmarks.csproj @@ -1,7 +1,7 @@ Exe - net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0;net11.0 latest enable enable diff --git a/src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Program.cs b/src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Program.cs index 0ba0e169aec..682d42a5b6e 100644 --- a/src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Program.cs +++ b/src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Program.cs @@ -7,6 +7,6 @@ var config = DefaultConfig.Instance .AddJob(Job.Default.WithToolchain( CsProjCoreToolchain.From( - new NetCoreAppSettings("net10.0", null, ".NET 10.0")))); + new NetCoreAppSettings("net11.0", null, ".NET 11.0")))); BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config); diff --git a/src/Mocha/examples/Demo/Demo.Billing/Demo.Billing.csproj b/src/Mocha/examples/Demo/Demo.Billing/Demo.Billing.csproj index 7cc05db4918..f4e917223e0 100644 --- a/src/Mocha/examples/Demo/Demo.Billing/Demo.Billing.csproj +++ b/src/Mocha/examples/Demo/Demo.Billing/Demo.Billing.csproj @@ -2,7 +2,7 @@ HotChocolate.Demo.Billing HotChocolate.Demo.Billing - net10.0 + net11.0 diff --git a/src/Mocha/examples/Demo/Demo.Catalog/Demo.Catalog.csproj b/src/Mocha/examples/Demo/Demo.Catalog/Demo.Catalog.csproj index 1f63e1ed941..a904ac9b044 100644 --- a/src/Mocha/examples/Demo/Demo.Catalog/Demo.Catalog.csproj +++ b/src/Mocha/examples/Demo/Demo.Catalog/Demo.Catalog.csproj @@ -2,7 +2,7 @@ HotChocolate.Demo.Catalog HotChocolate.Demo.Catalog - net10.0 + net11.0 diff --git a/src/Mocha/examples/Demo/Demo.Shipping/Demo.Shipping.csproj b/src/Mocha/examples/Demo/Demo.Shipping/Demo.Shipping.csproj index ac9de49c2b7..406bd66c221 100644 --- a/src/Mocha/examples/Demo/Demo.Shipping/Demo.Shipping.csproj +++ b/src/Mocha/examples/Demo/Demo.Shipping/Demo.Shipping.csproj @@ -2,7 +2,7 @@ HotChocolate.Demo.Shipping HotChocolate.Demo.Shipping - net10.0 + net11.0 diff --git a/src/Mocha/examples/Demo/Directory.Packages.props b/src/Mocha/examples/Demo/Directory.Packages.props index dc16dfea33d..d7f1c581db7 100644 --- a/src/Mocha/examples/Demo/Directory.Packages.props +++ b/src/Mocha/examples/Demo/Directory.Packages.props @@ -16,6 +16,9 @@ + + + diff --git a/src/Mocha/examples/PostgresTransport/Directory.Build.props b/src/Mocha/examples/PostgresTransport/Directory.Build.props index e2ecaf9af06..88c4878ea8f 100644 --- a/src/Mocha/examples/PostgresTransport/Directory.Build.props +++ b/src/Mocha/examples/PostgresTransport/Directory.Build.props @@ -1,8 +1,8 @@ - net10.0 - net10.0 + net11.0 + net11.0 enable enable diff --git a/src/Mocha/test/Demo.Catalog.Tests/Demo.Catalog.Tests.csproj b/src/Mocha/test/Demo.Catalog.Tests/Demo.Catalog.Tests.csproj index 0275cbda972..410317b69bd 100644 --- a/src/Mocha/test/Demo.Catalog.Tests/Demo.Catalog.Tests.csproj +++ b/src/Mocha/test/Demo.Catalog.Tests/Demo.Catalog.Tests.csproj @@ -1,7 +1,7 @@ - net10.0 - net10.0 + net11.0 + net11.0 HotChocolate.Demo.Catalog.Tests HotChocolate.Demo.Catalog.Tests diff --git a/src/Mocha/test/Mocha.Tests/Conventions/DefaultNamingConventionsTests.cs b/src/Mocha/test/Mocha.Tests/Conventions/DefaultNamingConventionsTests.cs index 5f3c0b9bf4e..b91032533d1 100644 --- a/src/Mocha/test/Mocha.Tests/Conventions/DefaultNamingConventionsTests.cs +++ b/src/Mocha/test/Mocha.Tests/Conventions/DefaultNamingConventionsTests.cs @@ -12,7 +12,7 @@ public class DefaultNamingConventionsTests AssemblyName = "TestAssembly", AssemblyVersion = "1.0.0", PackageVersion = "1.0.0", - FrameworkVersion = ".NET 10.0", + FrameworkVersion = ".NET 11.0", OperatingSystemVersion = "Linux", EnvironmentName = "Test", ServiceName = "TestService", @@ -29,7 +29,7 @@ public class DefaultNamingConventionsTests AssemblyName = "TestAssembly", AssemblyVersion = "1.0.0", PackageVersion = "1.0.0", - FrameworkVersion = ".NET 10.0", + FrameworkVersion = ".NET 11.0", OperatingSystemVersion = "Linux", EnvironmentName = "Test", ServiceName = null, diff --git a/src/StrawberryShake/MetaPackages/Blazor/StrawberryShake.Blazor.csproj b/src/StrawberryShake/MetaPackages/Blazor/StrawberryShake.Blazor.csproj index 0941879c2f9..f903a88d3b8 100644 --- a/src/StrawberryShake/MetaPackages/Blazor/StrawberryShake.Blazor.csproj +++ b/src/StrawberryShake/MetaPackages/Blazor/StrawberryShake.Blazor.csproj @@ -27,6 +27,7 @@ + diff --git a/src/StrawberryShake/MetaPackages/Common/MSBuild/StrawberryShake.targets b/src/StrawberryShake/MetaPackages/Common/MSBuild/StrawberryShake.targets index 41000fd47c5..8aa62adf9d2 100644 --- a/src/StrawberryShake/MetaPackages/Common/MSBuild/StrawberryShake.targets +++ b/src/StrawberryShake/MetaPackages/Common/MSBuild/StrawberryShake.targets @@ -42,17 +42,19 @@ 8 9 10 + 11 + Text="The Strawberry Shake code generation requires .NET SDK 8, 9, 10, or 11 to work." + Condition="'$(DotNetMajor)' != '8' AND '$(DotNetMajor)' != '9' AND '$(DotNetMajor)' != '10' AND '$(DotNetMajor)' != '11'" /> $(MSBuildProjectDirectory)\$(GraphQLPersistedOperationOutput.TrimEnd('/').TrimEnd('\')) $([System.IO.Path]::Combine($(MSBuildThisFileDirectory), "..", "tools", "net8", "dotnet-graphql.dll")) $([System.IO.Path]::Combine($(MSBuildThisFileDirectory), "..", "tools", "net9", "dotnet-graphql.dll")) $([System.IO.Path]::Combine($(MSBuildThisFileDirectory), "..", "tools", "net10", "dotnet-graphql.dll")) + $([System.IO.Path]::Combine($(MSBuildThisFileDirectory), "..", "tools", "net11", "dotnet-graphql.dll")) diff --git a/src/StrawberryShake/MetaPackages/Maui/StrawberryShake.Maui.csproj b/src/StrawberryShake/MetaPackages/Maui/StrawberryShake.Maui.csproj index a4174320ff2..f4a8980c9cb 100644 --- a/src/StrawberryShake/MetaPackages/Maui/StrawberryShake.Maui.csproj +++ b/src/StrawberryShake/MetaPackages/Maui/StrawberryShake.Maui.csproj @@ -26,6 +26,7 @@ + diff --git a/src/StrawberryShake/MetaPackages/Server/StrawberryShake.Server.csproj b/src/StrawberryShake/MetaPackages/Server/StrawberryShake.Server.csproj index 2367238ba50..dace08191db 100644 --- a/src/StrawberryShake/MetaPackages/Server/StrawberryShake.Server.csproj +++ b/src/StrawberryShake/MetaPackages/Server/StrawberryShake.Server.csproj @@ -26,6 +26,7 @@ + diff --git a/templates/azure-function/.template.config/template.json b/templates/azure-function/.template.config/template.json index 45835ae8f46..bfb2bcd1159 100644 --- a/templates/azure-function/.template.config/template.json +++ b/templates/azure-function/.template.config/template.json @@ -30,6 +30,10 @@ { "choice": "net10.0", "description": "Target .NET 10" + }, + { + "choice": "net11.0", + "description": "Target .NET 11" } ], "replaces": "net8.0", diff --git a/templates/gateway/.template.config/template.json b/templates/gateway/.template.config/template.json index adffd5709cc..bdcfca1dd8b 100644 --- a/templates/gateway/.template.config/template.json +++ b/templates/gateway/.template.config/template.json @@ -30,6 +30,10 @@ { "choice": "net10.0", "description": "Target .NET 10" + }, + { + "choice": "net11.0", + "description": "Target .NET 11" } ], "replaces": "net8.0", diff --git a/templates/server/.template.config/template.json b/templates/server/.template.config/template.json index 415c088406d..f478496d33a 100644 --- a/templates/server/.template.config/template.json +++ b/templates/server/.template.config/template.json @@ -30,6 +30,10 @@ { "choice": "net10.0", "description": "Target .NET 10" + }, + { + "choice": "net11.0", + "description": "Target .NET 11" } ], "replaces": "net8.0",