From b8217242564f837928cb1067dd710dd2f90c968a Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Sat, 15 Nov 2025 19:53:58 +0100 Subject: [PATCH 01/39] Update CI image --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b47e6567..1a35b9bf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ env: jobs: ci: - runs-on: windows-2022 + runs-on: windows-2025 strategy: fail-fast: false matrix: From 4aa83846b075f81d954e132cd9b3c710fd347b2c Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Sat, 15 Nov 2025 19:55:47 +0100 Subject: [PATCH 02/39] Update CI dotnet-setup to 10 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a35b9bf6..a3d6cf6c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: .NET 9.0 - uses: actions/setup-dotnet@v4 + - name: .NET 10.0 + uses: actions/setup-dotnet@v5 with: - dotnet-version: 9.0.x + dotnet-version: 10.0.x - name: Build run: | From 56ada0aeddf4f652c012931b9ee8705764de405f Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Sat, 15 Nov 2025 19:56:01 +0100 Subject: [PATCH 03/39] Update version of checkout action --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3d6cf6c2..7de7a822a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: timeout-minutes: 120 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: .NET 10.0 uses: actions/setup-dotnet@v5 From 98f540298dbb74e8b7ac82fac46a89a87158f82d Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Sat, 15 Nov 2025 20:04:55 +0100 Subject: [PATCH 04/39] Update to SLNX. --- build.ps1 | 2 +- src/NETProvider.sln | 120 ------------------------------------------- src/NETProvider.slnx | 32 ++++++++++++ 3 files changed, 33 insertions(+), 121 deletions(-) delete mode 100644 src/NETProvider.sln create mode 100644 src/NETProvider.slnx diff --git a/build.ps1 b/build.ps1 index 9a321609d..2277fdfa6 100644 --- a/build.ps1 +++ b/build.ps1 @@ -21,7 +21,7 @@ function Clean() { function Build() { function b($target, $check=$True) { - dotnet msbuild /t:$target /p:Configuration=$Configuration /p:ContinuousIntegrationBuild=true "$baseDir\src\NETProvider.sln" /v:m /m + dotnet msbuild /t:$target /p:Configuration=$Configuration /p:ContinuousIntegrationBuild=true "$baseDir\src\NETProvider.slnx" /v:m /m if ($check) { Check-ExitCode } diff --git a/src/NETProvider.sln b/src/NETProvider.sln deleted file mode 100644 index 6c41c6e38..000000000 --- a/src/NETProvider.sln +++ /dev/null @@ -1,120 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31912.275 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FirebirdSql.Data.FirebirdClient", "FirebirdSql.Data.FirebirdClient\FirebirdSql.Data.FirebirdClient.csproj", "{ADC34658-2605-4588-A056-5288EDE4F5DE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FirebirdSql.Data.FirebirdClient.Tests", "FirebirdSql.Data.FirebirdClient.Tests\FirebirdSql.Data.FirebirdClient.Tests.csproj", "{C954BC7E-8C16-472F-BA78-93AFB11C69A4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework.Firebird", "EntityFramework.Firebird\EntityFramework.Firebird.csproj", "{29A1073A-42C9-4AA9-9B2D-6025C5082C7B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EF6", "EF6", "{F2F0EE52-D89E-4AC0-B7CA-C19298700FA6}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Provider", "Provider", "{C94B5B06-9023-43C1-9B0D-6BDD504F9A06}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EFCore", "EFCore", "{AD392B88-6637-4744-BDF9-8FB9453C9042}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestsBase", "TestsBase", "{CB00A1A8-5E04-4E3C-A862-514C22BD0FA6}" -EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "FirebirdSql.Data.TestsBase", "FirebirdSql.Data.TestsBase\FirebirdSql.Data.TestsBase.shproj", "{2F67FF6E-A6FC-44F4-9687-9E5CA05C73A3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FirebirdSql.EntityFrameworkCore.Firebird.Tests", "FirebirdSql.EntityFrameworkCore.Firebird.Tests\FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj", "{E9E13E28-1E4A-4B99-B594-07A696B19BC8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework.Firebird.Tests", "EntityFramework.Firebird.Tests\EntityFramework.Firebird.Tests.csproj", "{E6849FF6-D309-433A-B3EE-0554F07E3B21}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FirebirdSql.EntityFrameworkCore.Firebird", "FirebirdSql.EntityFrameworkCore.Firebird\FirebirdSql.EntityFrameworkCore.Firebird.csproj", "{42A00B25-673E-449A-9B89-BE89344F96F0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C68C23A7-AACE-4335-88F8-1060EDAB2131}" - ProjectSection(SolutionItems) = preProject - Directory.Build.props = Directory.Build.props - Versions.props = Versions.props - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests", "FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests\FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj", "{2925DB97-5B39-4D9E-90CC-F7470F9AA8F3}" -EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "FirebirdSql.Data.External", "FirebirdSql.Data.External\FirebirdSql.Data.External.shproj", "{884EE120-B22E-4940-8C1C-626F13028376}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Perf", "Perf\Perf.csproj", "{BB846245-545A-4506-A0DA-0041C535D3A9}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Perf", "Perf", "{CE2BB2BB-4639-49EA-8369-0215A1D7245D}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scratchpad", "Scratchpad", "{5F1D1BB9-4657-424C-B3DE-75818824940E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Scratchpad", "Scratchpad\Scratchpad.csproj", "{C3F47B3D-FA1F-4665-A58D-63B6FFDCD65F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ADC34658-2605-4588-A056-5288EDE4F5DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ADC34658-2605-4588-A056-5288EDE4F5DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ADC34658-2605-4588-A056-5288EDE4F5DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ADC34658-2605-4588-A056-5288EDE4F5DE}.Release|Any CPU.Build.0 = Release|Any CPU - {C954BC7E-8C16-472F-BA78-93AFB11C69A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C954BC7E-8C16-472F-BA78-93AFB11C69A4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C954BC7E-8C16-472F-BA78-93AFB11C69A4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C954BC7E-8C16-472F-BA78-93AFB11C69A4}.Release|Any CPU.Build.0 = Release|Any CPU - {29A1073A-42C9-4AA9-9B2D-6025C5082C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {29A1073A-42C9-4AA9-9B2D-6025C5082C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {29A1073A-42C9-4AA9-9B2D-6025C5082C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {29A1073A-42C9-4AA9-9B2D-6025C5082C7B}.Release|Any CPU.Build.0 = Release|Any CPU - {E9E13E28-1E4A-4B99-B594-07A696B19BC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E9E13E28-1E4A-4B99-B594-07A696B19BC8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E9E13E28-1E4A-4B99-B594-07A696B19BC8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E9E13E28-1E4A-4B99-B594-07A696B19BC8}.Release|Any CPU.Build.0 = Release|Any CPU - {E6849FF6-D309-433A-B3EE-0554F07E3B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E6849FF6-D309-433A-B3EE-0554F07E3B21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E6849FF6-D309-433A-B3EE-0554F07E3B21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E6849FF6-D309-433A-B3EE-0554F07E3B21}.Release|Any CPU.Build.0 = Release|Any CPU - {42A00B25-673E-449A-9B89-BE89344F96F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {42A00B25-673E-449A-9B89-BE89344F96F0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {42A00B25-673E-449A-9B89-BE89344F96F0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {42A00B25-673E-449A-9B89-BE89344F96F0}.Release|Any CPU.Build.0 = Release|Any CPU - {2925DB97-5B39-4D9E-90CC-F7470F9AA8F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2925DB97-5B39-4D9E-90CC-F7470F9AA8F3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2925DB97-5B39-4D9E-90CC-F7470F9AA8F3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2925DB97-5B39-4D9E-90CC-F7470F9AA8F3}.Release|Any CPU.Build.0 = Release|Any CPU - {BB846245-545A-4506-A0DA-0041C535D3A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BB846245-545A-4506-A0DA-0041C535D3A9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BB846245-545A-4506-A0DA-0041C535D3A9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BB846245-545A-4506-A0DA-0041C535D3A9}.Release|Any CPU.Build.0 = Release|Any CPU - {C3F47B3D-FA1F-4665-A58D-63B6FFDCD65F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C3F47B3D-FA1F-4665-A58D-63B6FFDCD65F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C3F47B3D-FA1F-4665-A58D-63B6FFDCD65F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C3F47B3D-FA1F-4665-A58D-63B6FFDCD65F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {ADC34658-2605-4588-A056-5288EDE4F5DE} = {C94B5B06-9023-43C1-9B0D-6BDD504F9A06} - {C954BC7E-8C16-472F-BA78-93AFB11C69A4} = {C94B5B06-9023-43C1-9B0D-6BDD504F9A06} - {29A1073A-42C9-4AA9-9B2D-6025C5082C7B} = {F2F0EE52-D89E-4AC0-B7CA-C19298700FA6} - {2F67FF6E-A6FC-44F4-9687-9E5CA05C73A3} = {CB00A1A8-5E04-4E3C-A862-514C22BD0FA6} - {E9E13E28-1E4A-4B99-B594-07A696B19BC8} = {AD392B88-6637-4744-BDF9-8FB9453C9042} - {E6849FF6-D309-433A-B3EE-0554F07E3B21} = {F2F0EE52-D89E-4AC0-B7CA-C19298700FA6} - {42A00B25-673E-449A-9B89-BE89344F96F0} = {AD392B88-6637-4744-BDF9-8FB9453C9042} - {2925DB97-5B39-4D9E-90CC-F7470F9AA8F3} = {AD392B88-6637-4744-BDF9-8FB9453C9042} - {884EE120-B22E-4940-8C1C-626F13028376} = {C94B5B06-9023-43C1-9B0D-6BDD504F9A06} - {BB846245-545A-4506-A0DA-0041C535D3A9} = {CE2BB2BB-4639-49EA-8369-0215A1D7245D} - {CE2BB2BB-4639-49EA-8369-0215A1D7245D} = {C94B5B06-9023-43C1-9B0D-6BDD504F9A06} - {5F1D1BB9-4657-424C-B3DE-75818824940E} = {C94B5B06-9023-43C1-9B0D-6BDD504F9A06} - {C3F47B3D-FA1F-4665-A58D-63B6FFDCD65F} = {5F1D1BB9-4657-424C-B3DE-75818824940E} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {D574B071-15C1-4024-BB37-78D690F61070} - EndGlobalSection - GlobalSection(SharedMSBuildProjectFiles) = preSolution - FirebirdSql.Data.TestsBase\FirebirdSql.Data.TestsBase.projitems*{2f67ff6e-a6fc-44f4-9687-9e5ca05c73a3}*SharedItemsImports = 13 - FirebirdSql.Data.External\FirebirdSql.Data.External.projitems*{884ee120-b22e-4940-8c1c-626f13028376}*SharedItemsImports = 13 - FirebirdSql.Data.External\FirebirdSql.Data.External.projitems*{adc34658-2605-4588-a056-5288ede4f5de}*SharedItemsImports = 5 - FirebirdSql.Data.TestsBase\FirebirdSql.Data.TestsBase.projitems*{c954bc7e-8c16-472f-ba78-93afb11c69a4}*SharedItemsImports = 5 - FirebirdSql.Data.TestsBase\FirebirdSql.Data.TestsBase.projitems*{e6849ff6-d309-433a-b3ee-0554f07e3b21}*SharedItemsImports = 5 - FirebirdSql.Data.TestsBase\FirebirdSql.Data.TestsBase.projitems*{e9e13e28-1e4a-4b99-b594-07a696b19bc8}*SharedItemsImports = 5 - EndGlobalSection - GlobalSection(TextTemplating) = postSolution - TextTemplating = 1 - EndGlobalSection -EndGlobal diff --git a/src/NETProvider.slnx b/src/NETProvider.slnx new file mode 100644 index 000000000..0aa0bceff --- /dev/null +++ b/src/NETProvider.slnx @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 1a397a7f73902a1072d38ab2b8f4feff02ec862f Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Sat, 15 Nov 2025 20:09:57 +0100 Subject: [PATCH 05/39] Switch to directly using dotnet commands instead of msbuild command. --- build.ps1 | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/build.ps1 b/build.ps1 index 2277fdfa6..778155748 100644 --- a/build.ps1 +++ b/build.ps1 @@ -20,17 +20,8 @@ function Clean() { } function Build() { - function b($target, $check=$True) { - dotnet msbuild /t:$target /p:Configuration=$Configuration /p:ContinuousIntegrationBuild=true "$baseDir\src\NETProvider.slnx" /v:m /m - if ($check) { - Check-ExitCode - } - } - b 'Clean' - # this sometimes fails on CI - b 'Restore' $False - b 'Restore' - b 'Build' + dotnet clean "$baseDir\src\NETProvider.slnx" -c $Configuration -v m + dotnet build "$baseDir\src\NETProvider.slnx" -c $Configuration -p:ContinuousIntegrationBuild=true -v m } function Versions() { From db1a9ef3dad7d605292b233f42b0fc6c227ff8c7 Mon Sep 17 00:00:00 2001 From: Niek <32094562+niekschoemaker@users.noreply.github.com> Date: Sat, 22 Nov 2025 11:55:30 +0100 Subject: [PATCH 06/39] Add support for CROSS APPLY and OUTER APPLY generation (#1238) --- .../Query/NorthwindJoinQueryFbTest.cs | 10 ++-- .../Query/UdfDbFunctionFbTests.cs | 2 +- .../Query/Internal/FbQuerySqlGenerator.cs | 56 ++++++++++++++++++- 3 files changed, 61 insertions(+), 7 deletions(-) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindJoinQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindJoinQueryFbTest.cs index 072b8caec..752c804f6 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindJoinQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindJoinQueryFbTest.cs @@ -29,21 +29,21 @@ public NorthwindJoinQueryFbTest(NorthwindQueryFbFixture fix : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_as_final_operator(bool async) { return base.GroupJoin_as_final_operator(async); } - [NotSupportedOnFirebirdTheory] + [Theory] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_SelectMany_subquery_with_filter_orderby(bool async) { return base.GroupJoin_SelectMany_subquery_with_filter_orderby(async); } - [NotSupportedOnFirebirdTheory] + [Theory] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_SelectMany_subquery_with_filter_orderby_and_DefaultIfEmpty(bool async) { @@ -99,14 +99,14 @@ public override Task Take_in_collection_projection_with_FirstOrDefault_on_top_le return base.Take_in_collection_projection_with_FirstOrDefault_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory] [MemberData(nameof(IsAsyncData))] public override Task Unflattened_GroupJoin_composed(bool async) { return base.Unflattened_GroupJoin_composed(async); } - [NotSupportedOnFirebirdTheory] + [Theory] [MemberData(nameof(IsAsyncData))] public override Task Unflattened_GroupJoin_composed_2(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs index 937a842d2..c524c8b30 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs @@ -51,7 +51,7 @@ public override void Udf_with_argument_being_comparison_of_nullable_columns() base.Udf_with_argument_being_comparison_of_nullable_columns(); } - [NotSupportedOnFirebirdFact] + [Fact] public override void QF_Select_Correlated_Subquery_In_Anonymous_MultipleCollections() { base.QF_Select_Correlated_Subquery_In_Anonymous_MultipleCollections(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs index 17fb2ff67..2e899cea6 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs @@ -191,7 +191,7 @@ protected override Expression VisitSqlConstant(SqlConstantExpression sqlConstant base.VisitSqlConstant(sqlConstantExpression); if (shouldExplicitStringLiteralTypes) { - var isUnicode = FbTypeMappingSource.IsUnicode(sqlConstantExpression.TypeMapping); + var isUnicode = FbTypeMappingSource.IsUnicode(sqlConstantExpression.TypeMapping); Sql.Append(" AS "); Sql.Append(((IFbSqlGenerationHelper)Dependencies.SqlGenerationHelper).StringLiteralQueryType(sqlConstantExpression.Value as string, isUnicode)); Sql.Append(")"); @@ -280,6 +280,60 @@ protected override void GenerateOrderings(SelectExpression selectExpression) } } + // Adapted from Npgsql Entity Framework Core provider + // (https://github.com/npgsql/efcore.pg) + // Copyright (c) 2002-2021, Npgsql + protected override Expression VisitCrossApply(CrossApplyExpression crossApplyExpression) + { + Sql.Append("JOIN LATERAL "); + + if (crossApplyExpression.Table is TableExpression table) + { + // Firebird doesn't support LATERAL JOIN over table, and it doesn't really make sense to do it - but EF Core + // will sometimes generate that. + Sql + .Append("(SELECT * FROM ") + .Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(table.Name, table.Schema)) + .Append(")") + .Append(AliasSeparator) + .Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(table.Alias)); + } + else + { + Visit(crossApplyExpression.Table); + } + + Sql.Append(" ON TRUE"); + return crossApplyExpression; + } + + // Adapted from Npgsql Entity Framework Core provider + // (https://github.com/npgsql/efcore.pg) + // Copyright (c) 2002-2021, Npgsql + protected override Expression VisitOuterApply(OuterApplyExpression outerApplyExpression) + { + Sql.Append("LEFT JOIN LATERAL "); + + if (outerApplyExpression.Table is TableExpression table) + { + // Firebird doesn't support LATERAL JOIN over table, and it doesn't really make sense to do it - but EF Core + // will sometimes generate that. + Sql + .Append("(SELECT * FROM ") + .Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(table.Name, table.Schema)) + .Append(")") + .Append(AliasSeparator) + .Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(table.Alias)); + } + else + { + Visit(outerApplyExpression.Table); + } + + Sql.Append(" ON TRUE"); + return outerApplyExpression; + } + protected override void GeneratePseudoFromClause() { Sql.Append(" FROM RDB$DATABASE"); From 1ebebd443120e079afa8b02f4026d165d9bec903 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Sat, 22 Nov 2025 11:17:55 +0100 Subject: [PATCH 07/39] Update targets --- build.ps1 | 4 ++-- .../EntityFramework.Firebird.Tests.csproj | 4 ++-- .../EntityFramework.Firebird.csproj | 7 +----- ...rebirdSql.Data.FirebirdClient.Tests.csproj | 2 +- .../FirebirdSql.Data.FirebirdClient.csproj | 23 ++++--------------- ...meworkCore.Firebird.FunctionalTests.csproj | 2 +- ....EntityFrameworkCore.Firebird.Tests.csproj | 2 +- ...irdSql.EntityFrameworkCore.Firebird.csproj | 2 +- src/Perf/Perf.csproj | 2 +- src/Scratchpad/Scratchpad.csproj | 2 +- tests.ps1 | 2 +- 11 files changed, 16 insertions(+), 36 deletions(-) diff --git a/build.ps1 b/build.ps1 index 778155748..308363e27 100644 --- a/build.ps1 +++ b/build.ps1 @@ -28,8 +28,8 @@ function Versions() { function v($file) { return (Get-Item $file).VersionInfo.ProductVersion -replace '(\d+)\.(\d+)\.(\d+)(-[a-z0-9]+)?.*','$1.$2.$3$4' } - $script:versionProvider = v $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\net8.0\FirebirdSql.Data.FirebirdClient.dll - $script:versionEFCore = v $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\net8.0\FirebirdSql.EntityFrameworkCore.Firebird.dll + $script:versionProvider = v $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\net10.0\FirebirdSql.Data.FirebirdClient.dll + $script:versionEFCore = v $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\net10.0\FirebirdSql.EntityFrameworkCore.Firebird.dll $script:versionEF6 = v $baseDir\src\EntityFramework.Firebird\bin\$Configuration\net48\EntityFramework.Firebird.dll } diff --git a/src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj b/src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj index c3eb7d657..01672b56e 100644 --- a/src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj +++ b/src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj @@ -1,6 +1,6 @@  - net9.0 + net10.0 false false true @@ -16,7 +16,7 @@ - + diff --git a/src/EntityFramework.Firebird/EntityFramework.Firebird.csproj b/src/EntityFramework.Firebird/EntityFramework.Firebird.csproj index 7a028340b..12ec50978 100644 --- a/src/EntityFramework.Firebird/EntityFramework.Firebird.csproj +++ b/src/EntityFramework.Firebird/EntityFramework.Firebird.csproj @@ -47,6 +47,7 @@ + @@ -54,10 +55,4 @@ - - - - - - diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/FirebirdSql.Data.FirebirdClient.Tests.csproj b/src/FirebirdSql.Data.FirebirdClient.Tests/FirebirdSql.Data.FirebirdClient.Tests.csproj index 1fe8ead88..ff0b4ae13 100644 --- a/src/FirebirdSql.Data.FirebirdClient.Tests/FirebirdSql.Data.FirebirdClient.Tests.csproj +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/FirebirdSql.Data.FirebirdClient.Tests.csproj @@ -1,6 +1,6 @@  - net9.0 + net10.0 false false true diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj b/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj index bd28a79cd..fd82e9e50 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj @@ -1,6 +1,6 @@  - net48;netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0;net8.0 + net8.0;net9.0;net10.0 FirebirdSql.Data.FirebirdClient FirebirdSql.Data true @@ -38,23 +38,11 @@ - - - - - - - - - - - - - + - + - + @@ -62,8 +50,5 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj index 10f830844..e22c6ae10 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj @@ -1,6 +1,6 @@  - net9.0 + net10.0 false false true diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj index f126570bf..97754a322 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj @@ -1,6 +1,6 @@  - net9.0 + net10.0 false false true diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj b/src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj index a8f28a98d..4baf2bd0c 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj @@ -1,6 +1,6 @@  - net8.0 + net10.0 FirebirdSql.EntityFrameworkCore.Firebird FirebirdSql.EntityFrameworkCore.Firebird true diff --git a/src/Perf/Perf.csproj b/src/Perf/Perf.csproj index f47a017c6..eca7e7c51 100644 --- a/src/Perf/Perf.csproj +++ b/src/Perf/Perf.csproj @@ -1,7 +1,7 @@  Exe - net9.0 + net10.0 true diff --git a/src/Scratchpad/Scratchpad.csproj b/src/Scratchpad/Scratchpad.csproj index e6caecba1..991197ec7 100644 --- a/src/Scratchpad/Scratchpad.csproj +++ b/src/Scratchpad/Scratchpad.csproj @@ -1,7 +1,7 @@  Exe - net9.0 + net10.0 true true ..\FirebirdSql.Data.TestsBase\FirebirdSql.Data.TestsBase.snk diff --git a/tests.ps1 b/tests.ps1 index 49940f135..6af9ac102 100644 --- a/tests.ps1 +++ b/tests.ps1 @@ -28,7 +28,7 @@ $FirebirdConfiguration = @{ } } -$frameworkVersion = 'net9.0' +$frameworkVersion = 'net10.0' $testsBaseDir = "$baseDir\src\FirebirdSql.Data.FirebirdClient.Tests" $testsProviderDir = "$testsBaseDir\bin\$Configuration\$frameworkVersion" From c6ff10745444168f2de6d1f230796849acc8c5e7 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Sat, 22 Nov 2025 11:51:55 +0100 Subject: [PATCH 08/39] Conditionals cleanup --- .../Client/ClientFactory.cs | 4 +- .../Managed/FirebirdNetworkHandlingWrapper.cs | 2 +- .../Client/Managed/GdsConnection.cs | 16 +-- .../Client/Managed/Version10/GdsDatabase.cs | 6 +- .../Managed/Version10/GdsServiceManager.cs | 2 +- .../Client/Managed/Version10/GdsStatement.cs | 22 ++--- .../Client/Managed/Version11/GdsDatabase.cs | 2 +- .../Client/Managed/Version16/GdsBatch.cs | 2 +- .../Client/Native/FbClientFactory.cs | 16 +-- .../Client/Native/FesArray.cs | 6 +- .../Client/Native/FesBlob.cs | 22 ++--- .../Client/Native/FesDatabase.cs | 10 +- .../Client/Native/FesServiceManager.cs | 8 +- .../Client/Native/FesStatement.cs | 8 +- .../Client/Native/FesTransaction.cs | 16 +-- .../Common/BlobStream.cs | 2 - .../Common/Charset.cs | 2 +- .../Common/DatabaseBase.cs | 2 +- .../Common/DateTime2.cs | 30 ------ .../Common/DbField.cs | 6 +- .../Common/DbValue.cs | 14 +-- .../Common/EmptyDescriptorFiller.cs | 2 +- .../Common/Encoding2.cs | 43 -------- .../Common/Extensions.cs | 97 ++++++++++--------- .../Common/ServiceManagerBase.cs | 2 +- .../Common/StatementBase.cs | 2 +- .../Common/TransactionBase.cs | 2 +- .../Common/TypeEncoder.cs | 4 - .../Common/TypeHelper.cs | 4 - .../Common/ValueTask2.cs | 37 ------- .../FirebirdClient/FbBatchCommand.cs | 32 +----- .../FirebirdClient/FbCommand.cs | 31 ------ .../FirebirdClient/FbConnection.cs | 34 ------- .../FirebirdClient/FbConnectionInternal.cs | 44 +-------- .../FirebirdClient/FbDataReader.cs | 34 ------- .../FirebirdClient/FbException.cs | 41 -------- .../FirebirdClient/FbRemoteEvent.cs | 7 +- .../FirebirdClient/FbTransaction.cs | 60 ------------ .../Isql/FbBatchExecution.cs | 33 ------- .../Schema/FbSchema.cs | 9 -- 40 files changed, 128 insertions(+), 588 deletions(-) delete mode 100644 src/FirebirdSql.Data.FirebirdClient/Common/DateTime2.cs delete mode 100644 src/FirebirdSql.Data.FirebirdClient/Common/Encoding2.cs delete mode 100644 src/FirebirdSql.Data.FirebirdClient/Common/ValueTask2.cs diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/ClientFactory.cs b/src/FirebirdSql.Data.FirebirdClient/Client/ClientFactory.cs index a3869d1b3..c6ff43285 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/ClientFactory.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/ClientFactory.cs @@ -128,7 +128,7 @@ private static ValueTask CreateNativeDatabaseAsync(ConnectionStrin { var charset = GetCharset(options); - return ValueTask2.FromResult(new Native.FesDatabase(options.ClientLibrary, charset, options.PacketSize, options.Dialect)); + return ValueTask.FromResult(new Native.FesDatabase(options.ClientLibrary, charset, options.PacketSize, options.Dialect)); } private static ServiceManagerBase CreateManagedServiceManager(ConnectionString options) @@ -194,7 +194,7 @@ private static ValueTask CreateNativeServiceManagerAsync(Con { var charset = GetCharset(options); - return ValueTask2.FromResult(new Native.FesServiceManager(options.ClientLibrary, charset)); + return ValueTask.FromResult(new Native.FesServiceManager(options.ClientLibrary, charset)); } private static Exception UnsupportedProtocolException() => new NotSupportedException("Protocol not supported."); diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs index 28d85b36f..19b0cb79b 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs @@ -129,7 +129,7 @@ public ValueTask WriteAsync(byte[] buffer, int offset, int count, CancellationTo { for (var i = offset; i < count; i++) _outputBuffer.Enqueue(buffer[offset + i]); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public void Flush() diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/GdsConnection.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/GdsConnection.cs index 249f31fb7..cc39ba6b2 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/GdsConnection.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/GdsConnection.cs @@ -114,12 +114,7 @@ public async ValueTask ConnectAsync(CancellationToken cancellationToken = defaul { using (var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(timeoutCts.Token, cancellationToken)) { -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - static Func ConnectAsyncHelper(Socket socket) => (e, ct) => Task.Factory.FromAsync(socket.BeginConnect, socket.EndConnect, e, null); -#else - static Func ConnectAsyncHelper(Socket socket) => (e, ct) => SocketTaskExtensions.ConnectAsync(socket, e, ct).AsTask(); -#endif - await ConnectAsyncHelper(socket)(endPoint, combinedCts.Token).ConfigureAwait(false); + await socket.ConnectAsync(endPoint, combinedCts.Token).ConfigureAwait(false); } } @@ -366,11 +361,7 @@ public void Disconnect() { if (_networkStream != null) { -#if NET48 || NETSTANDARD2_0 _networkStream.Dispose(); -#else - _networkStream.Dispose(); -#endif _networkStream = null; } } @@ -378,12 +369,7 @@ public async ValueTask DisconnectAsync(CancellationToken cancellationToken = def { if (_networkStream != null) { -#if NET48 || NETSTANDARD2_0 - _networkStream.Dispose(); - await ValueTask2.CompletedTask.ConfigureAwait(false); -#else await _networkStream.DisposeAsync().ConfigureAwait(false); -#endif _networkStream = null; } } diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsDatabase.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsDatabase.cs index 6e9e209ba..37f134aa1 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsDatabase.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsDatabase.cs @@ -159,7 +159,7 @@ protected virtual void ProcessAttachResponse(GenericResponse response) protected virtual ValueTask ProcessAttachResponseAsync(GenericResponse response, CancellationToken cancellationToken = default) { _handle = response.ObjectHandle; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } protected void AfterAttachActions() @@ -353,7 +353,7 @@ protected void ProcessCreateResponse(GenericResponse response) protected ValueTask ProcessCreateResponseAsync(GenericResponse response, CancellationToken cancellationToken = default) { _handle = response.ObjectHandle; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void CreateDatabaseWithTrustedAuth(DatabaseParameterBufferBase dpb, string database, byte[] cryptKey) @@ -784,7 +784,7 @@ protected virtual void ProcessReleaseObjectResponse(IResponse response) { } protected virtual ValueTask ProcessReleaseObjectResponseAsync(IResponse response, CancellationToken cancellationToken = default) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } #endregion diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsServiceManager.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsServiceManager.cs index d0f7bf057..20fb3b9cb 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsServiceManager.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsServiceManager.cs @@ -113,7 +113,7 @@ protected virtual void ProcessAttachResponse(GenericResponse response) protected virtual ValueTask ProcessAttachResponseAsync(GenericResponse response, CancellationToken cancellationToken = default) { Handle = response.ObjectHandle; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Detach() diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsStatement.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsStatement.cs index f6d33d155..54b5698cc 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsStatement.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsStatement.cs @@ -191,7 +191,7 @@ public override ArrayBase CreateArray(ArrayDesc descriptor) public override ValueTask CreateArrayAsync(ArrayDesc descriptor, CancellationToken cancellationToken = default) { var array = new GdsArray(descriptor); - return ValueTask2.FromResult(array); + return ValueTask.FromResult(array); } public override ArrayBase CreateArray(string tableName, string fieldName) @@ -643,7 +643,7 @@ protected ValueTask ProcessInfoSqlResponseAsync(GenericResponse response { Debug.Assert(response.Data != null && response.Data.Length > 0); - return ValueTask2.FromResult(response.Data); + return ValueTask.FromResult(response.Data); } #endregion @@ -729,7 +729,7 @@ protected void ProcessFreeResponse(IResponse response) { } protected ValueTask ProcessFreeResponseAsync(IResponse response, CancellationToken cancellationToken = default) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } #endregion @@ -758,7 +758,7 @@ protected ValueTask ProcessAllocateResponseAsync(GenericResponse response, Cance _allRowsFetched = false; State = StatementState.Allocated; StatementType = DbStatementType.None; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } #endregion @@ -842,7 +842,7 @@ protected void ProcessExecuteResponse(GenericResponse response) { } protected ValueTask ProcessExecuteResponseAsync(GenericResponse response, CancellationToken cancellationToken = default) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } protected void ProcessStoredProcedureExecuteResponse(SqlResponse response) @@ -1247,7 +1247,7 @@ protected void WriteRawParameter(IXdrWriter xdr, DbField field) else { var svalue = field.DbValue.GetString(); - if ((field.Length % field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesEx().Count() > field.CharCount) + if ((field.Length % field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesToChars().Count() > field.CharCount) { throw IscException.ForErrorCodes(new[] { IscCodes.isc_arith_except, IscCodes.isc_string_truncation }); } @@ -1272,7 +1272,7 @@ protected void WriteRawParameter(IXdrWriter xdr, DbField field) else { var svalue = field.DbValue.GetString(); - if ((field.Length % field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesEx().Count() > field.CharCount) + if ((field.Length % field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesToChars().Count() > field.CharCount) { throw IscException.ForErrorCodes(new[] { IscCodes.isc_arith_except, IscCodes.isc_string_truncation }); } @@ -1395,7 +1395,7 @@ protected async ValueTask WriteRawParameterAsync(IXdrWriter xdr, DbField field, else { var svalue = await field.DbValue.GetStringAsync(cancellationToken).ConfigureAwait(false); - if ((field.Length % field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesEx().Count() > field.CharCount) + if ((field.Length % field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesToChars().Count() > field.CharCount) { throw IscException.ForErrorCodes(new[] { IscCodes.isc_arith_except, IscCodes.isc_string_truncation }); } @@ -1420,7 +1420,7 @@ protected async ValueTask WriteRawParameterAsync(IXdrWriter xdr, DbField field, else { var svalue = await field.DbValue.GetStringAsync(cancellationToken).ConfigureAwait(false); - if ((field.Length % field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesEx().Count() > field.CharCount) + if ((field.Length % field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesToChars().Count() > field.CharCount) { throw IscException.ForErrorCodes(new[] { IscCodes.isc_arith_except, IscCodes.isc_string_truncation }); } @@ -1533,7 +1533,7 @@ protected object ReadRawValue(IXdrReader xdr, DbField field) else { var s = xdr.ReadString(innerCharset, field.Length); - var runes = s.EnumerateRunesEx().ToList(); + var runes = s.EnumerateRunesToChars().ToList(); if ((field.Length % field.Charset.BytesPerCharacter) == 0 && runes.Count > field.CharCount) { @@ -1631,7 +1631,7 @@ protected async ValueTask ReadRawValueAsync(IXdrReader xdr, DbField fiel else { var s = await xdr.ReadStringAsync(innerCharset, field.Length, cancellationToken).ConfigureAwait(false); - var runes = s.EnumerateRunesEx().ToList(); + var runes = s.EnumerateRunesToChars().ToList(); if ((field.Length % field.Charset.BytesPerCharacter) == 0 && runes.Count > field.CharCount) { diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/GdsDatabase.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/GdsDatabase.cs index 1438c9cd8..7c9030be2 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/GdsDatabase.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/GdsDatabase.cs @@ -111,7 +111,7 @@ protected virtual void SendTrustedAuthToBuffer(DatabaseParameterBufferBase dpb, protected virtual ValueTask SendTrustedAuthToBufferAsync(DatabaseParameterBufferBase dpb, byte[] authData, CancellationToken cancellationToken = default) { dpb.Append(IscCodes.isc_dpb_trusted_auth, authData); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } protected IResponse ProcessTrustedAuthResponse(SspiHelper sspiHelper, IResponse response) diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version16/GdsBatch.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version16/GdsBatch.cs index e0f68b88f..def16aeee 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version16/GdsBatch.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version16/GdsBatch.cs @@ -172,7 +172,7 @@ protected void ProcessReleaseResponse(IResponse response) { } protected ValueTask ProcessReleaseResponseAsync(IResponse response, CancellationToken cancellationToken = default) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } protected ExecuteResultItem[] BuildResult(BatchCompletionStateResponse response) diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FbClientFactory.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FbClientFactory.cs index c816d19a6..9b5cc79a8 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FbClientFactory.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FbClientFactory.cs @@ -257,14 +257,6 @@ private static void EmitLdarg(ILGenerator il, int i) private static IFbClient CreateInstance(TypeBuilder tb) { var t = tb.CreateTypeInfo().AsType(); - -#if DEBUG -#if NET48 - var ab = (AssemblyBuilder)tb.Assembly; - ab.Save("DynamicAssembly.dll"); -#endif -#endif - return (IFbClient)Activator.CreateInstance(t); } @@ -288,13 +280,7 @@ private static TypeBuilder CreateTypeBuilder(string baseName) assemblyName.Name = baseName + "_Assembly"; // We create the dynamic assembly in our current AppDomain - var assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(assemblyName, -#if NET48 - AssemblyBuilderAccess.RunAndSave -#else - AssemblyBuilderAccess.Run -#endif - ); + var assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run); // Generate the actual module (which is the DLL itself) var moduleBuilder = assemblyBuilder.DefineDynamicModule(baseName + "_Module"); diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesArray.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesArray.cs index 1a56bf713..9d8fdcd99 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesArray.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesArray.cs @@ -134,7 +134,7 @@ public override ValueTask GetSliceAsync(int sliceLength, CancellationTok _database.ProcessStatusVector(_statusVector); - return ValueTask2.FromResult(buffer); + return ValueTask.FromResult(buffer); } public override void PutSlice(Array sourceArray, int sliceLength) @@ -205,7 +205,7 @@ public override ValueTask PutSliceAsync(Array sourceArray, int sliceLength, Canc _database.ProcessStatusVector(_statusVector); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } #endregion @@ -520,7 +520,7 @@ protected override ValueTask DecodeSliceAsync(byte[] slice, CancellationT sliceData = tempData; } - return ValueTask2.FromResult(sliceData); + return ValueTask.FromResult(sliceData); } #endregion diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesBlob.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesBlob.cs index b363b5b3e..99022672f 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesBlob.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesBlob.cs @@ -114,7 +114,7 @@ public override ValueTask CreateAsync(CancellationToken cancellationToken = defa RblAddValue(IscCodes.RBL_create); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Open() @@ -157,7 +157,7 @@ public override ValueTask OpenAsync(CancellationToken cancellationToken = defaul _isOpen = true; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override int GetLength() @@ -201,7 +201,7 @@ public override ValueTask GetLengthAsync(CancellationToken cancellationToke var length = IscHelper.VaxInteger(buffer, 1, 2); var size = IscHelper.VaxInteger(buffer, 3, (int)length); - return ValueTask2.FromResult((int)size); + return ValueTask.FromResult((int)size); } public override void GetSegment(Stream stream) @@ -263,7 +263,7 @@ public override ValueTask GetSegmentAsync(Stream stream, CancellationToken cance if (_statusVector[1] == new IntPtr(IscCodes.isc_segstr_eof)) { RblAddValue(IscCodes.RBL_eof_pending); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } else { @@ -279,7 +279,7 @@ public override ValueTask GetSegmentAsync(Stream stream, CancellationToken cance stream.Write(tmp, 0, segmentLength); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override byte[] GetSegment() @@ -348,7 +348,7 @@ public override ValueTask GetSegmentAsync(CancellationToken cancellation if (_statusVector[1] == new IntPtr(IscCodes.isc_segstr_eof)) { RblAddValue(IscCodes.RBL_eof_pending); - return ValueTask2.FromResult(Array.Empty()); + return ValueTask.FromResult(Array.Empty()); } else { @@ -370,7 +370,7 @@ public override ValueTask GetSegmentAsync(CancellationToken cancellation actualSegment = tmp; } - return ValueTask2.FromResult(actualSegment); + return ValueTask.FromResult(actualSegment); } public override void PutSegment(byte[] buffer) @@ -397,7 +397,7 @@ public override ValueTask PutSegmentAsync(byte[] buffer, CancellationToken cance _database.ProcessStatusVector(_statusVector); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Seek(int position, int seekOperation) @@ -428,7 +428,7 @@ public override ValueTask SeekAsync(int position, int seekOperation, Cancellatio _database.ProcessStatusVector(_statusVector); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Close() @@ -447,7 +447,7 @@ public override ValueTask CloseAsync(CancellationToken cancellationToken = defau _database.ProcessStatusVector(_statusVector); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Cancel() @@ -466,7 +466,7 @@ public override ValueTask CancelAsync(CancellationToken cancellationToken = defa _database.ProcessStatusVector(_statusVector); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } #endregion diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesDatabase.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesDatabase.cs index 81ed0ba8a..e9cfdef76 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesDatabase.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesDatabase.cs @@ -102,7 +102,7 @@ public override ValueTask CreateDatabaseAsync(DatabaseParameterBufferBase dpb, s ProcessStatusVector(Charset.DefaultCharset); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void CreateDatabaseWithTrustedAuth(DatabaseParameterBufferBase dpb, string database, byte[] cryptKey) @@ -134,7 +134,7 @@ public override ValueTask DropDatabaseAsync(CancellationToken cancellationToken _handle.Dispose(); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } #endregion @@ -268,7 +268,7 @@ public override ValueTask DetachAsync(CancellationToken cancellationToken = defa _statusVector = null; TransactionCount = 0; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } #endregion @@ -318,7 +318,7 @@ public override ValueTask CancelOperationAsync(short kind, CancellationToken can catch (IscException ex) when (ex.ErrorCode == IscCodes.isc_nothing_to_cancel) { } - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } #endregion @@ -381,7 +381,7 @@ public override ValueTask> GetDatabaseInfoAsync(byte[] items, int b DatabaseInfo(items, buffer, buffer.Length); - return ValueTask2.FromResult(IscHelper.ParseDatabaseInfo(buffer, Charset)); + return ValueTask.FromResult(IscHelper.ParseDatabaseInfo(buffer, Charset)); } #endregion diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesServiceManager.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesServiceManager.cs index 9fec98ec3..74d0af270 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesServiceManager.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesServiceManager.cs @@ -94,7 +94,7 @@ public override ValueTask AttachAsync(ServiceParameterBufferBase spb, string dat Handle = svcHandle; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Detach() @@ -121,7 +121,7 @@ public override ValueTask DetachAsync(CancellationToken cancellationToken = defa Handle = svcHandle; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Start(ServiceParameterBufferBase spb) @@ -156,7 +156,7 @@ public override ValueTask StartAsync(ServiceParameterBufferBase spb, Cancellatio ProcessStatusVector(); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Query(ServiceParameterBufferBase spb, int requestLength, byte[] requestBuffer, int bufferLength, byte[] buffer) @@ -199,7 +199,7 @@ public override ValueTask QueryAsync(ServiceParameterBufferBase spb, int request ProcessStatusVector(); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override ServiceParameterBufferBase CreateServiceParameterBuffer() diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesStatement.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesStatement.cs index 6dc7de2fb..67a86c7cd 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesStatement.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesStatement.cs @@ -184,7 +184,7 @@ public override ArrayBase CreateArray(ArrayDesc descriptor) public override ValueTask CreateArrayAsync(ArrayDesc descriptor, CancellationToken cancellationToken = default) { var array = new FesArray(descriptor); - return ValueTask2.FromResult(array); + return ValueTask.FromResult(array); } public override ArrayBase CreateArray(string tableName, string fieldName) @@ -687,7 +687,7 @@ protected override ValueTask FreeAsync(int option, CancellationToken cancellatio // an execute procedure statement. if (StatementType == DbStatementType.StoredProcedure && option == IscCodes.DSQL_close) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } ClearStatusVector(); @@ -708,7 +708,7 @@ protected override ValueTask FreeAsync(int option, CancellationToken cancellatio _database.ProcessStatusVector(_statusVector); - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } protected override void TransactionUpdated(object sender, EventArgs e) @@ -757,7 +757,7 @@ protected override ValueTask GetSqlInfoAsync(byte[] items, int bufferLen _database.ProcessStatusVector(_statusVector); - return ValueTask2.FromResult(buffer); + return ValueTask.FromResult(buffer); } #endregion diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesTransaction.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesTransaction.cs index 389f70741..9bfc54061 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesTransaction.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesTransaction.cs @@ -229,7 +229,7 @@ public override ValueTask BeginTransactionAsync(TransactionParameterBuffer tpb, } } - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Commit() @@ -264,7 +264,7 @@ public override ValueTask CommitAsync(CancellationToken cancellationToken = defa State = TransactionState.NoTransaction; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Rollback() @@ -299,7 +299,7 @@ public override ValueTask RollbackAsync(CancellationToken cancellationToken = de State = TransactionState.NoTransaction; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void CommitRetaining() @@ -326,7 +326,7 @@ public override ValueTask CommitRetainingAsync(CancellationToken cancellationTok State = TransactionState.Active; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void RollbackRetaining() @@ -353,21 +353,21 @@ public override ValueTask RollbackRetainingAsync(CancellationToken cancellationT State = TransactionState.Active; - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Prepare() { } public override ValueTask PrepareAsync(CancellationToken cancellationToken = default) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override void Prepare(byte[] buffer) { } public override ValueTask PrepareAsync(byte[] buffer, CancellationToken cancellationToken = default) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } public override List GetTransactionInfo(byte[] items) @@ -393,7 +393,7 @@ public override ValueTask> GetTransactionInfoAsync(byte[] items, in TransactionInfo(items, buffer, buffer.Length); - return ValueTask2.FromResult(IscHelper.ParseTransactionInfo(buffer, _database.Charset)); + return ValueTask.FromResult(IscHelper.ParseTransactionInfo(buffer, _database.Charset)); } #endregion diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/BlobStream.cs b/src/FirebirdSql.Data.FirebirdClient/Common/BlobStream.cs index 050873a73..60dd20fe9 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/BlobStream.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/BlobStream.cs @@ -212,12 +212,10 @@ protected override void Dispose(bool disposing) _blobHandle.Close(); } -#if !(NET48 || NETSTANDARD2_0) public override ValueTask DisposeAsync() { return _blobHandle.CloseAsync(); } -#endif private static void ValidateBufferSize(byte[] buffer, int offset, int count) { diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/Charset.cs b/src/FirebirdSql.Data.FirebirdClient/Common/Charset.cs index 55ec3dd19..c8fb48659 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/Charset.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/Charset.cs @@ -113,7 +113,7 @@ public Charset(int id, string name, int bytesPerCharacter, string systemName) switch (SystemName) { case None: - Encoding = Encoding2.Default; + Encoding = Encoding.GetANSIEncoding(); IsNoneCharset = true; break; case Octets: diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/DatabaseBase.cs b/src/FirebirdSql.Data.FirebirdClient/Common/DatabaseBase.cs index 52a810c2d..e118cd7e3 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/DatabaseBase.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/DatabaseBase.cs @@ -28,7 +28,7 @@ internal abstract class DatabaseBase public Action WarningMessage { get; set; } public abstract bool UseUtf8ParameterBuffer { get; } - public Encoding ParameterBufferEncoding => UseUtf8ParameterBuffer ? Encoding.UTF8 : Encoding2.Default; + public Encoding ParameterBufferEncoding => UseUtf8ParameterBuffer ? Encoding.UTF8 : Encoding.GetANSIEncoding(); public abstract int Handle { get; } public Charset Charset { get; } diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/DateTime2.cs b/src/FirebirdSql.Data.FirebirdClient/Common/DateTime2.cs deleted file mode 100644 index 72bdaa5d2..000000000 --- a/src/FirebirdSql.Data.FirebirdClient/Common/DateTime2.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -using System; - -namespace FirebirdSql.Data.Common; - -internal static class DateTime2 -{ - public static DateTime UnixEpoch => -#if NET48 || NETSTANDARD2_0 - new DateTime(621355968000000000); -#else - DateTime.UnixEpoch; -#endif -} diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/DbField.cs b/src/FirebirdSql.Data.FirebirdClient/Common/DbField.cs index 4e0a435af..3be89be74 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/DbField.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/DbField.cs @@ -326,7 +326,7 @@ public void SetValue(byte[] buffer) { var s = Charset.GetString(buffer, 0, buffer.Length); - var runes = s.EnumerateRunesEx().ToList(); + var runes = s.EnumerateRunesToChars().ToList(); if ((Length % Charset.BytesPerCharacter) == 0 && runes.Count > CharCount) { @@ -511,7 +511,7 @@ public void FixNull() case DbDataType.Date: case DbDataType.TimeStamp: - DbValue.SetValue(DateTime2.UnixEpoch); + DbValue.SetValue(DateTime.UnixEpoch); break; case DbDataType.Time: @@ -524,7 +524,7 @@ public void FixNull() case DbDataType.TimeStampTZ: case DbDataType.TimeStampTZEx: - DbValue.SetValue(new FbZonedDateTime(DateTime2.UnixEpoch, TimeZoneMapping.DefaultTimeZoneName)); + DbValue.SetValue(new FbZonedDateTime(DateTime.UnixEpoch, TimeZoneMapping.DefaultTimeZoneName)); break; case DbDataType.TimeTZ: diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/DbValue.cs b/src/FirebirdSql.Data.FirebirdClient/Common/DbValue.cs index 4e2d2e7f2..44b79a0f1 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/DbValue.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/DbValue.cs @@ -352,9 +352,7 @@ public int GetDate() { return _value switch { -#if NET6_0_OR_GREATER DateOnly @do => TypeEncoder.EncodeDate(@do), -#endif _ => TypeEncoder.EncodeDate(GetDateTime()), }; } @@ -365,9 +363,7 @@ public int GetTime() { TimeSpan ts => TypeEncoder.EncodeTime(ts), FbZonedTime zt => TypeEncoder.EncodeTime(zt.Time), -#if NET6_0_OR_GREATER TimeOnly to => TypeEncoder.EncodeTime(to), -#endif _ => TypeEncoder.EncodeTime(TypeHelper.DateTimeTimeToTimeSpan(GetDateTime())), }; } @@ -428,7 +424,7 @@ public byte[] GetBytes() else { var svalue = GetString(); - if ((Field.Length % Field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesEx().Count() > Field.CharCount) + if ((Field.Length % Field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesToChars().Count() > Field.CharCount) { throw IscException.ForErrorCodes(new[] { IscCodes.isc_arith_except, IscCodes.isc_string_truncation }); } @@ -464,7 +460,7 @@ public byte[] GetBytes() else { var svalue = GetString(); - if ((Field.Length % Field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesEx().Count() > Field.CharCount) + if ((Field.Length % Field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesToChars().Count() > Field.CharCount) { throw IscException.ForErrorCodes(new[] { IscCodes.isc_arith_except, IscCodes.isc_string_truncation }); } @@ -643,7 +639,7 @@ public async ValueTask GetBytesAsync(CancellationToken cancellationToken else { var svalue = await GetStringAsync(cancellationToken).ConfigureAwait(false); - if ((Field.Length % Field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesEx().Count() > Field.CharCount) + if ((Field.Length % Field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesToChars().Count() > Field.CharCount) { throw IscException.ForErrorCodes(new[] { IscCodes.isc_arith_except, IscCodes.isc_string_truncation }); } @@ -679,7 +675,7 @@ public async ValueTask GetBytesAsync(CancellationToken cancellationToken else { var svalue = await GetStringAsync(cancellationToken).ConfigureAwait(false); - if ((Field.Length % Field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesEx().Count() > Field.CharCount) + if ((Field.Length % Field.Charset.BytesPerCharacter) == 0 && svalue.EnumerateRunesToChars().Count() > Field.CharCount) { throw IscException.ForErrorCodes(new[] { IscCodes.isc_arith_except, IscCodes.isc_string_truncation }); } @@ -879,7 +875,7 @@ private BlobStream GetBlobStream(long blobId) private ValueTask GetBlobStreamAsync(long blobId, CancellationToken cancellationToken = default) { var blob = _statement.CreateBlob(blobId); - return ValueTask2.FromResult(new BlobStream(blob)); + return ValueTask.FromResult(new BlobStream(blob)); } private Array GetArrayData(long handle) diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/EmptyDescriptorFiller.cs b/src/FirebirdSql.Data.FirebirdClient/Common/EmptyDescriptorFiller.cs index 7a9a658da..cb2468dd0 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/EmptyDescriptorFiller.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/EmptyDescriptorFiller.cs @@ -32,6 +32,6 @@ public void Fill(Descriptor descriptor, int index) public ValueTask FillAsync(Descriptor descriptor, int index, CancellationToken cancellationToken = default) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } } diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/Encoding2.cs b/src/FirebirdSql.Data.FirebirdClient/Common/Encoding2.cs deleted file mode 100644 index 726705610..000000000 --- a/src/FirebirdSql.Data.FirebirdClient/Common/Encoding2.cs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -using System; -using System.Globalization; -using System.Text; - -namespace FirebirdSql.Data.Common; - -internal static class Encoding2 -{ - public static Encoding Default { get; } = GetANSIEncoding(); - - private static Encoding GetANSIEncoding() - { -#if NET48 - return Encoding.Default; -#else - try - { - return Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.ANSICodePage); - } - catch (Exception) - { - return Encoding.Default; - } -#endif - } -} diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/Extensions.cs b/src/FirebirdSql.Data.FirebirdClient/Common/Extensions.cs index 48e2c75fa..6143cc839 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/Extensions.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/Extensions.cs @@ -17,82 +17,89 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; -using System.Net.Sockets; +using System.Text; namespace FirebirdSql.Data.Common; internal static class Extensions { - public static int AsInt(this IntPtr ptr) + extension(IntPtr ptr) { - return (int)ptr.ToInt64(); + public int AsInt() + { + return (int)ptr.ToInt64(); + } } - public static IntPtr ReadIntPtr(this BinaryReader self) + extension(BinaryReader binaryReader) { - if (IntPtr.Size == sizeof(int)) - { - return new IntPtr(self.ReadInt32()); - } - else if (IntPtr.Size == sizeof(long)) + public IntPtr ReadIntPtr() { - return new IntPtr(self.ReadInt64()); + if (IntPtr.Size == sizeof(int)) + { + return new IntPtr(binaryReader.ReadInt32()); + } + else if (IntPtr.Size == sizeof(long)) + { + return new IntPtr(binaryReader.ReadInt64()); + } + else + { + throw new NotSupportedException(); + } } - else + } + + extension(byte[] b) + { + public string ToHexString() { - throw new NotSupportedException(); + return Convert.ToHexString(b); } } - public static string ToHexString(this byte[] b) + extension(T[] array) { -#if NET5_0_OR_GREATER - return Convert.ToHexString(b); -#else - return BitConverter.ToString(b).Replace("-", string.Empty); -#endif + public IEnumerable> Split(int size) + { + for (var i = 0; i < (float)array.Length / size; i++) + { + yield return array.Skip(i * size).Take(size); + } + } } - public static IEnumerable> Split(this T[] array, int size) + extension(string s) { - for (var i = 0; i < (float)array.Length / size; i++) + public IEnumerable EnumerateRunesToChars() { - yield return array.Skip(i * size).Take(size); + if (s == null) + throw new ArgumentNullException(nameof(s)); + + return s.EnumerateRunes().Select(r => + { + var result = new char[r.Utf16SequenceLength]; + r.EncodeToUtf16(result); + return result; + }); } } -#if NETSTANDARD2_0 - public static HashSet ToHashSet(this IEnumerable source) => new HashSet(source); -#endif - - public static IEnumerable EnumerateRunesEx(this string s) + extension(Encoding) { - if (s == null) - throw new ArgumentNullException(nameof(s)); - -#if NETSTANDARD2_0 || NETSTANDARD2_1 || NET48 - for (var i = 0; i < s.Length; i++) + public static Encoding GetANSIEncoding() { - if (char.IsHighSurrogate(s[i]) && i + 1 < s.Length && char.IsLowSurrogate(s[i + 1])) + try { - yield return new[] { s[i], s[i + 1] }; - i++; + return Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.ANSICodePage); } - else + catch (Exception) { - yield return new[] { s[i] }; + return Encoding.Default; } } - -#else - return s.EnumerateRunes().Select(r => - { - var result = new char[r.Utf16SequenceLength]; - r.EncodeToUtf16(result); - return result; - }); -#endif } } diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/ServiceManagerBase.cs b/src/FirebirdSql.Data.FirebirdClient/Common/ServiceManagerBase.cs index 8406730b1..edc5d63c6 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/ServiceManagerBase.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/ServiceManagerBase.cs @@ -27,7 +27,7 @@ internal abstract class ServiceManagerBase public Action WarningMessage { get; set; } public abstract bool UseUtf8ParameterBuffer { get; } - public Encoding ParameterBufferEncoding => UseUtf8ParameterBuffer ? Encoding.UTF8 : Encoding2.Default; + public Encoding ParameterBufferEncoding => UseUtf8ParameterBuffer ? Encoding.UTF8 : Encoding.GetANSIEncoding(); public int Handle { get; protected set; } public Charset Charset { get; } diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/StatementBase.cs b/src/FirebirdSql.Data.FirebirdClient/Common/StatementBase.cs index ff7672b64..14adde0c9 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/StatementBase.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/StatementBase.cs @@ -115,7 +115,7 @@ public virtual void Dispose2() { } public virtual ValueTask Dispose2Async(CancellationToken cancellationToken = default) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } #endregion diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/TransactionBase.cs b/src/FirebirdSql.Data.FirebirdClient/Common/TransactionBase.cs index 0e54a988f..14a017c30 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/TransactionBase.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/TransactionBase.cs @@ -60,7 +60,7 @@ public virtual void Dispose2() { } public virtual ValueTask Dispose2Async(CancellationToken cancellationToken = default) { - return ValueTask2.CompletedTask; + return ValueTask.CompletedTask; } protected void EnsureActiveTransactionState() diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/TypeEncoder.cs b/src/FirebirdSql.Data.FirebirdClient/Common/TypeEncoder.cs index bc6e99b3d..eda0a8058 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/TypeEncoder.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/TypeEncoder.cs @@ -57,12 +57,10 @@ public static int EncodeTime(TimeSpan t) { return (int)(t.Ticks / 1000L); } -#if NET6_0_OR_GREATER public static int EncodeTime(TimeOnly t) { return (int)(t.Ticks / 1000L); } -#endif public static int EncodeDate(DateTime d) { @@ -72,12 +70,10 @@ public static int EncodeDate(DateTime d) var year = calendar.GetYear(d); return EncodeDateImpl(year, month, day); } -#if NET6_0_OR_GREATER public static int EncodeDate(DateOnly d) { return EncodeDateImpl(d.Year, d.Month, d.Day); } -#endif static int EncodeDateImpl(int year, int month, int day) { if (month > 2) diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/TypeHelper.cs b/src/FirebirdSql.Data.FirebirdClient/Common/TypeHelper.cs index 1cbf49feb..f8417b4de 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/TypeHelper.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/TypeHelper.cs @@ -473,18 +473,14 @@ public static FbDbType GetFbDataTypeFromType(Type type) { return FbDbType.Binary; } -#if NET6_0_OR_GREATER else if (type == typeof(System.DateOnly)) { return FbDbType.Date; } -#endif -#if NET6_0_OR_GREATER else if (type == typeof(System.TimeOnly)) { return FbDbType.Time; } -#endif else { throw new ArgumentException($"Unknown type: {type}."); diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/ValueTask2.cs b/src/FirebirdSql.Data.FirebirdClient/Common/ValueTask2.cs deleted file mode 100644 index ca2da7775..000000000 --- a/src/FirebirdSql.Data.FirebirdClient/Common/ValueTask2.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -using System.Threading.Tasks; - -namespace FirebirdSql.Data.Common; - -internal static class ValueTask2 -{ - public static ValueTask FromResult(TResult result) => -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - new ValueTask(result); -#else - ValueTask.FromResult(result); -#endif - - public static ValueTask CompletedTask => -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - default; -#else - ValueTask.CompletedTask; -#endif -} diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchCommand.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchCommand.cs index 9e17669d2..c362a5df3 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchCommand.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchCommand.cs @@ -28,10 +28,7 @@ namespace FirebirdSql.Data.FirebirdClient; -public sealed class FbBatchCommand : IFbPreparedCommand, IDescriptorFiller, IDisposable -#if !(NET48 || NETSTANDARD2_0) - , IAsyncDisposable -#endif +public sealed class FbBatchCommand : IFbPreparedCommand, IDescriptorFiller, IDisposable, IAsyncDisposable { static readonly IFbLogger Log = FbLogManager.CreateLogger(nameof(FbBatchCommand)); @@ -308,7 +305,6 @@ public void Dispose() _namedParameters = null; } } -#if !(NET48 || NETSTANDARD2_0) public async ValueTask DisposeAsync() { if (!_disposed) @@ -337,7 +333,6 @@ public async ValueTask DisposeAsync() _namedParameters = null; } } -#endif #endregion @@ -595,11 +590,7 @@ public async Task ComputeCurrentBatchSizeAsync(CancellationToken cancellati // { // if (_activeReader != null) // { - //#if NET48 || NETSTANDARD2_0 // _activeReader.Dispose(); - //#else - // _activeReader.Dispose(); - //#endif // _activeReader = null; // } // } @@ -607,12 +598,7 @@ public async Task ComputeCurrentBatchSizeAsync(CancellationToken cancellati // { // if (_activeReader != null) // { - //#if NET48 || NETSTANDARD2_0 - // _activeReader.Dispose(); - // await Task.CompletedTask.ConfigureAwait(false); - //#else // await _activeReader.DisposeAsync().ConfigureAwait(false); - //#endif // _activeReader = null; // } // } @@ -745,11 +731,7 @@ internal void CommitImplicitTransaction() { if (_transaction != null) { -#if NET48 || NETSTANDARD2_0 - _transaction.Dispose(); -#else _transaction.Dispose(); -#endif _transaction = null; _implicitTransaction = false; } @@ -779,11 +761,7 @@ internal async Task CommitImplicitTransactionAsync(CancellationToken cancellatio { if (_transaction != null) { -#if NET48 || NETSTANDARD2_0 - _transaction.Dispose(); -#else await _transaction.DisposeAsync().ConfigureAwait(false); -#endif _transaction = null; _implicitTransaction = false; } @@ -815,11 +793,7 @@ internal void RollbackImplicitTransaction() } finally { -#if NET48 || NETSTANDARD2_0 - _transaction.Dispose(); -#else _transaction.Dispose(); -#endif _transaction = null; _implicitTransaction = false; @@ -849,11 +823,7 @@ internal async Task RollbackImplicitTransactionAsync(CancellationToken cancellat } finally { -#if NET48 || NETSTANDARD2_0 - _transaction.Dispose(); -#else await _transaction.DisposeAsync().ConfigureAwait(false); -#endif _transaction = null; _implicitTransaction = false; diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbCommand.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbCommand.cs index c5a2cdea8..f7481171b 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbCommand.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbCommand.cs @@ -383,7 +383,6 @@ protected override void Dispose(bool disposing) } base.Dispose(disposing); } -#if !(NET48 || NETSTANDARD2_0) public override async ValueTask DisposeAsync() { if (!_disposed) @@ -410,7 +409,6 @@ public override async ValueTask DisposeAsync() } await base.DisposeAsync().ConfigureAwait(false); } -#endif #endregion @@ -478,11 +476,7 @@ public override void Prepare() } } } -#if NET48 || NETSTANDARD2_0 - public async Task PrepareAsync(CancellationToken cancellationToken = default) -#else public override async Task PrepareAsync(CancellationToken cancellationToken = default) -#endif { CheckCommand(); @@ -791,11 +785,7 @@ internal void DisposeReader() { if (_activeReader != null) { -#if NET48 || NETSTANDARD2_0 _activeReader.Dispose(); -#else - _activeReader.Dispose(); -#endif _activeReader = null; } } @@ -803,12 +793,7 @@ internal async Task DisposeReaderAsync(CancellationToken cancellationToken = def { if (_activeReader != null) { -#if NET48 || NETSTANDARD2_0 - _activeReader.Dispose(); - await Task.CompletedTask.ConfigureAwait(false); -#else await _activeReader.DisposeAsync().ConfigureAwait(false); -#endif _activeReader = null; } } @@ -941,11 +926,7 @@ internal void CommitImplicitTransaction() { if (_transaction != null) { -#if NET48 || NETSTANDARD2_0 - _transaction.Dispose(); -#else _transaction.Dispose(); -#endif _transaction = null; _implicitTransaction = false; } @@ -975,11 +956,7 @@ internal async Task CommitImplicitTransactionAsync(CancellationToken cancellatio { if (_transaction != null) { -#if NET48 || NETSTANDARD2_0 - _transaction.Dispose(); -#else await _transaction.DisposeAsync().ConfigureAwait(false); -#endif _transaction = null; _implicitTransaction = false; } @@ -1011,11 +988,7 @@ internal void RollbackImplicitTransaction() } finally { -#if NET48 || NETSTANDARD2_0 - _transaction.Dispose(); -#else _transaction.Dispose(); -#endif _transaction = null; _implicitTransaction = false; @@ -1045,11 +1018,7 @@ internal async Task RollbackImplicitTransactionAsync(CancellationToken cancellat } finally { -#if NET48 || NETSTANDARD2_0 - _transaction.Dispose(); -#else await _transaction.DisposeAsync().ConfigureAwait(false); -#endif _transaction = null; _implicitTransaction = false; diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnection.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnection.cs index 14d0c5680..bca335e38 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnection.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnection.cs @@ -315,7 +315,6 @@ protected override void Dispose(bool disposing) } base.Dispose(disposing); } -#if !(NET48 || NETSTANDARD2_0) public override async ValueTask DisposeAsync() { if (!_disposed) @@ -326,7 +325,6 @@ public override async ValueTask DisposeAsync() } await base.DisposeAsync().ConfigureAwait(false); } -#endif #endregion @@ -342,19 +340,11 @@ object ICloneable.Clone() #region Transaction Handling Methods public new FbTransaction BeginTransaction() => BeginTransaction(FbTransaction.DefaultIsolationLevel, null); -#if NET48 || NETSTANDARD2_0 - public Task BeginTransactionAsync(CancellationToken cancellationToken = default) -#else public new Task BeginTransactionAsync(CancellationToken cancellationToken = default) -#endif => BeginTransactionAsync(FbTransaction.DefaultIsolationLevel, null, cancellationToken); public new FbTransaction BeginTransaction(IsolationLevel level) => BeginTransaction(level, null); -#if NET48 || NETSTANDARD2_0 - public Task BeginTransactionAsync(IsolationLevel level, CancellationToken cancellationToken = default) -#else public new Task BeginTransactionAsync(IsolationLevel level, CancellationToken cancellationToken = default) -#endif => BeginTransactionAsync(level, null, cancellationToken); public FbTransaction BeginTransaction(string transactionName) => BeginTransaction(FbTransaction.DefaultIsolationLevel, transactionName); @@ -390,9 +380,7 @@ public Task BeginTransactionAsync(FbTransactionOptions options, s } protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) => BeginTransaction(isolationLevel); -#if !(NET48 || NETSTANDARD2_0) protected override async ValueTask BeginDbTransactionAsync(IsolationLevel isolationLevel, CancellationToken cancellationToken) => await BeginTransactionAsync(isolationLevel, cancellationToken).ConfigureAwait(false); -#endif #endregion @@ -416,11 +404,7 @@ public override DataTable GetSchema() { return GetSchema("MetaDataCollections"); } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public Task GetSchemaAsync(CancellationToken cancellationToken = default) -#else public override Task GetSchemaAsync(CancellationToken cancellationToken = default) -#endif { return GetSchemaAsync("MetaDataCollections", cancellationToken); } @@ -429,11 +413,7 @@ public override DataTable GetSchema(string collectionName) { return GetSchema(collectionName, null); } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public Task GetSchemaAsync(string collectionName, CancellationToken cancellationToken = default) -#else public override Task GetSchemaAsync(string collectionName, CancellationToken cancellationToken = default) -#endif { return GetSchemaAsync(collectionName, null, cancellationToken); } @@ -443,11 +423,7 @@ public override DataTable GetSchema(string collectionName, string[] restrictions return _innerConnection.GetSchema(collectionName, restrictions); } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public Task GetSchemaAsync(string collectionName, string[] restrictions, CancellationToken cancellationToken = default) -#else public override Task GetSchemaAsync(string collectionName, string[] restrictions, CancellationToken cancellationToken = default) -#endif { CheckClosed(); @@ -468,7 +444,6 @@ protected override DbCommand CreateDbCommand() return new FbCommand(null, this); } -#if NET6_0_OR_GREATER public new DbBatch CreateBatch() { throw new NotSupportedException("DbBatch is currently not supported. Use FbBatchCommand instead."); @@ -478,7 +453,6 @@ protected override DbBatch CreateDbBatch() { return CreateBatch(); } -#endif public FbBatchCommand CreateBatchCommand() { @@ -515,11 +489,7 @@ public override void ChangeDatabase(string databaseName) throw FbException.Create(ex); } } -#if NET48 || NETSTANDARD2_0 - public async Task ChangeDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) -#else public override async Task ChangeDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) -#endif { CheckClosed(); @@ -800,11 +770,7 @@ void DisconnectEnlistedHelper() _innerConnection = null; } } -#if NET48 || NETSTANDARD2_0 - public async Task CloseAsync() -#else public override async Task CloseAsync() -#endif { LogMessages.ConnectionClosing(Log, this); diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnectionInternal.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnectionInternal.cs index 2143eacd7..370129b3d 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnectionInternal.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnectionInternal.cs @@ -428,12 +428,7 @@ public async Task DisposeTransactionAsync(CancellationToken cancellationToken = { if (_activeTransaction != null && !IsEnlisted) { -#if NET48 || NETSTANDARD2_0 - _activeTransaction.Dispose(); - await Task.CompletedTask.ConfigureAwait(false); -#else await _activeTransaction.DisposeAsync().ConfigureAwait(false); -#endif _activeTransaction = null; } } @@ -665,50 +660,17 @@ private static string GetProcessName(ConnectionString options) { return options.ApplicationName; } - return GetSystemWebHostingPath() ?? GetRealProcessName() ?? string.Empty; - } - - - private static string GetSystemWebHostingPath() - { -#if NET48 - var assembly = AppDomain.CurrentDomain.GetAssemblies().Where(x => x.GetName().Name.Equals("System.Web", StringComparison.Ordinal)).FirstOrDefault(); - if (assembly == null) - return null; - // showing ApplicationPhysicalPath may be wrong because of connection pooling - // better idea? - return (string)assembly.GetType("System.Web.Hosting.HostingEnvironment").GetProperty("ApplicationPhysicalPath").GetValue(null, null); -#else - return null; -#endif + return GetRealProcessName() ?? string.Empty; } private static string GetRealProcessName() { - static string FromProcess() - { - try - { - return Process.GetCurrentProcess().MainModule.FileName; - } - catch (InvalidOperationException) - { - return null; - } - } - return Assembly.GetEntryAssembly()?.Location ?? FromProcess(); + return Assembly.GetEntryAssembly()?.Location ?? Environment.ProcessPath; } private static int GetProcessId() { - try - { - return Process.GetCurrentProcess().Id; - } - catch (InvalidOperationException) - { - return -1; - } + return Environment.ProcessId; } private static string GetClientVersion() diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbDataReader.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbDataReader.cs index de8cebb2e..0cf1d40c4 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbDataReader.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbDataReader.cs @@ -170,11 +170,7 @@ public override void Close() _fields = null; } } -#if NET48 || NETSTANDARD2_0 - public async Task CloseAsync() -#else public override async Task CloseAsync() -#endif { if (!IsClosed) { @@ -211,13 +207,11 @@ protected override void Dispose(bool disposing) Close(); } } -#if !(NET48 || NETSTANDARD2_0) public override async ValueTask DisposeAsync() { await CloseAsync().ConfigureAwait(false); await base.DisposeAsync().ConfigureAwait(false); } -#endif public override bool Read() { @@ -331,11 +325,7 @@ public override DataTable GetSchemaTable() } finally { -#if NET48 || NETSTANDARD2_0 reader.Dispose(); -#else - reader.Dispose(); -#endif } /* Create new row for the Schema Table */ @@ -393,20 +383,12 @@ public override DataTable GetSchemaTable() } finally { -#if NET48 || NETSTANDARD2_0 - schemaCmd.Dispose(); -#else schemaCmd.Dispose(); -#endif } return _schemaTable; } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public async Task GetSchemaTableAsync(CancellationToken cancellationToken = default) -#else public override async Task GetSchemaTableAsync(CancellationToken cancellationToken = default) -#endif { CheckState(); @@ -457,11 +439,7 @@ public override async Task GetSchemaTableAsync(CancellationToken canc } finally { -#if NET48 || NETSTANDARD2_0 - reader.Dispose(); -#else await reader.DisposeAsync().ConfigureAwait(false); -#endif } /* Create new row for the Schema Table */ @@ -519,11 +497,7 @@ public override async Task GetSchemaTableAsync(CancellationToken canc } finally { -#if NET48 || NETSTANDARD2_0 - schemaCmd.Dispose(); -#else await schemaCmd.DisposeAsync().ConfigureAwait(false); -#endif } return _schemaTable; @@ -701,18 +675,14 @@ public override T GetFieldValue(int i) { return (T)(object)_row[i].GetZonedTime(); } -#if NET6_0_OR_GREATER else if (type == typeof(DateOnly)) { return (T)(object)DateOnly.FromDateTime(_row[i].GetDateTime()); } -#endif -#if NET6_0_OR_GREATER else if (type == typeof(TimeOnly)) { return (T)(object)TimeOnly.FromTimeSpan(_row[i].GetTimeSpan()); } -#endif else { return (T)_row[i].GetValue(); @@ -806,18 +776,14 @@ public override async Task GetFieldValueAsync(int i, CancellationToken can { return (T)(object)_row[i].GetZonedTime(); } -#if NET6_0_OR_GREATER else if (type == typeof(DateOnly)) { return (T)(object)DateOnly.FromDateTime(_row[i].GetDateTime()); } -#endif -#if NET6_0_OR_GREATER else if (type == typeof(TimeOnly)) { return (T)(object)TimeOnly.FromTimeSpan(_row[i].GetTimeSpan()); } -#endif else { return (T)await _row[i].GetValueAsync().ConfigureAwait(false); diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbException.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbException.cs index c009f8006..43afc4ce0 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbException.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbException.cs @@ -18,25 +18,15 @@ using System; using System.ComponentModel; using System.Data.Common; -using System.Runtime.Serialization; using FirebirdSql.Data.Common; namespace FirebirdSql.Data.FirebirdClient; -#if !NET8_0_OR_GREATER -[Serializable] -#endif public sealed class FbException : DbException { - #region Fields - private FbErrorCollection _errors; - #endregion - - #region Properties - [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public FbErrorCollection Errors => _errors ??= new FbErrorCollection(); @@ -44,39 +34,10 @@ public sealed class FbException : DbException public string SQLSTATE => (InnerException as IscException)?.SQLSTATE; - #endregion - - #region Constructors - private FbException(string message, Exception innerException) : base(message, innerException) { } -#if !NET8_0_OR_GREATER - private FbException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - _errors = (FbErrorCollection)info.GetValue("errors", typeof(FbErrorCollection)); - } -#endif - - #endregion - - #region Methods - -#if !NET8_0_OR_GREATER - public override void GetObjectData(SerializationInfo info, StreamingContext context) - { - base.GetObjectData(info, context); - - info.AddValue("errors", _errors); - } -#endif - - #endregion - - #region Private Methods - private void ProcessIscExceptionErrors(IscException innerException) { foreach (var error in innerException.Errors) @@ -85,8 +46,6 @@ private void ProcessIscExceptionErrors(IscException innerException) } } - #endregion - internal static Exception Create(string message) => Create(message, null); internal static Exception Create(Exception innerException) => Create(null, innerException); internal static Exception Create(string message, Exception innerException) diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbRemoteEvent.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbRemoteEvent.cs index 49cdb723a..092b77e62 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbRemoteEvent.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbRemoteEvent.cs @@ -23,10 +23,7 @@ namespace FirebirdSql.Data.FirebirdClient; -public sealed class FbRemoteEvent : IDisposable -#if !(NET48 || NETSTANDARD2_0) - , IAsyncDisposable -#endif +public sealed class FbRemoteEvent : IDisposable, IAsyncDisposable { private FbConnectionInternal _connection; private RemoteEvent _revent; @@ -70,12 +67,10 @@ public void Dispose() { _connection.Disconnect(); } -#if !(NET48 || NETSTANDARD2_0) public ValueTask DisposeAsync() { return new ValueTask(_connection.DisconnectAsync(CancellationToken.None)); } -#endif public void QueueEvents(ICollection events) { diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbTransaction.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbTransaction.cs index 4e5f0244e..0b58f048f 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbTransaction.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbTransaction.cs @@ -64,12 +64,10 @@ protected override DbConnection DbConnection get { return _connection; } } -#if !(NET48 || NETSTANDARD2_0 || NETSTANDARD2_1) public override bool SupportsSavepoints { get { return true; } } -#endif #endregion @@ -114,7 +112,6 @@ protected override void Dispose(bool disposing) } base.Dispose(disposing); } -#if !(NET48 || NETSTANDARD2_0) public override async ValueTask DisposeAsync() { if (!_disposed) @@ -140,7 +137,6 @@ public override async ValueTask DisposeAsync() } await base.DisposeAsync().ConfigureAwait(false); } -#endif #endregion @@ -163,11 +159,7 @@ public override void Commit() LogMessages.TransactionCommitted(Log, this); } -#if NET48 || NETSTANDARD2_0 - public async Task CommitAsync(CancellationToken cancellationToken = default) -#else public override async Task CommitAsync(CancellationToken cancellationToken = default) -#endif { LogMessages.TransactionCommitting(Log, this); @@ -202,11 +194,7 @@ public override void Rollback() LogMessages.TransactionRolledBack(Log, this); } -#if NET48 || NETSTANDARD2_0 - public async Task RollbackAsync(CancellationToken cancellationToken = default) -#else public override async Task RollbackAsync(CancellationToken cancellationToken = default) -#endif { LogMessages.TransactionRollingBack(Log, this); @@ -224,11 +212,7 @@ public override async Task RollbackAsync(CancellationToken cancellationToken = d LogMessages.TransactionRolledBack(Log, this); } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public void Save(string savePointName) -#else public override void Save(string savePointName) -#endif { LogMessages.TransactionSaving(Log, this); @@ -237,11 +221,7 @@ public override void Save(string savePointName) try { var command = new FbCommand($"SAVEPOINT {savePointName}", _connection, this); -#if NET48 || NETSTANDARD2_0 using (command) -#else - using (command) -#endif { command.ExecuteNonQuery(); } @@ -253,11 +233,7 @@ public override void Save(string savePointName) LogMessages.TransactionSaved(Log, this); } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public async Task SaveAsync(string savePointName, CancellationToken cancellationToken = default) -#else public override async Task SaveAsync(string savePointName, CancellationToken cancellationToken = default) -#endif { LogMessages.TransactionSaving(Log, this); @@ -266,11 +242,7 @@ public override async Task SaveAsync(string savePointName, CancellationToken can try { var command = new FbCommand($"SAVEPOINT {savePointName}", _connection, this); -#if NET48 || NETSTANDARD2_0 - using (command) -#else await using (command.ConfigureAwait(false)) -#endif { await command.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false); } @@ -283,11 +255,7 @@ public override async Task SaveAsync(string savePointName, CancellationToken can LogMessages.TransactionSaved(Log, this); } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public void Release(string savePointName) -#else public override void Release(string savePointName) -#endif { LogMessages.TransactionReleasingSavepoint(Log, this); @@ -296,11 +264,7 @@ public override void Release(string savePointName) try { var command = new FbCommand($"RELEASE SAVEPOINT {savePointName}", _connection, this); -#if NET48 || NETSTANDARD2_0 - using (command) -#else using (command) -#endif { command.ExecuteNonQuery(); } @@ -312,11 +276,7 @@ public override void Release(string savePointName) LogMessages.TransactionReleasedSavepoint(Log, this); } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public async Task ReleaseAsync(string savePointName, CancellationToken cancellationToken = default) -#else public override async Task ReleaseAsync(string savePointName, CancellationToken cancellationToken = default) -#endif { LogMessages.TransactionReleasingSavepoint(Log, this); @@ -325,11 +285,7 @@ public override async Task ReleaseAsync(string savePointName, CancellationToken try { var command = new FbCommand($"RELEASE SAVEPOINT {savePointName}", _connection, this); -#if NET48 || NETSTANDARD2_0 - using (command) -#else await using (command.ConfigureAwait(false)) -#endif { await command.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false); } @@ -342,11 +298,7 @@ public override async Task ReleaseAsync(string savePointName, CancellationToken LogMessages.TransactionReleasedSavepoint(Log, this); } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public void Rollback(string savePointName) -#else public override void Rollback(string savePointName) -#endif { LogMessages.TransactionRollingBackSavepoint(Log, this); @@ -355,11 +307,7 @@ public override void Rollback(string savePointName) try { var command = new FbCommand($"ROLLBACK WORK TO SAVEPOINT {savePointName}", _connection, this); -#if NET48 || NETSTANDARD2_0 - using (command) -#else using (command) -#endif { command.ExecuteNonQuery(); } @@ -371,11 +319,7 @@ public override void Rollback(string savePointName) LogMessages.TransactionRolledBackSavepoint(Log, this); } -#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1 - public async Task RollbackAsync(string savePointName, CancellationToken cancellationToken = default) -#else public override async Task RollbackAsync(string savePointName, CancellationToken cancellationToken = default) -#endif { LogMessages.TransactionRollingBackSavepoint(Log, this); @@ -384,11 +328,7 @@ public override async Task RollbackAsync(string savePointName, CancellationToken try { var command = new FbCommand($"ROLLBACK WORK TO SAVEPOINT {savePointName}", _connection, this); -#if NET48 || NETSTANDARD2_0 - using (command) -#else await using (command.ConfigureAwait(false)) -#endif { await command.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false); } diff --git a/src/FirebirdSql.Data.FirebirdClient/Isql/FbBatchExecution.cs b/src/FirebirdSql.Data.FirebirdClient/Isql/FbBatchExecution.cs index 3a7edc262..c8068480b 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Isql/FbBatchExecution.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Isql/FbBatchExecution.cs @@ -219,11 +219,7 @@ public void Execute(bool autoCommit = true) } finally { -#if NET48 || NETSTANDARD2_0 dataReader.Dispose(); -#else - dataReader.Dispose(); -#endif } break; @@ -470,11 +466,7 @@ public async Task ExecuteAsync(bool autoCommit = true, CancellationToken cancell } finally { -#if NET48 || NETSTANDARD2_0 - dataReader.Dispose(); -#else await dataReader.DisposeAsync().ConfigureAwait(false); -#endif } break; @@ -1002,11 +994,7 @@ private void CommitTransaction() if (_sqlTransaction != null) { _sqlTransaction.Commit(); -#if NET48 || NETSTANDARD2_0 _sqlTransaction.Dispose(); -#else - _sqlTransaction.Dispose(); -#endif _sqlTransaction = null; } } @@ -1015,11 +1003,7 @@ private async Task CommitTransactionAsync(CancellationToken cancellationToken = if (_sqlTransaction != null) { await _sqlTransaction.CommitAsync(cancellationToken).ConfigureAwait(false); -#if NET48 || NETSTANDARD2_0 - _sqlTransaction.Dispose(); -#else await _sqlTransaction.DisposeAsync().ConfigureAwait(false); -#endif _sqlTransaction = null; } } @@ -1029,11 +1013,7 @@ private void RollbackTransaction() if (_sqlTransaction != null) { _sqlTransaction.Rollback(); -#if NET48 || NETSTANDARD2_0 _sqlTransaction.Dispose(); -#else - _sqlTransaction.Dispose(); -#endif _sqlTransaction = null; } } @@ -1042,11 +1022,7 @@ private async Task RollbackTransactionAsync(CancellationToken cancellationToken if (_sqlTransaction != null) { await _sqlTransaction.RollbackAsync(cancellationToken).ConfigureAwait(false); -#if NET48 || NETSTANDARD2_0 - _sqlTransaction.Dispose(); -#else await _sqlTransaction.DisposeAsync().ConfigureAwait(false); -#endif _sqlTransaction = null; } } @@ -1070,23 +1046,14 @@ private void DisposeCommand() { if (_sqlCommand != null) { -#if NET48 || NETSTANDARD2_0 _sqlCommand.Dispose(); -#else - _sqlCommand.Dispose(); -#endif } } private async Task DisposeCommandAsync(CancellationToken cancellationToken = default) { if (_sqlCommand != null) { -#if NET48 || NETSTANDARD2_0 - _sqlCommand.Dispose(); - await Task.CompletedTask.ConfigureAwait(false); -#else await _sqlCommand.DisposeAsync().ConfigureAwait(false); -#endif } } diff --git a/src/FirebirdSql.Data.FirebirdClient/Schema/FbSchema.cs b/src/FirebirdSql.Data.FirebirdClient/Schema/FbSchema.cs index 9fa348adc..9cfe7c967 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Schema/FbSchema.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Schema/FbSchema.cs @@ -57,11 +57,7 @@ public DataTable GetSchema(FbConnection connection, string collectionName, strin } finally { -#if NET48 || NETSTANDARD2_0 command.Dispose(); -#else - command.Dispose(); -#endif } TrimStringFields(dataTable); ProcessResult(dataTable); @@ -87,12 +83,7 @@ public async Task GetSchemaAsync(FbConnection connection, string coll } finally { -#if NET48 || NETSTANDARD2_0 - command.Dispose(); - await Task.CompletedTask.ConfigureAwait(false); -#else await command.DisposeAsync().ConfigureAwait(false); -#endif } TrimStringFields(dataTable); ProcessResult(dataTable); From b553419af7c849eba5fdf5ba2ac39fc4ae5c15ee Mon Sep 17 00:00:00 2001 From: Niek <32094562+niekschoemaker@users.noreply.github.com> Date: Tue, 9 Dec 2025 10:35:54 +0100 Subject: [PATCH 09/39] Update to efcore and .net 10 (#1245) --- .../ComplianceFbTest.cs | 35 +- ...meworkCore.Firebird.FunctionalTests.csproj | 4 +- .../Helpers/ModelHelpers.cs | 5 +- .../MigrationsFbTest.cs | 21 + .../Query/AdHocAdvancedMappingsQueryFbTest.cs | 3 +- .../Query/AdHocComplexTypeQueryFbTest.cs | 12 +- .../Query/AdHocManyToManyQueryFbTest.cs | 3 +- .../Query/AdHocMiscellaneousQueryFbTest.cs | 18 +- .../Query/AdHocNavigationsQueryFbTest.cs | 2 +- .../Query/AdHocQueryFiltersQueryFbTest.cs | 3 +- .../Query/AdHocQuerySplittingQueryFbTest.cs | 2 +- .../ComplexTableSplittingBulkUpdateFbTest.cs | 32 + .../ComplexTableSplittingFbFixture.cs | 28 + ...omplexTableSplittingMiscellaneousFbTest.cs | 30 + .../ComplexTableSplittingProjectionFbTest.cs | 50 ++ ...xTableSplittingStructuralEqualityFbTest.cs | 30 + .../NavigationsCollectionFbTest.cs | 46 + .../Navigations/NavigationsFbFixture.cs | 28 + .../Navigations/NavigationsIncludeFbTest.cs | 30 + .../NavigationsMiscellaneousFbTest.cs | 30 + .../NavigationsPrimitiveCollectionFbTest.cs | 68 ++ .../NavigationsProjectionFbTest.cs | 55 ++ .../NavigationsSetOperationsFbTest.cs | 30 + .../NavigationsStructuralEqualityFbTest.cs | 13 + .../OwnedNavigationsCollectionFbTest.cs | 45 + .../OwnedNavigationsFbFixture.cs | 37 + .../OwnedNavigationsMiscellaneousFbTest.cs | 30 + .../OwnedNavigationsProjectionFbTest.cs | 55 ++ .../OwnedNavigationsSetOperationsFbTest.cs | 41 + ...wnedNavigationsStructuralEqualityFbTest.cs | 30 + .../OwnedTableSplittingFbFixture.cs | 73 ++ .../OwnedTableSplittingMiscellaneousFbTest.cs | 30 + .../OwnedTableSplittingProjectionFbTest.cs | 55 ++ ...dTableSplittingStructuralEqualityFbTest.cs | 30 + .../Query/ComplexTypeQueryFbTest.cs | 14 - .../Query/EntitySplittingQueryFbTest.cs | 3 +- .../Query/FromSqlQueryFbTest.cs | 12 +- .../Query/GearsOfWarQueryFbTest.cs | 175 ---- ...onSharedPrimitiveCollectionsQueryFbTest.cs | 59 +- .../Query/NorthwindFunctionsQueryFbTest.cs | 279 ------ .../NorthwindMiscellaneousQueryFbTest.cs | 14 + .../NorthwindSetOperationsQueryFbTest.cs | 18 + .../Query/NorthwindWhereQueryFbTest.cs | 58 -- .../Query/OperatorsProceduralFbTest.cs | 3 +- .../Query/OperatorsQueryFbTest.cs | 13 +- .../Query/OwnedEntityQueryFbTest.cs | 3 +- .../Query/PrimitiveCollectionsQueryFbTest.cs | 842 +++++++----------- .../Query/SharedTypeQueryFbTest.cs | 3 +- .../Query/SqlQueryFbTest.cs | 15 +- .../Query/TPCGearsOfWarQueryFbTest.cs | 224 ----- .../Query/TPTGearsOfWarQueryFbTest.cs | 126 --- .../Query/ToSqlQueryFbTest.cs | 2 +- .../Translations/BasicTypesQueryFbFixture.cs | 100 +++ .../ByteArrayTranslationsFbTest.cs | 45 + .../Translations/EnumTranslationsFbTest.cs | 38 + .../Translations/GuidTranslationsFbTest.cs | 31 + .../Translations/MathTranslationsFbTest.cs | 222 +++++ .../MiscellaneousTranslationsFbTest.cs | 85 ++ .../ArithmeticOperatorTranslationsFbTest.cs | 32 + .../BitwiseOperatorTranslationsFbTest.cs | 42 + .../ComparisonOperatorTranslationsFbTest.cs | 32 + .../LogicalOperatorTranslationsFbTest.cs | 32 + ...MiscellaneousOperatorTranslationsFbTest.cs | 32 + .../Translations/StringTranslationsFbTest.cs | 196 ++++ .../Temporal/DateOnlyTranslationsFbTest.cs | 77 ++ .../DateTimeOffsetTranslationsFbTest.cs | 139 +++ .../Temporal/DateTimeTranslationsFbTest.cs | 55 ++ .../Temporal/TimeOnlyTranslationsFbTest.cs | 65 ++ .../Temporal/TimeSpanTranslationsFbTest.cs | 49 + .../TestUtilities/FbTestStore.cs | 8 + .../Query/Internal/FbQueryRootProcessor.cs | 2 +- src/Versions.props | 2 +- 72 files changed, 2679 insertions(+), 1472 deletions(-) create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingFbFixture.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsFbFixture.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsFbFixture.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingFbFixture.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/BasicTypesQueryFbFixture.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs index 1f2493f63..314348d3d 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs @@ -28,6 +28,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.ApiConsistencyTestBase<>), typeof(Microsoft.EntityFrameworkCore.BadDataJsonDeserializationTestBase), typeof(Microsoft.EntityFrameworkCore.BuiltInDataTypesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.ComplexTypesTrackingRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.ComplexTypesTrackingTestBase<>), typeof(Microsoft.EntityFrameworkCore.CompositeKeyEndToEndTestBase<>), typeof(Microsoft.EntityFrameworkCore.ConcurrencyDetectorDisabledTestBase<>), @@ -47,6 +48,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.InterceptionTestBase), typeof(Microsoft.EntityFrameworkCore.JsonTypesTestBase), typeof(Microsoft.EntityFrameworkCore.KeysWithConvertersTestBase<>), + typeof(Microsoft.EntityFrameworkCore.LazyLoadProxyRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.LazyLoadProxyTestBase<>), typeof(Microsoft.EntityFrameworkCore.LoadTestBase<>), typeof(Microsoft.EntityFrameworkCore.LoggingTestBase), @@ -60,6 +62,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.NotificationEntitiesTestBase<>), typeof(Microsoft.EntityFrameworkCore.OptimisticConcurrencyTestBase<,>), typeof(Microsoft.EntityFrameworkCore.OverzealousInitializationTestBase<>), + typeof(Microsoft.EntityFrameworkCore.PropertyValuesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.PropertyValuesTestBase<>), typeof(Microsoft.EntityFrameworkCore.QueryExpressionInterceptionTestBase), typeof(Microsoft.EntityFrameworkCore.AdHocManyToManyQueryTestBase), @@ -92,6 +95,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.TransactionTestBase<>), typeof(Microsoft.EntityFrameworkCore.TwoDatabasesTestBase), + typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.ComplexCollectionTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.ComplexTypeTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.ModelBuilderTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.InheritanceTestBase), @@ -102,6 +106,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.OneToOneTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.OwnedTypesTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalNonRelationshipTestBase), + typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalComplexCollectionTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalComplexTypeTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalInheritanceTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalOneToManyTestBase), @@ -111,12 +116,10 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalOwnedTypesTestBase), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.BulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.ComplexTypeBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.FiltersInheritanceBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.InheritanceBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NonSharedModelBulkUpdatesTestBase), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NorthwindBulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.ComplexTypeBulkUpdatesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.FiltersInheritanceBulkUpdatesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.InheritanceBulkUpdatesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NonSharedModelBulkUpdatesRelationalTestBase), @@ -127,6 +130,7 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.BulkUpdates.TPTFiltersInheritanceBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.TPTInheritanceBulkUpdatesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Update.ComplexCollectionJsonUpdateTestBase<>), typeof(Microsoft.EntityFrameworkCore.Update.JsonUpdateTestBase<>), typeof(Microsoft.EntityFrameworkCore.Update.NonSharedModelUpdatesTestBase), typeof(Microsoft.EntityFrameworkCore.Update.StoredProcedureUpdateTestBase), @@ -142,7 +146,21 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian // JSON not supported on FB typeof(Microsoft.EntityFrameworkCore.Query.JsonQueryTestBase<>), typeof(Microsoft.EntityFrameworkCore.Query.JsonQueryRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.AdHocJsonQueryRelationalTestBase), typeof(Microsoft.EntityFrameworkCore.Query.AdHocJsonQueryTestBase), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonBulkUpdateRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonMiscellaneousRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonPrimitiveCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonProjectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonSetOperationsRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonStructuralEqualityRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonBulkUpdateRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonMiscellaneousRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonPrimitiveCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonProjectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonStructuralEqualityRelationalTestBase<>), // Spatial not supported on FB typeof(Microsoft.EntityFrameworkCore.Query.SpatialQueryTestBase<>), @@ -152,6 +170,19 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.Query.AdHocPrecompiledQueryRelationalTestBase), typeof(Microsoft.EntityFrameworkCore.Query.PrecompiledQueryRelationalTestBase), typeof(Microsoft.EntityFrameworkCore.Query.PrecompiledSqlPregenerationQueryRelationalTestBase), + + // Tests for JSON Types in queries + typeof(Microsoft.EntityFrameworkCore.Types.RelationalTypeTestBase<,>), + typeof(Microsoft.EntityFrameworkCore.Types.TypeTestBase<,>), + + // Uses Complex Types with collections (JSON Arrays) + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexProperties.ComplexPropertiesPrimitiveCollectionTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexProperties.ComplexPropertiesCollectionTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexProperties.ComplexPropertiesSetOperationsTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting.ComplexTableSplittingPrimitiveCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations.OwnedNavigationsPrimitiveCollectionTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations.OwnedNavigationsPrimitiveCollectionRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting.OwnedTableSplittingPrimitiveCollectionRelationalTestBase<>), ]; protected override Assembly TargetAssembly { get; } = typeof(ComplianceFbTest).Assembly; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj index e22c6ae10..076c11266 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/ModelHelpers.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/ModelHelpers.cs index 96fc88b6b..235265b98 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/ModelHelpers.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/ModelHelpers.cs @@ -76,10 +76,11 @@ string Simplify(string name) { name = new string(name.Where(char.IsUpper).ToArray()); var cnt = 1; - while (names.Contains(name)) + while (names.Contains(name + cnt)) { - name += cnt++; + cnt++; } + name += cnt; names.Add(name); return name; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs index 0b2be24b1..d1d059939 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs @@ -275,6 +275,27 @@ public MigrationsFbTest(MigrationsFbFixture fixture) [Fact(Skip = SkipReason)] public override Task UpdateDataOperation_composite_key() => base.UpdateDataOperation_composite_key(); + [Fact(Skip = SkipReason)] + public override Task Create_table_with_complex_properties_mapped_to_json() => base.Create_table_with_complex_properties_mapped_to_json(); + + [Fact(Skip = SkipReason)] + public override Task Create_table_with_complex_properties_with_nested_collection_mapped_to_json() => base.Create_table_with_complex_properties_with_nested_collection_mapped_to_json(); + + [Fact(Skip = SkipReason)] + public override Task Create_table_with_optional_complex_type_with_required_properties() => base.Create_table_with_optional_complex_type_with_required_properties(); + + [Fact(Skip = SkipReason)] + public override Task Multiop_create_table_and_drop_it_in_one_migration() => base.Multiop_create_table_and_drop_it_in_one_migration(); + + [Fact(Skip = SkipReason)] + public override Task Multiop_drop_table_and_create_the_same_table_in_one_migration() => base.Multiop_drop_table_and_create_the_same_table_in_one_migration(); + + [Fact(Skip = SkipReason)] + public override Task Multiop_rename_table_and_create_new_table_with_the_old_name() => base.Multiop_rename_table_and_create_new_table_with_the_old_name(); + + [Fact(Skip = SkipReason)] + public override Task Multiop_rename_table_and_drop() => base.Multiop_rename_table_and_drop(); + [Fact(Skip = SkipReason)] public override Task UpdateDataOperation_multiple_columns() => base.UpdateDataOperation_multiple_columns(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs index f18e24d8a..a0d735c56 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocAdvancedMappingsQueryFbTest : AdHocAdvancedMappingsQueryRelationalTestBase +public class AdHocAdvancedMappingsQueryFbTest(NonSharedFixture fixture) : AdHocAdvancedMappingsQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs index e8a58d4a4..fd4837ac8 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs @@ -15,13 +15,23 @@ //$Authors = Jiri Cincura (jiri@cincura.net) +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocComplexTypeQueryFbTest : AdHocComplexTypeQueryTestBase +public class AdHocComplexTypeQueryFbTest(NonSharedFixture fixture) : AdHocComplexTypeQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + + // Uses a custom type mapping DateTime to "datetime" which doesn't exist in Firebird. + [NotSupportedByProviderFact] + public override Task Complex_type_equality_with_non_default_type_mapping() + { + return base.Complex_type_equality_with_non_default_type_mapping(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs index d091978f5..14c72269f 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocManyToManyQueryFbTest : AdHocManyToManyQueryRelationalTestBase +public class AdHocManyToManyQueryFbTest(NonSharedFixture fixture) : AdHocManyToManyQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs index 1acdeedb5..5ee227890 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs @@ -19,17 +19,26 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using FirebirdSql.EntityFrameworkCore.Firebird.Infrastructure; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocMiscellaneousQueryFbTest : AdHocMiscellaneousQueryRelationalTestBase +public class AdHocMiscellaneousQueryFbTest(NonSharedFixture fixture) : AdHocMiscellaneousQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override DbContextOptionsBuilder SetParameterizedCollectionMode(DbContextOptionsBuilder optionsBuilder, + ParameterTranslationMode parameterizedCollectionMode) + { + new FbDbContextOptionsBuilder(optionsBuilder).UseParameterizedCollectionMode(parameterizedCollectionMode); + return optionsBuilder; + } + [DoesNotHaveTheDataTheory] [MemberData(nameof(IsAsyncData))] public override Task StoreType_for_UDF_used(bool async) @@ -78,6 +87,13 @@ public override Task Operators_combine_nullability_of_entity_shapers() return base.Operators_combine_nullability_of_entity_shapers(); } + [NotSupportedByProviderTheory] + [MemberData(nameof(InlinedRedactingData))] + public override Task Check_inlined_constants_redacting(bool async, bool enableSensitiveDataLogging) + { + return base.Check_inlined_constants_redacting(async, enableSensitiveDataLogging); + } + protected override async Task Seed2951(Context2951 context) { await context.Database.ExecuteSqlRawAsync("""CREATE TABLE "ZeroKey" ("Id" INT)"""); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs index 6ceedbf87..baee85ccf 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs @@ -26,7 +26,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocNavigationsQueryFbTest : AdHocNavigationsQueryRelationalTestBase +public class AdHocNavigationsQueryFbTest(NonSharedFixture fixture) : AdHocNavigationsQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs index 24a64585c..c354e5a82 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs @@ -17,13 +17,14 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocQueryFiltersQueryFbTest : AdHocQueryFiltersQueryRelationalTestBase +public class AdHocQueryFiltersQueryFbTest(NonSharedFixture fixture) : AdHocQueryFiltersQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs index c08ae53aa..53a6213e5 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs @@ -28,7 +28,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class AdHocQuerySplittingQueryFbTest : AdHocQuerySplittingQueryTestBase +public class AdHocQuerySplittingQueryFbTest(NonSharedFixture fixture) : AdHocQuerySplittingQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs new file mode 100644 index 000000000..2fa121910 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingBulkUpdateFbTest(ComplexTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : ComplexTableSplittingBulkUpdateRelationalTestBase(fixture, testOutputHelper) +{ + [NotSupportedByProviderFact] + public override Task Update_inside_primitive_collection() + { + return base.Update_inside_primitive_collection(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingFbFixture.cs new file mode 100644 index 000000000..29f45bc38 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingFbFixture.cs @@ -0,0 +1,28 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingFbFixture : ComplexTableSplittingRelationalFixtureBase +{ + protected override ITestStoreFactory TestStoreFactory + => FbTestStoreFactory.Instance; +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs new file mode 100644 index 000000000..5f71c34f3 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingMiscellaneousFbTest : ComplexTableSplittingMiscellaneousRelationalTestBase +{ + public ComplexTableSplittingMiscellaneousFbTest(ComplexTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs new file mode 100644 index 000000000..ddc8fbfdc --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs @@ -0,0 +1,50 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingProjectionFbTest : ComplexTableSplittingProjectionRelationalTestBase +{ + public ComplexTableSplittingProjectionFbTest(ComplexTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + // Users OUTER join + [NotSupportedByProviderTheory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_optional_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + return base.Select_subquery_optional_related_FirstOrDefault(queryTrackingBehavior); + } + + // Users OUTER join + [NotSupportedByProviderTheory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs new file mode 100644 index 000000000..6638c2660 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; + +public class ComplexTableSplittingStructuralEqualityFbTest : ComplexTableSplittingStructuralEqualityRelationalTestBase +{ + public ComplexTableSplittingStructuralEqualityFbTest(ComplexTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs new file mode 100644 index 000000000..513ddcd84 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs @@ -0,0 +1,46 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsCollectionFbTest : NavigationsCollectionRelationalTestBase +{ + public NavigationsCollectionFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, + testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Distinct_projected(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Distinct_projected(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsFbFixture.cs new file mode 100644 index 000000000..dd5f7207d --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsFbFixture.cs @@ -0,0 +1,28 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsFbFixture : NavigationsRelationalFixtureBase +{ + protected override ITestStoreFactory TestStoreFactory + => FbTestStoreFactory.Instance; +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs new file mode 100644 index 000000000..df99d7d47 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsIncludeFbTest : NavigationsIncludeRelationalTestBase +{ + public NavigationsIncludeFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs new file mode 100644 index 000000000..c2321831e --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsMiscellaneousFbTest : NavigationsMiscellaneousRelationalTestBase +{ + public NavigationsMiscellaneousFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs new file mode 100644 index 000000000..ffad14298 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs @@ -0,0 +1,68 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsPrimitiveCollectionFbTest : NavigationsPrimitiveCollectionRelationalTestBase +{ + public NavigationsPrimitiveCollectionFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task Any_predicate() + { + return base.Any_predicate(); + } + + [NotSupportedByProviderFact] + public override Task Contains() + { + return base.Contains(); + } + + [NotSupportedByProviderFact] + public override Task Count() + { + return base.Count(); + } + + [NotSupportedByProviderFact] + public override Task Index() + { + return base.Index(); + } + + [NotSupportedByProviderFact] + public override Task Nested_Count() + { + return base.Nested_Count(); + } + + [NotSupportedByProviderFact] + public override Task Select_Sum() + { + return base.Select_Sum(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs new file mode 100644 index 000000000..1ecdb44a5 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs @@ -0,0 +1,55 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsProjectionFbTest : NavigationsProjectionRelationalTestBase +{ + public NavigationsProjectionFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_optional_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_optional_related_FirstOrDefault(queryTrackingBehavior); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs new file mode 100644 index 000000000..b5af67b79 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsSetOperationsFbTest : NavigationsSetOperationsRelationalTestBase +{ + public NavigationsSetOperationsFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs new file mode 100644 index 000000000..a3bb5a67d --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs @@ -0,0 +1,13 @@ +using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; + +public class NavigationsStructuralEqualityFbTest : NavigationsStructuralEqualityRelationalTestBase +{ + public NavigationsStructuralEqualityFbTest(NavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs new file mode 100644 index 000000000..ff3511184 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs @@ -0,0 +1,45 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsCollectionFbTest : OwnedNavigationsCollectionRelationalTestBase +{ + public OwnedNavigationsCollectionFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Distinct_projected(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Distinct_projected(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsFbFixture.cs new file mode 100644 index 000000000..84cccfaa9 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsFbFixture.cs @@ -0,0 +1,37 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsFbFixture : OwnedNavigationsRelationalFixtureBase +{ + protected override ITestStoreFactory TestStoreFactory + => FbTestStoreFactory.Instance; + + protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) + { + base.OnModelCreating(modelBuilder, context); + + ModelHelpers.SimpleTableNames(modelBuilder); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs new file mode 100644 index 000000000..93fc2e362 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsMiscellaneousFbTest : OwnedNavigationsMiscellaneousRelationalTestBase +{ + public OwnedNavigationsMiscellaneousFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs new file mode 100644 index 000000000..4b08fbbd9 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs @@ -0,0 +1,55 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsProjectionFbTest : OwnedNavigationsProjectionRelationalTestBase +{ + public OwnedNavigationsProjectionFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_optional_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_optional_related_FirstOrDefault(queryTrackingBehavior); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs new file mode 100644 index 000000000..26df67b9d --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs @@ -0,0 +1,41 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsSetOperationsFbTest : OwnedNavigationsSetOperationsRelationalTestBase +{ + public OwnedNavigationsSetOperationsFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderTheory] + [MemberData(nameof(TrackingData))] + public override Task Over_associate_collection_projected(QueryTrackingBehavior queryTrackingBehavior) + { + return base.Over_associate_collection_projected(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs new file mode 100644 index 000000000..b7ef84a80 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; + +public class OwnedNavigationsStructuralEqualityFbTest : OwnedNavigationsStructuralEqualityRelationalTestBase +{ + public OwnedNavigationsStructuralEqualityFbTest(OwnedNavigationsFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingFbFixture.cs new file mode 100644 index 000000000..ebfba3a59 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingFbFixture.cs @@ -0,0 +1,73 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; + +public class OwnedTableSplittingFbFixture : OwnedTableSplittingRelationalFixtureBase +{ + protected override ITestStoreFactory TestStoreFactory + => FbTestStoreFactory.Instance; + + protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) + { + base.OnModelCreating(modelBuilder, context); + + modelBuilder.Entity(b => + { + b.OwnsOne( + e => e.RequiredAssociate, rrb => + { + rrb.OwnsMany( + r => r.NestedCollection, rcb => + { + rcb.Property(x => x.Id).ValueGeneratedNever(); + rcb.ToTable("RR_NC"); // RequiredRelated_NestedCollection + }); + }); + b.Navigation(x => x.RequiredAssociate).IsRequired(); + + b.OwnsOne( + e => e.OptionalAssociate, orb => + { + orb.OwnsMany( + r => r.NestedCollection, rcb => + { + rcb.Property(x => x.Id).ValueGeneratedNever(); + rcb.ToTable("OR_NC"); // OptionalRelated_NestedCollection + }); + }); + b.Navigation(x => x.OptionalAssociate).IsRequired(false); + + b.OwnsMany( + e => e.AssociateCollection, rcb => + { + rcb.OwnsMany( + r => r.NestedCollection, rcb => + { + rcb.Property(x => x.Id).ValueGeneratedNever(); + rcb.ToTable("RC_NC"); // RelatedCollection_NestedCollection + }); + }); + }); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs new file mode 100644 index 000000000..63f127a76 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; + +public class OwnedTableSplittingMiscellaneousFbTest : OwnedTableSplittingMiscellaneousRelationalTestBase +{ + public OwnedTableSplittingMiscellaneousFbTest(OwnedTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs new file mode 100644 index 000000000..7985b5600 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs @@ -0,0 +1,55 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; + +public class OwnedTableSplittingProjectionFbTest : OwnedTableSplittingProjectionRelationalTestBase +{ + public OwnedTableSplittingProjectionFbTest(OwnedTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_optional_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_optional_related_FirstOrDefault(queryTrackingBehavior); + } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs new file mode 100644 index 000000000..bfe826a2c --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs @@ -0,0 +1,30 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; + +public class OwnedTableSplittingStructuralEqualityFbTest : OwnedTableSplittingStructuralEqualityRelationalTestBase +{ + public OwnedTableSplittingStructuralEqualityFbTest(OwnedTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs index 0e84b62ab..d2799bb16 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs @@ -34,20 +34,6 @@ public ComplexTypeQueryFbTest(ComplexTypeQueryFbFixture fixture) : base(fixture) { } - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_complex_type_via_optional_navigation(bool async) - { - return Assert.ThrowsAsync(() => base.Project_complex_type_via_optional_navigation(async)); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_struct_complex_type_via_optional_navigation(bool async) - { - return Assert.ThrowsAsync(() => base.Project_struct_complex_type_via_optional_navigation(async)); - } - [Theory] [MemberData(nameof(IsAsyncData))] public override Task Union_property_in_complex_type(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs index 8c02f77e2..d5d617de9 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class EntitySplittingQueryFbTest : EntitySplittingQueryTestBase +public class EntitySplittingQueryFbTest(NonSharedFixture fixture) : EntitySplittingQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlQueryFbTest.cs index 0644961ef..7266ed6c5 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlQueryFbTest.cs @@ -150,18 +150,18 @@ public override Task FromSqlRaw_queryable_simple_projection_composed(bool async) return base.FromSqlRaw_queryable_simple_projection_composed(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = "Firebird matches the casing exactly. Frankly the test is weird.")] [MemberData(nameof(IsAsyncData))] - public override Task Multiple_occurrences_of_FromSql_with_db_parameter_adds_parameter_only_once(bool async) + public override Task FromSqlRaw_queryable_simple_different_cased_columns_and_not_enough_columns_throws(bool async) { - return base.Multiple_occurrences_of_FromSql_with_db_parameter_adds_parameter_only_once(async); + return base.FromSqlRaw_queryable_simple_different_cased_columns_and_not_enough_columns_throws(async); } - [Theory(Skip = "Firebird matches the casing exactly. Frankly the test is weird.")] + [Theory(Skip = "Provider doesn't support INTERSECT")] [MemberData(nameof(IsAsyncData))] - public override Task FromSqlRaw_queryable_simple_different_cased_columns_and_not_enough_columns_throws(bool async) + public override Task Multiple_occurrences_of_FromSql_with_db_parameter_adds_two_parameters(bool async) { - return base.FromSqlRaw_queryable_simple_different_cased_columns_and_not_enough_columns_throws(async); + return base.Multiple_occurrences_of_FromSql_with_db_parameter_adds_two_parameters(async); } protected override DbParameter CreateDbParameter(string name, object value) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs index f6d64548d..fde4e3cc5 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs @@ -33,132 +33,6 @@ public GearsOfWarQueryFbTest(GearsOfWarQueryFbFixture fixture) : base(fixture) { } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddDays(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddDays(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddHours(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddHours(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddMilliseconds(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddMilliseconds(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddMinutes(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddMinutes(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddMonths(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddMonths(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddSeconds(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddSeconds(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_DateAdd_AddYears(bool isAsync) - { - return base.DateTimeOffset_DateAdd_AddYears(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_date_component(bool isAsync) - { - return base.Where_datetimeoffset_date_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_dayofyear_component(bool isAsync) - { - return base.Where_datetimeoffset_dayofyear_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_day_component(bool isAsync) - { - return base.Where_datetimeoffset_day_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_hour_component(bool isAsync) - { - return base.Where_datetimeoffset_hour_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_millisecond_component(bool isAsync) - { - return base.Where_datetimeoffset_millisecond_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_minute_component(bool isAsync) - { - return base.Where_datetimeoffset_minute_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_month_component(bool isAsync) - { - return base.Where_datetimeoffset_month_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_now(bool isAsync) - { - return base.Where_datetimeoffset_now(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_second_component(bool isAsync) - { - return base.Where_datetimeoffset_second_component(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow(bool isAsync) - { - return base.Where_datetimeoffset_utcnow(isAsync); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_year_component(bool isAsync) - { - return base.Where_datetimeoffset_year_component(isAsync); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task DateTimeOffsetNow_minus_timespan(bool async) @@ -285,13 +159,6 @@ public override Task Subquery_projecting_nullable_scalar_contains_nullable_value return base.Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Array_access_on_byte_array(bool async) - { - return base.Array_access_on_byte_array(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_3_levels(bool async) @@ -369,20 +236,6 @@ public override Task Correlated_collections_with_Distinct(bool async) return base.Correlated_collections_with_Distinct(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task First_on_byte_array(bool async) - { - return base.First_on_byte_array(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_subtract_TimeOnly(bool async) - { - return base.Where_TimeOnly_subtract_TimeOnly(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) @@ -397,20 +250,6 @@ public override Task Subquery_inside_Take_argument(bool async) return base.Subquery_inside_Take_argument(async); } - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_milliseconds(bool async) - { - return base.DateTimeOffset_to_unix_time_milliseconds(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_seconds(bool async) - { - return base.DateTimeOffset_to_unix_time_seconds(async); - } - [NotSupportedByProviderTheory] [MemberData(nameof(IsAsyncData))] public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) @@ -418,20 +257,6 @@ public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) return base.Non_string_concat_uses_appropriate_type_mapping(async); } - [Theory(Skip = "NETProvider#1008")] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_IsBetween(bool async) - { - return base.Where_TimeOnly_IsBetween(async); - } - - [Theory(Skip = "NETProvider#1009")] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Add_TimeSpan(bool async) - { - return base.Where_TimeOnly_Add_TimeSpan(async); - } - [Theory(Skip = "Different implicit ordering on Firebird.")] [MemberData(nameof(IsAsyncData))] public override Task String_concat_with_null_conditional_argument(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs index b197da91b..a31978ada 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs @@ -22,20 +22,16 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class NonSharedPrimitiveCollectionsQueryFbTest : NonSharedPrimitiveCollectionsQueryRelationalTestBase +public class NonSharedPrimitiveCollectionsQueryFbTest(NonSharedFixture fixture) : NonSharedPrimitiveCollectionsQueryRelationalTestBase(fixture) { - protected override DbContextOptionsBuilder SetTranslateParameterizedCollectionsToConstants(DbContextOptionsBuilder optionsBuilder) + protected override DbContextOptionsBuilder SetParameterizedCollectionMode(DbContextOptionsBuilder optionsBuilder, + ParameterTranslationMode parameterizedCollectionMode) { - new FbDbContextOptionsBuilder(optionsBuilder).TranslateParameterizedCollectionsToConstants(); - return optionsBuilder; - } - - protected override DbContextOptionsBuilder SetTranslateParameterizedCollectionsToParameters(DbContextOptionsBuilder optionsBuilder) - { - new FbDbContextOptionsBuilder(optionsBuilder).TranslateParameterizedCollectionsToParameters(); + new FbDbContextOptionsBuilder(optionsBuilder).UseParameterizedCollectionMode(parameterizedCollectionMode); return optionsBuilder; } @@ -195,28 +191,49 @@ public override Task Column_collection_inside_json_owned_entity() return base.Column_collection_inside_json_owned_entity(); } - [NotSupportedOnFirebirdFact] - public override Task Parameter_collection_Count_with_column_predicate_with_default_constants() + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode(ParameterTranslationMode mode) { - return base.Parameter_collection_Count_with_column_predicate_with_default_constants(); + return base.Parameter_collection_Count_with_column_predicate_with_default_mode(mode); } - [NotSupportedOnFirebirdFact] - public override Task Parameter_collection_Count_with_column_predicate_with_default_constants_EF_Parameter() + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Constant(ParameterTranslationMode mode) { - return base.Parameter_collection_Count_with_column_predicate_with_default_constants_EF_Parameter(); + return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Constant(mode); } - [NotSupportedOnFirebirdFact] - public override Task Parameter_collection_Count_with_column_predicate_with_default_parameters() + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Contains_with_default_mode_EF_Constant(ParameterTranslationMode mode) { - return base.Parameter_collection_Count_with_column_predicate_with_default_parameters(); + return base.Parameter_collection_Contains_with_default_mode_EF_Constant(mode); } - [NotSupportedOnFirebirdFact] - public override Task Parameter_collection_Count_with_column_predicate_with_default_parameters_EF_Constant() + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Parameter(ParameterTranslationMode mode) + { + return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Parameter(mode); + } + + [NotSupportedByProviderTheory] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_MultipleParameters(ParameterTranslationMode mode) { - return base.Parameter_collection_Count_with_column_predicate_with_default_parameters_EF_Constant(); + return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_MultipleParameters(mode); } protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindFunctionsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindFunctionsQueryFbTest.cs index eb9cdec0b..f63ae34e0 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindFunctionsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindFunctionsQueryFbTest.cs @@ -15,14 +15,8 @@ //$Authors = Jiri Cincura (jiri@cincura.net) -using System; -using System.Linq; -using System.Threading.Tasks; -using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; -using Microsoft.EntityFrameworkCore.TestModels.Northwind; using Microsoft.EntityFrameworkCore.TestUtilities; -using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -31,277 +25,4 @@ public class NorthwindFunctionsQueryFbTest : NorthwindFunctionsQueryRelationalTe public NorthwindFunctionsQueryFbTest(NorthwindQueryFbFixture fixture) : base(fixture) { } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToBoolean(bool async) - { - return base.Convert_ToBoolean(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToByte(bool async) - { - return base.Convert_ToByte(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToDecimal(bool async) - { - return base.Convert_ToDecimal(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToDouble(bool async) - { - return base.Convert_ToDouble(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToInt16(bool async) - { - return base.Convert_ToInt16(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToInt32(bool async) - { - return base.Convert_ToInt32(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToInt64(bool async) - { - return base.Convert_ToInt64(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Convert_ToString(bool async) - { - return base.Convert_ToString(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Trim_with_char_array_argument_in_predicate(bool async) - { - return base.Trim_with_char_array_argument_in_predicate(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task TrimEnd_with_char_array_argument_in_predicate(bool async) - { - return base.TrimEnd_with_char_array_argument_in_predicate(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task TrimStart_with_char_array_argument_in_predicate(bool async) - { - return base.TrimStart_with_char_array_argument_in_predicate(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_math_degrees(bool async) - { - return base.Where_math_degrees(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_math_radians(bool async) - { - return base.Where_mathf_radians(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_degrees(bool async) - { - return base.Where_math_degrees(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_radians(bool async) - { - return base.Where_mathf_radians(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task String_Join_non_aggregate(bool async) - { - return AssertTranslationFailed(() => base.String_Join_non_aggregate(async)); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Regex_IsMatch_MethodCall(bool async) - { - return base.Regex_IsMatch_MethodCall(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Regex_IsMatch_MethodCall_constant_input(bool async) - { - return base.Regex_IsMatch_MethodCall_constant_input(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_abs1(bool async) - { - return base.Where_mathf_abs1(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_acos(bool async) - { - return base.Where_mathf_acos(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_asin(bool async) - { - return base.Where_mathf_asin(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_atan(bool async) - { - return base.Where_mathf_atan(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_atan2(bool async) - { - return base.Where_mathf_atan2(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_ceiling1(bool async) - { - return base.Where_mathf_ceiling1(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_cos(bool async) - { - return base.Where_mathf_cos(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_exp(bool async) - { - return base.Where_mathf_exp(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_floor(bool async) - { - return base.Where_mathf_floor(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_log(bool async) - { - return base.Where_mathf_log(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_log_new_base(bool async) - { - return base.Where_mathf_log_new_base(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_log10(bool async) - { - return base.Where_mathf_log10(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_power(bool async) - { - return base.Where_mathf_power(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_round2(bool async) - { - return base.Where_mathf_round2(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_sign(bool async) - { - return base.Where_mathf_sign(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_sin(bool async) - { - return base.Where_mathf_sin(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_sqrt(bool async) - { - return base.Where_mathf_sqrt(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_square(bool async) - { - return base.Where_mathf_square(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_tan(bool async) - { - return base.Where_mathf_tan(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_mathf_truncate(bool async) - { - return base.Where_mathf_truncate(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Datetime_subtraction_TotalDays(bool async) - { - return base.Datetime_subtraction_TotalDays(async); - } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindMiscellaneousQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindMiscellaneousQueryFbTest.cs index eae538742..978f24f83 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindMiscellaneousQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindMiscellaneousQueryFbTest.cs @@ -145,4 +145,18 @@ public override Task Subquery_with_navigation_inside_inline_collection(bool asyn { return base.Subquery_with_navigation_inside_inline_collection(async); } + + [NotSupportedByProviderTheory] + [MemberData(nameof(IsAsyncData))] + public override Task SelectMany_correlated_with_Select_value_type_and_DefaultIfEmpty_in_selector(bool async) + { + return base.SelectMany_correlated_with_Select_value_type_and_DefaultIfEmpty_in_selector(async); + } + + [NotSupportedByProviderTheory] + [MemberData(nameof(IsAsyncData))] + public override Task Where_nanosecond_and_microsecond_component(bool async) + { + return base.Where_nanosecond_and_microsecond_component(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs index 1c81f0cf2..167f69d17 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs @@ -18,6 +18,7 @@ using System; using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; @@ -37,6 +38,16 @@ public override Task Union_Select_scalar(bool async) return base.Union_Select_scalar(async); } + [Theory] + [MemberData(nameof(IsAsyncData))] + public override Task Union_inside_Concat(bool async) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan5()) + return Task.CompletedTask; + return base.Union_inside_Concat(async); + } + [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Select_Except_reference_projection(bool async) @@ -120,4 +131,11 @@ public override Task Client_eval_Union_FirstOrDefault(bool async) { return Assert.ThrowsAsync(() => base.Client_eval_Union_FirstOrDefault(async)); } + + [NotSupportedOnFirebirdTheory] + [MemberData(nameof(IsAsyncData))] + public override Task Except_nested2(bool async) + { + return base.Except_nested2(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindWhereQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindWhereQueryFbTest.cs index 0632ea821..36d5d5f7f 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindWhereQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindWhereQueryFbTest.cs @@ -15,12 +15,8 @@ //$Authors = Jiri Cincura (jiri@cincura.net) -using System.Linq; using System.Threading.Tasks; -using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; -using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; -using Microsoft.EntityFrameworkCore.TestModels.Northwind; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; @@ -32,60 +28,6 @@ public NorthwindWhereQueryFbTest(NorthwindQueryFbFixture fi : base(fixture) { } - [Theory] - [MemberData(nameof(IsAsyncData))] - // See #24234 on efcore. - public override async Task Like_with_non_string_column_using_ToString(bool async) - { - using var context = CreateContext(); - - var query = context.Set().Where(o => EF.Functions.Like(o.OrderID.ToString(), "%20%")); - var result = async ? await query.ToListAsync() : query.ToList(); - - Assert.Equal(new[] { 10320, 10420, 10520, 10620, 10720, 10820, 10920, 11020 }, result.Select(e => e.OrderID).OrderBy(x => x)); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - // See #24234 on efcore. - public override async Task Like_with_non_string_column_using_double_cast(bool async) - { - using var context = CreateContext(); - - var query = context.Set().Where(o => EF.Functions.Like((string)(object)o.OrderID, "%20%")); - var result = async ? await query.ToListAsync() : query.ToList(); - - Assert.Equal(new[] { 10320, 10420, 10520, 10620, 10720, 10820, 10920, 11020 }, result.Select(e => e.OrderID).OrderBy(x => x)); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetime_utcnow(bool async) - { - return base.Where_datetime_utcnow(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_now_component(bool async) - { - return base.Where_datetimeoffset_now_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow_component(bool async) - { - return base.Where_datetimeoffset_utcnow_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow(bool async) - { - return base.Where_datetimeoffset_utcnow(async); - } - [Theory] [MemberData(nameof(IsAsyncData))] public override Task Where_compare_constructed_equal(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs index 1fdbc215d..291927353 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class OperatorsProceduralFbTest : OperatorsProceduralQueryTestBase +public class OperatorsProceduralFbTest(NonSharedFixture fixture) : OperatorsProceduralQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs index 626db284e..a4e220c8e 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs @@ -27,7 +27,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class OperatorsQueryFbTest : OperatorsQueryTestBase +public class OperatorsQueryFbTest(NonSharedFixture fixture) : OperatorsQueryTestBase(fixture) { [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] @@ -36,16 +36,5 @@ public override Task Concat_and_json_scalar(bool async) return base.Concat_and_json_scalar(async); } - protected override Task> InitializeAsync(Action onModelCreating = null, Action onConfiguring = null, Func addServices = null, Action configureConventions = null, Func seed = null, Func shouldLogCategory = null, Func> createTestStore = null, bool usePooling = true, bool useServiceProvider = true) - { - return base.InitializeAsync( - modelBuilder => - { - ModelHelpers.SetStringLengths(modelBuilder); - onModelCreating?.Invoke(modelBuilder); - }, - onConfiguring, addServices, configureConventions, seed, shouldLogCategory, createTestStore, usePooling, useServiceProvider); - } - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs index f7c61b159..11f7aef7b 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs @@ -18,13 +18,14 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class OwnedEntityQueryFbTest : OwnedEntityQueryRelationalTestBase +public class OwnedEntityQueryFbTest(NonSharedFixture fixture) : OwnedEntityQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs index 2ba0a856e..8d8bd1378 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs @@ -35,7 +35,7 @@ public PrimitiveCollectionsQueryFbTest(PrimitiveCollectionsQueryFbFixture fixtur [ConditionalFact] public virtual async Task Json_representation_of_bool_array() { - await using var context = CreateContext(); + await using var context = Fixture.CreateContext(); Assert.Equal( "[true,false]", @@ -49,667 +49,449 @@ public override void Parameter_collection_in_subquery_and_Convert_as_compiled_qu base.Parameter_collection_in_subquery_and_Convert_as_compiled_query(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query(bool async) + [NotSupportedOnFirebirdFact] + public override Task Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query() + { + return base.Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Any() + { + return base.Column_collection_Any(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Contains_over_subquery() + { + return base.Column_collection_Contains_over_subquery(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Count_method() + { + return base.Column_collection_Count_method(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Count_with_predicate() + { + return base.Column_collection_Count_with_predicate(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Distinct() + { + return base.Column_collection_Distinct(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_ElementAt() + { + return base.Column_collection_ElementAt(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_First() + { + return base.Column_collection_First(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_FirstOrDefault() + { + return base.Column_collection_FirstOrDefault(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_in_subquery_Union_parameter_collection() + { + return base.Column_collection_in_subquery_Union_parameter_collection(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_index_beyond_end() + { + return base.Column_collection_index_beyond_end(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_index_datetime() + { + return base.Column_collection_index_datetime(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_index_int() + { + return base.Column_collection_index_int(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_index_string() + { + return base.Column_collection_index_string(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Intersect_inline_collection() + { + return base.Column_collection_Intersect_inline_collection(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Join_parameter_collection() + { + return base.Column_collection_Join_parameter_collection(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Length() + { + return base.Column_collection_Length(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_bools_Contains() + { + return base.Column_collection_of_bools_Contains(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_ints_Contains() + { + return base.Column_collection_of_ints_Contains(); + } + + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_nullable_ints_Contains() { - return base.Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query(async); + return base.Column_collection_of_nullable_ints_Contains(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_strings_contains_null(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_nullable_ints_Contains_null() { - return base.Column_collection_of_strings_contains_null(async); + return base.Column_collection_of_nullable_ints_Contains_null(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Count_with_one_value(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_nullable_strings_contains_null() { - return base.Inline_collection_Count_with_one_value(async); + return base.Column_collection_of_nullable_strings_contains_null(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Count_with_two_values(bool async) - { - return base.Inline_collection_Count_with_two_values(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_of_strings_contains_null() + { + return base.Column_collection_of_strings_contains_null(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Count_with_three_values(bool async) - { - return base.Inline_collection_Count_with_three_values(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_OrderByDescending_ElementAt() + { + return base.Column_collection_OrderByDescending_ElementAt(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_Count(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_SelectMany() { - return base.Parameter_collection_Count(async); + return base.Column_collection_SelectMany(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_ints_Contains_int(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_SelectMany_with_filter() { - return base.Parameter_collection_of_ints_Contains_int(async); + return base.Column_collection_SelectMany_with_filter(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_nullable_ints_Contains_int(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_SelectMany_with_Select_to_anonymous_type() { - return base.Parameter_collection_of_nullable_ints_Contains_int(async); + return base.Column_collection_SelectMany_with_Select_to_anonymous_type(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_nullable_ints_Contains_nullable_int(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Single() { - return base.Parameter_collection_of_nullable_ints_Contains_nullable_int(async); + return base.Column_collection_Single(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_strings_Contains_string(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_SingleOrDefault() { - return base.Parameter_collection_of_strings_Contains_string(async); + return base.Column_collection_SingleOrDefault(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_strings_Contains_nullable_string(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Skip() { - return base.Parameter_collection_of_strings_Contains_nullable_string(async); + return base.Column_collection_Skip(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_DateTimes_Contains(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Skip_Take() { - return base.Parameter_collection_of_DateTimes_Contains(async); + return base.Column_collection_Skip_Take(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_bools_Contains(bool async) - { - return base.Parameter_collection_of_bools_Contains(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Take() + { + return base.Column_collection_Take(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_of_enums_Contains(bool async) - { - return base.Parameter_collection_of_enums_Contains(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Union_parameter_collection() + { + return base.Column_collection_Union_parameter_collection(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_null_Contains(bool async) - { - return base.Parameter_collection_null_Contains(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Count() + { + return base.Column_collection_Where_Count(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_ints_Contains(bool async) - { - return base.Column_collection_of_ints_Contains(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_nullable_ints_Contains(bool async) - { - return base.Column_collection_of_nullable_ints_Contains(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_nullable_ints_Contains_null(bool async) - { - return base.Column_collection_of_nullable_ints_Contains_null(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_nullable_strings_contains_null(bool async) - { - return base.Column_collection_of_nullable_strings_contains_null(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_of_bools_Contains(bool async) - { - return base.Column_collection_of_bools_Contains(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Count_method(bool async) - { - return base.Column_collection_Count_method(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Count_with_predicate(bool async) - { - return base.Column_collection_Count_with_predicate(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Length(bool async) - { - return base.Column_collection_Length(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_index_int(bool async) - { - return base.Column_collection_index_int(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_index_string(bool async) - { - return base.Column_collection_index_string(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_index_datetime(bool async) - { - return base.Column_collection_index_datetime(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_index_beyond_end(bool async) - { - return base.Column_collection_index_beyond_end(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Nullable_reference_column_collection_index_equals_nullable_column(bool async) - { - return base.Nullable_reference_column_collection_index_equals_nullable_column(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Non_nullable_reference_column_collection_index_equals_nullable_column(bool async) - { - return base.Non_nullable_reference_column_collection_index_equals_nullable_column(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_index_Column(bool async) - { - return base.Inline_collection_index_Column(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_index_Column_equal_Column(bool async) - { - return base.Parameter_collection_index_Column_equal_Column(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_index_Column_equal_constant(bool async) - { - return base.Parameter_collection_index_Column_equal_constant(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_ElementAt(bool async) - { - return base.Column_collection_ElementAt(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Skip(bool async) - { - return base.Column_collection_Skip(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Take(bool async) - { - return base.Column_collection_Take(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Skip_Take(bool async) - { - return base.Column_collection_Skip_Take(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_OrderByDescending_ElementAt(bool async) - { - return base.Column_collection_OrderByDescending_ElementAt(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Any(bool async) - { - return base.Column_collection_Any(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Distinct(bool async) - { - return base.Column_collection_Distinct(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Join_parameter_collection(bool async) - { - return base.Column_collection_Join_parameter_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Join_ordered_column_collection(bool async) - { - return base.Inline_collection_Join_ordered_column_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_Concat_column_collection(bool async) - { - return base.Parameter_collection_Concat_column_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Union_parameter_collection(bool async) - { - return base.Column_collection_Union_parameter_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Intersect_inline_collection(bool async) - { - return base.Column_collection_Intersect_inline_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Except_column_collection(bool async) - { - return base.Inline_collection_Except_column_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Union_column_collection_as_compiled_query(bool async) - { - return base.Parameter_collection_in_subquery_Union_column_collection_as_compiled_query(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Union_column_collection(bool async) - { - return base.Parameter_collection_in_subquery_Union_column_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Union_column_collection_nested(bool async) - { - return base.Parameter_collection_in_subquery_Union_column_collection_nested(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_in_subquery_Count_as_compiled_query(bool async) - { - return base.Parameter_collection_in_subquery_Count_as_compiled_query(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_in_subquery_Union_parameter_collection(bool async) - { - return base.Column_collection_in_subquery_Union_parameter_collection(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_ints_ordered(bool async) - { - return base.Project_collection_of_ints_ordered(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_datetimes_filtered(bool async) - { - return base.Project_collection_of_datetimes_filtered(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_nullable_ints_with_paging(bool async) - { - return base.Project_collection_of_nullable_ints_with_paging(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_nullable_ints_with_paging2(bool async) - { - return base.Project_collection_of_nullable_ints_with_paging2(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_nullable_ints_with_paging3(bool async) - { - return base.Project_collection_of_nullable_ints_with_paging3(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_ElementAt() + { + return base.Column_collection_Where_ElementAt(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_collection_of_ints_with_distinct(bool async) - { - return base.Project_collection_of_ints_with_distinct(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Skip() + { + return base.Column_collection_Where_Skip(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_empty_collection_of_nullables_and_collection_only_containing_nulls(bool async) + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Skip_Take() { - return base.Project_empty_collection_of_nullables_and_collection_only_containing_nulls(async); + return base.Column_collection_Where_Skip_Take(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_multiple_collections(bool async) - { - return base.Project_multiple_collections(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Take() + { + return base.Column_collection_Where_Take(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_primitive_collections_element(bool async) - { - return base.Project_primitive_collections_element(async); - } + [NotSupportedOnFirebirdFact] + public override Task Column_collection_Where_Union() + { + return base.Column_collection_Where_Union(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Nested_contains_with_Lists_and_no_inferred_type_mapping(bool async) - { - return base.Nested_contains_with_Lists_and_no_inferred_type_mapping(async); - } + [NotSupportedByProviderFact] + public override Task Inline_collection_Count_with_column_predicate_with_EF_Parameter() + { + return base.Inline_collection_Count_with_column_predicate_with_EF_Parameter(); + } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Nested_contains_with_arrays_and_no_inferred_type_mapping(bool async) - { - return base.Nested_contains_with_arrays_and_no_inferred_type_mapping(async); - } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Contains_over_subquery(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Count_with_one_value() { - return base.Column_collection_Contains_over_subquery(async); + return base.Inline_collection_Count_with_one_value(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_First(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Count_with_two_values() { - return base.Column_collection_First(async); + return base.Inline_collection_Count_with_two_values(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_FirstOrDefault(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Count_with_three_values() { - return base.Column_collection_FirstOrDefault(async); + return base.Inline_collection_Count_with_three_values(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_SelectMany(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Except_column_collection() { - return base.Column_collection_SelectMany(async); + return base.Inline_collection_Except_column_collection(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_SelectMany_with_filter(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_index_Column() { - return base.Column_collection_SelectMany_with_filter(async); + return base.Inline_collection_index_Column(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_SelectMany_with_Select_to_anonymous_type(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_index_Column_with_EF_Constant() { - return base.Column_collection_SelectMany_with_Select_to_anonymous_type(async); + return base.Inline_collection_index_Column_with_EF_Constant(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Single(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_Join_ordered_column_collection() { - return base.Column_collection_Single(async); + return base.Inline_collection_Join_ordered_column_collection(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_SingleOrDefault(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_List_value_index_Column() { - return base.Column_collection_SingleOrDefault(async); + return base.Inline_collection_List_value_index_Column(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Count(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_of_nullable_value_type_Max() { - return base.Column_collection_Where_Count(async); + return base.Inline_collection_of_nullable_value_type_Max(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_ElementAt(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_of_nullable_value_type_Min() { - return base.Column_collection_Where_ElementAt(async); + return base.Inline_collection_of_nullable_value_type_Min(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Skip(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_of_nullable_value_type_with_null_Max() { - return base.Column_collection_Where_Skip(async); + return base.Inline_collection_of_nullable_value_type_with_null_Max(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Skip_Take(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_of_nullable_value_type_with_null_Min() { - return base.Column_collection_Where_Skip_Take(async); + return base.Inline_collection_of_nullable_value_type_with_null_Min(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Take(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_value_index_Column() { - return base.Column_collection_Where_Take(async); + return base.Inline_collection_value_index_Column(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Column_collection_Where_Union(bool async) + [NotSupportedByProviderFact] + public override Task Inline_collection_with_single_parameter_element_Count() { - return base.Column_collection_Where_Union(async); + return base.Inline_collection_with_single_parameter_element_Count(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Count_with_column_predicate_with_EF_Parameter(bool async) + + [NotSupportedByProviderFact] + public override Task Non_nullable_reference_column_collection_index_equals_nullable_column() { - return base.Inline_collection_Count_with_column_predicate_with_EF_Parameter(async); + return base.Non_nullable_reference_column_collection_index_equals_nullable_column(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_List_Max_with_three_values(bool async) + + [NotSupportedByProviderFact] + public override Task Nullable_reference_column_collection_index_equals_nullable_column() { - return base.Inline_collection_List_Max_with_three_values(async); + return base.Nullable_reference_column_collection_index_equals_nullable_column(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_List_Max_with_two_values(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_Concat_column_collection() { - return base.Inline_collection_List_Max_with_two_values(async); + return base.Parameter_collection_Concat_column_collection(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_List_Min_with_two_values(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_Count() { - return base.Inline_collection_List_Min_with_two_values(async); + return base.Parameter_collection_Count(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_List_value_index_Column(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_Count_with_column_predicate_with_EF_Constant() { - return base.Inline_collection_List_value_index_Column(async); + return base.Parameter_collection_Count_with_column_predicate_with_EF_Constant(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Max_with_three_values(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_ImmutableArray_of_ints_Contains_int() { - return base.Inline_collection_Max_with_three_values(async); + return base.Parameter_collection_ImmutableArray_of_ints_Contains_int(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Max_with_two_values(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_in_subquery_Count_as_compiled_query() { - return base.Inline_collection_Max_with_two_values(async); + return base.Parameter_collection_in_subquery_Count_as_compiled_query(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Min_with_three_values(bool async) + [NotSupportedByProviderFact] + public override Task Parameter_collection_in_subquery_Union_column_collection() { - return base.Inline_collection_Min_with_three_values(async); + return base.Parameter_collection_in_subquery_Union_column_collection(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_Min_with_two_values(bool async) + [NotSupportedByProviderFact] + public override Task Parameter_collection_in_subquery_Union_column_collection_as_compiled_query() { - return base.Inline_collection_Min_with_two_values(async); + return base.Parameter_collection_in_subquery_Union_column_collection_as_compiled_query(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_of_nullable_value_type_Max(bool async) + [NotSupportedByProviderFact] + public override Task Parameter_collection_in_subquery_Union_column_collection_nested() { - return base.Inline_collection_of_nullable_value_type_Max(async); + return base.Parameter_collection_in_subquery_Union_column_collection_nested(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_of_nullable_value_type_Min(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_index_Column_equal_Column() { - return base.Inline_collection_of_nullable_value_type_Min(async); + return base.Parameter_collection_index_Column_equal_Column(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_of_nullable_value_type_with_null_Max(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_index_Column_equal_constant() { - return base.Inline_collection_of_nullable_value_type_with_null_Max(async); + return base.Parameter_collection_index_Column_equal_constant(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_of_nullable_value_type_with_null_Min(bool async) + + [NotSupportedByProviderFact] + public override Task Parameter_collection_Where_with_EF_Constant_Where_Any() { - return base.Inline_collection_of_nullable_value_type_with_null_Min(async); + return base.Parameter_collection_Where_with_EF_Constant_Where_Any(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_value_index_Column(bool async) + + [NotSupportedByProviderFact] + public override Task Project_collection_of_datetimes_filtered() { - return base.Inline_collection_value_index_Column(async); + return base.Project_collection_of_datetimes_filtered(); } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Inline_collection_with_single_parameter_element_Count(bool async) + + [NotSupportedByProviderFact] + public override Task Project_collection_of_ints_ordered() { - return base.Inline_collection_with_single_parameter_element_Count(async); + return base.Project_collection_of_ints_ordered(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_Count_with_column_predicate_with_EF_Constant(bool async) + [NotSupportedByProviderFact] + public override Task Project_collection_of_nullable_ints_with_paging2() { - return base.Parameter_collection_Count_with_column_predicate_with_EF_Constant(async); + return base.Project_collection_of_nullable_ints_with_paging2(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_Where_with_EF_Constant_Where_Any(bool async) + [NotSupportedByProviderFact] + public override Task Project_empty_collection_of_nullables_and_collection_only_containing_nulls() { - return base.Parameter_collection_Where_with_EF_Constant_Where_Any(async); + return base.Project_empty_collection_of_nullables_and_collection_only_containing_nulls(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Project_inline_collection_with_Union(bool async) + [NotSupportedByProviderFact] + public override Task Project_inline_collection_with_Union() { - return base.Project_inline_collection_with_Union(async); + return base.Project_inline_collection_with_Union(); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Parameter_collection_ImmutableArray_of_ints_Contains_int(bool async) + [NotSupportedByProviderFact] + public override Task Project_multiple_collections() { - return base.Parameter_collection_ImmutableArray_of_ints_Contains_int(async); + return base.Project_multiple_collections(); } - PrimitiveCollectionsContext CreateContext() + [NotSupportedByProviderFact] + public override Task Values_of_enum_casted_to_underlying_value() { - return Fixture.CreateContext(); + return base.Values_of_enum_casted_to_underlying_value(); } public class PrimitiveCollectionsQueryFbFixture : PrimitiveCollectionsQueryFixtureBase, ITestSqlLoggerFactory diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs index 4df2ba1bb..2342605ac 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs @@ -16,12 +16,13 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class SharedTypeQueryFbTest : SharedTypeQueryRelationalTestBase +public class SharedTypeQueryFbTest(NonSharedFixture fixture) : SharedTypeQueryRelationalTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs index 52d10ed26..dd0a61306 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs @@ -31,6 +31,14 @@ public SqlQueryFbTest(NorthwindQueryFbFixture fixture) : base(fixture) { } + // Uses INTERSECT + [NotSupportedByProviderTheory] + [MemberData(nameof(IsAsyncData))] + public override Task Multiple_occurrences_of_SqlQuery_with_db_parameter_adds_two_parameters(bool async) + { + return base.Multiple_occurrences_of_SqlQuery_with_db_parameter_adds_two_parameters(async); + } + [Theory(Skip = "Provider does the casting.")] [MemberData(nameof(IsAsyncData))] public override Task Bad_data_error_handling_invalid_cast(bool async) @@ -66,13 +74,6 @@ public override Task SqlQueryRaw_queryable_simple_projection_composed(bool async return base.SqlQueryRaw_queryable_simple_projection_composed(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Multiple_occurrences_of_SqlQuery_with_db_parameter_adds_parameter_only_once(bool async) - { - return base.Multiple_occurrences_of_SqlQuery_with_db_parameter_adds_parameter_only_once(async); - } - [DoesNotHaveTheDataTheory] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_with_dbParameter_mixed_in_subquery(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs index 7d91179dd..52df94ce7 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs @@ -55,13 +55,6 @@ public override Task Group_by_on_StartsWith_with_null_parameter_as_argument(bool return base.Group_by_on_StartsWith_with_null_parameter_as_argument(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Array_access_on_byte_array(bool async) - { - return base.Array_access_on_byte_array(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_3_levels(bool async) @@ -181,13 +174,6 @@ public override Task DateTimeOffsetNow_minus_timespan(bool async) return base.DateTimeOffsetNow_minus_timespan(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task First_on_byte_array(bool async) - { - return base.First_on_byte_array(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_group_join_with_DefaultIfEmpty(bool async) @@ -251,139 +237,6 @@ public override Task Subquery_inside_Take_argument(bool async) return base.Subquery_inside_Take_argument(async); } - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_AddDays(bool async) - { - return base.Where_DateOnly_AddDays(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_AddMonths(bool async) - { - return base.Where_DateOnly_AddMonths(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_AddYears(bool async) - { - return base.Where_DateOnly_AddYears(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_Day(bool async) - { - return base.Where_DateOnly_Day(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_DayOfWeek(bool async) - { - return base.Where_DateOnly_DayOfWeek(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_DayOfYear(bool async) - { - return base.Where_DateOnly_DayOfYear(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_Month(bool async) - { - return base.Where_DateOnly_Month(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_DateOnly_Year(bool async) - { - return base.Where_DateOnly_Year(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_date_component(bool async) - { - return base.Where_datetimeoffset_date_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_day_component(bool async) - { - return base.Where_datetimeoffset_day_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_dayofyear_component(bool async) - { - return base.Where_datetimeoffset_dayofyear_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_hour_component(bool async) - { - return base.Where_datetimeoffset_hour_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_millisecond_component(bool async) - { - return base.Where_datetimeoffset_millisecond_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_minute_component(bool async) - { - return base.Where_datetimeoffset_minute_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_month_component(bool async) - { - return base.Where_datetimeoffset_month_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_now(bool async) - { - return base.Where_datetimeoffset_now(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_second_component(bool async) - { - return base.Where_datetimeoffset_second_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow(bool async) - { - return base.Where_datetimeoffset_utcnow(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_year_component(bool async) - { - return base.Where_datetimeoffset_year_component(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) @@ -393,83 +246,6 @@ public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) [NotSupportedByProviderTheory] [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Add_TimeSpan(bool async) - { - return base.Where_TimeOnly_Add_TimeSpan(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_AddHours(bool async) - { - return base.Where_TimeOnly_AddHours(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_AddMinutes(bool async) - { - return base.Where_TimeOnly_AddMinutes(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Hour(bool async) - { - return base.Where_TimeOnly_Hour(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_IsBetween(bool async) - { - return base.Where_TimeOnly_IsBetween(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Millisecond(bool async) - { - return base.Where_TimeOnly_Millisecond(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Minute(bool async) - { - return base.Where_TimeOnly_Minute(async); - } - - [Theory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Second(bool async) - { - return base.Where_TimeOnly_Second(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_subtract_TimeOnly(bool async) - { - return base.Where_TimeOnly_subtract_TimeOnly(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_milliseconds(bool async) - { - return base.DateTimeOffset_to_unix_time_milliseconds(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_seconds(bool async) - { - return base.DateTimeOffset_to_unix_time_seconds(async); - } - - [Theory(Skip = "Different implicit ordering on Firebird.")] - [MemberData(nameof(IsAsyncData))] public override Task Take_without_orderby_followed_by_orderBy_is_pushed_down1(bool async) { return base.Take_without_orderby_followed_by_orderBy_is_pushed_down1(async); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTGearsOfWarQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTGearsOfWarQueryFbTest.cs index d0c129d2c..5c1e9ea91 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTGearsOfWarQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTGearsOfWarQueryFbTest.cs @@ -97,83 +97,6 @@ public override Task DateTimeOffset_Date_returns_datetime(bool async) return base.DateTimeOffset_Date_returns_datetime(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_date_component(bool async) - { - return base.Where_datetimeoffset_date_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_day_component(bool async) - { - return base.Where_datetimeoffset_day_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_dayofyear_component(bool async) - { - return base.Where_datetimeoffset_dayofyear_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_hour_component(bool async) - { - return base.Where_datetimeoffset_hour_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_millisecond_component(bool async) - { - return base.Where_datetimeoffset_millisecond_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_minute_component(bool async) - { - return base.Where_datetimeoffset_minute_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_month_component(bool async) - { - return base.Where_datetimeoffset_month_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_now(bool async) - { - return base.Where_datetimeoffset_now(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_second_component(bool async) - { - return base.Where_datetimeoffset_second_component(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_utcnow(bool async) - { - return base.Where_datetimeoffset_utcnow(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_datetimeoffset_year_component(bool async) - { - return base.Where_datetimeoffset_year_component(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_group_join_with_DefaultIfEmpty(bool async) @@ -244,13 +167,6 @@ public override Task Take_without_orderby_followed_by_orderBy_is_pushed_down2(bo return base.Take_without_orderby_followed_by_orderBy_is_pushed_down2(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Array_access_on_byte_array(bool async) - { - return base.Array_access_on_byte_array(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_3_levels(bool async) @@ -314,20 +230,6 @@ public override Task Correlated_collections_with_Distinct(bool async) return base.Correlated_collections_with_Distinct(async); } - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task First_on_byte_array(bool async) - { - return base.First_on_byte_array(async); - } - - [NotSupportedOnFirebirdTheory] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_subtract_TimeOnly(bool async) - { - return base.Where_TimeOnly_subtract_TimeOnly(async); - } - [NotSupportedOnFirebirdTheory] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) @@ -356,36 +258,8 @@ public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) return base.Non_string_concat_uses_appropriate_type_mapping(async); } - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_milliseconds(bool async) - { - return base.DateTimeOffset_to_unix_time_milliseconds(async); - } - - [NotSupportedByProviderTheory] - [MemberData(nameof(IsAsyncData))] - public override Task DateTimeOffset_to_unix_time_seconds(bool async) - { - return base.DateTimeOffset_to_unix_time_seconds(async); - } - [Theory(Skip = "NETProvider#1008")] [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_IsBetween(bool async) - { - return base.Where_TimeOnly_IsBetween(async); - } - - [Theory(Skip = "NETProvider#1009")] - [MemberData(nameof(IsAsyncData))] - public override Task Where_TimeOnly_Add_TimeSpan(bool async) - { - return base.Where_TimeOnly_Add_TimeSpan(async); - } - - [Theory(Skip = "Different implicit ordering on Firebird.")] - [MemberData(nameof(IsAsyncData))] public override Task String_concat_with_null_conditional_argument(bool async) { return base.String_concat_with_null_conditional_argument(async); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ToSqlQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ToSqlQueryFbTest.cs index 6867be489..1c96f220c 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ToSqlQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ToSqlQueryFbTest.cs @@ -25,7 +25,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; -public class ToSqlQueryFbTest : ToSqlQueryTestBase +public class ToSqlQueryFbTest(NonSharedFixture fixture) : ToSqlQueryTestBase(fixture) { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/BasicTypesQueryFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/BasicTypesQueryFbFixture.cs new file mode 100644 index 000000000..ed7c88566 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/BasicTypesQueryFbFixture.cs @@ -0,0 +1,100 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System; +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestModels.BasicTypesModel; +using Microsoft.EntityFrameworkCore.TestUtilities; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class BasicTypesQueryFbFixture : BasicTypesQueryFixtureBase, ITestSqlLoggerFactory +{ + private BasicTypesData _expectedData; + + protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + + public TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; + + protected override Task SeedAsync(BasicTypesContext context) + { + _expectedData ??= CreateExpectedData(); + context.AddRange(_expectedData.BasicTypesEntities); + context.AddRange(_expectedData.NullableBasicTypesEntities); + return context.SaveChangesAsync(); + } + + public override ISetSource GetExpectedData() + => _expectedData ??= CreateExpectedData(); + + private BasicTypesData CreateExpectedData() + { + var expectedData = (BasicTypesData)base.GetExpectedData(); + foreach (var entry in expectedData.BasicTypesEntities) + { + // For all Temporal types Firebird supports up to 1/10ths of a millisecond precision + entry.DateTime = RoundToFirebirdPrecision(entry.DateTime); + entry.TimeOnly = RoundToFirebirdPrecision(entry.TimeOnly); + entry.TimeSpan = RoundToFirebirdPrecision(entry.TimeSpan); + entry.DateTimeOffset = RoundToFirebirdPrecision(entry.DateTimeOffset); + } + + // Do the same for the nullable counterparts + foreach (var entry in expectedData.NullableBasicTypesEntities) + { + if (entry.DateTime.HasValue) + { + entry.DateTime = RoundToFirebirdPrecision(entry.DateTime.Value); + } + + if (entry.TimeOnly.HasValue) + { + entry.TimeOnly = RoundToFirebirdPrecision(entry.TimeOnly.Value); + } + + if (entry.TimeSpan.HasValue) + { + entry.TimeSpan = RoundToFirebirdPrecision(entry.TimeSpan.Value); + } + + if (entry.DateTimeOffset.HasValue) + { + entry.DateTimeOffset = RoundToFirebirdPrecision(entry.DateTimeOffset.Value); + } + } + + return expectedData; + } + + private static DateTime RoundToFirebirdPrecision(DateTime dateTime) + => new (StripSubDeciMillisecond(dateTime.Ticks), dateTime.Kind); + + private static DateTimeOffset RoundToFirebirdPrecision(DateTimeOffset dateTimeOffset) + => new (StripSubDeciMillisecond(dateTimeOffset.Ticks), TimeSpan.Zero); + + private static TimeOnly RoundToFirebirdPrecision(TimeOnly timeOnly) + => new (StripSubDeciMillisecond(timeOnly.Ticks)); + + private static TimeSpan RoundToFirebirdPrecision(TimeSpan timeOnly) + => new (StripSubDeciMillisecond(timeOnly.Ticks)); + + static long StripSubDeciMillisecond(long ticks) => ticks - (ticks % (TimeSpan.TicksPerMillisecond / 10)); +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs new file mode 100644 index 000000000..3ecf0647e --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs @@ -0,0 +1,45 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class ByteArrayTranslationsFbTest : ByteArrayTranslationsTestBase +{ + public ByteArrayTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task First() + { + return base.First(); + } + + [NotSupportedByProviderFact] + public override Task Index() + { + return base.Index(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs new file mode 100644 index 000000000..4dd719401 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs @@ -0,0 +1,38 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class EnumTranslationsFbTest : EnumTranslationsTestBase +{ + public EnumTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + protected override void ClearLog() + { + Fixture.TestSqlLoggerFactory.Clear(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs new file mode 100644 index 000000000..ab3c3fd0a --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs @@ -0,0 +1,31 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class GuidTranslationsFbTest : GuidTranslationsTestBase +{ + public GuidTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs new file mode 100644 index 000000000..25869915a --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs @@ -0,0 +1,222 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class MathTranslationsFbTest : MathTranslationsTestBase +{ + public MathTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task Acos_float() + { + return base.Acos_float(); + } + + [NotSupportedByProviderFact] + public override Task Acosh() + { + return base.Acosh(); + } + + [NotSupportedByProviderFact] + public override Task Asin_float() + { + return base.Asin_float(); + } + + [NotSupportedByProviderFact] + public override Task Asinh() + { + return base.Asinh(); + } + + [NotSupportedByProviderFact] + public override Task Atan_float() + { + return base.Atan_float(); + } + + [NotSupportedByProviderFact] + public override Task Atanh() + { + return base.Atanh(); + } + + [NotSupportedByProviderFact] + public override Task Atan2_float() + { + return base.Atan2_float(); + } + + [NotSupportedByProviderFact] + public override Task Ceiling_float() + { + return base.Ceiling_float(); + } + + [NotSupportedByProviderFact] + public override Task Cos_float() + { + return base.Cos_float(); + } + + [NotSupportedByProviderFact] + public override Task Cosh() + { + return base.Cosh(); + } + + [NotSupportedByProviderFact] + public override Task Degrees() + { + return base.Degrees(); + } + + [NotSupportedByProviderFact] + public override Task Degrees_float() + { + return base.Degrees_float(); + } + + [NotSupportedByProviderFact] + public override Task Exp_float() + { + return base.Exp_float(); + } + + [NotSupportedByProviderFact] + public override Task Floor_float() + { + return base.Floor_float(); + } + + [NotSupportedByProviderFact] + public override Task Log_float() + { + return base.Log_float(); + } + + [NotSupportedByProviderFact] + public override Task Log_with_newBase_float() + { + return base.Log_with_newBase_float(); + } + + [NotSupportedByProviderFact] + public override Task Log10_float() + { + return base.Log10_float(); + } + + [NotSupportedByProviderFact] + public override Task Log2() + { + return base.Log2(); + } + + [NotSupportedByProviderFact] + public override Task Power_float() + { + return base.Power_float(); + } + + [NotSupportedByProviderFact] + public override Task Radians() + { + return base.Radians(); + } + + [NotSupportedByProviderFact] + public override Task Radians_float() + { + return base.Radians_float(); + } + + [NotSupportedByProviderFact] + public override Task Round_float() + { + return base.Round_float(); + } + + [NotSupportedByProviderFact] + public override Task Round_with_digits_float() + { + return base.Round_with_digits_float(); + } + + [NotSupportedByProviderFact] + public override Task Sign_float() + { + return base.Sign_float(); + } + + [NotSupportedByProviderFact] + public override Task Sin_float() + { + return base.Sin_float(); + } + + [NotSupportedByProviderFact] + public override Task Sinh() + { + return base.Sinh(); + } + + [NotSupportedByProviderFact] + public override Task Sqrt_float() + { + return base.Sqrt_float(); + } + + [NotSupportedByProviderFact] + public override Task Tan_float() + { + return base.Tan_float(); + } + + [NotSupportedByProviderFact] + public override Task Tanh() + { + return base.Tanh(); + } + + [NotSupportedByProviderFact] + public override Task Truncate_float() + { + return base.Truncate_float(); + } + + // Round itself works here, but the where clause (255.1) is not translated correctly (255.09999) due to floating point error + [NotSupportedByProviderFact] + public override Task Round_with_digits_double() + { + return base.Round_with_digits_double(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs new file mode 100644 index 000000000..76bc8bf36 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs @@ -0,0 +1,85 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class MiscellaneousTranslationsFbTest : MiscellaneousTranslationsRelationalTestBase +{ + public MiscellaneousTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToBoolean() + { + return base.Convert_ToBoolean(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToByte() + { + return base.Convert_ToByte(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToDecimal() + { + return base.Convert_ToDecimal(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToDouble() + { + return base.Convert_ToDouble(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToInt16() + { + return base.Convert_ToInt16(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToInt32() + { + return base.Convert_ToInt32(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToInt64() + { + return base.Convert_ToInt64(); + } + + [NotSupportedOnFirebirdFact] + public override Task Convert_ToString() + { + return base.Convert_ToString(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..c575858ae --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class ArithmeticOperatorTranslationsFbTest : ArithmeticOperatorTranslationsTestBase +{ + public ArithmeticOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..b21abe185 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs @@ -0,0 +1,42 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class BitwiseOperatorTranslationsFbTest : BitwiseOperatorTranslationsTestBase +{ + public BitwiseOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task Left_shift() + => base.Left_shift(); + + [NotSupportedByProviderFact] + public override Task Right_shift() + => base.Right_shift(); +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..a6eaa34a2 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class ComparisonOperatorTranslationsFbTest : ComparisonOperatorTranslationsTestBase +{ + public ComparisonOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..88dc4d17c --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class LogicalOperatorTranslationsFbTest : LogicalOperatorTranslationsTestBase +{ + public LogicalOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs new file mode 100644 index 000000000..8597e053e --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs @@ -0,0 +1,32 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using Microsoft.EntityFrameworkCore.Query.Translations.Operators; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; + +public class MiscellaneousOperatorTranslationsFbTest : MiscellaneousOperatorTranslationsTestBase +{ + public MiscellaneousOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs new file mode 100644 index 000000000..025827939 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs @@ -0,0 +1,196 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; + +public class StringTranslationsFbTest : StringTranslationsRelationalTestBase +{ + public StringTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + protected override void ClearLog() + { + Fixture.TestSqlLoggerFactory.Clear(); + } + + [NotSupportedOnFirebirdFact] + public override Task TrimStart_with_char_array_argument() + { + return base.TrimStart_with_char_array_argument(); + } + + [NotSupportedOnFirebirdFact] + public override Task TrimEnd_with_char_array_argument() + { + return base.TrimEnd_with_char_array_argument(); + } + + [NotSupportedOnFirebirdFact] + public override Task Trim_with_char_array_argument_in_predicate() + { + return base.Trim_with_char_array_argument_in_predicate(); + } + + [NotSupportedByProviderFact] + public override Task Regex_IsMatch() + { + return base.Regex_IsMatch(); + } + + [NotSupportedByProviderFact] + public override Task Regex_IsMatch_constant_input() + { + return base.Regex_IsMatch_constant_input(); + } + + [ConditionalFact] + public override Task Join_non_aggregate() + { + return AssertTranslationFailed(() => base.Join_non_aggregate()); + } + + [NotSupportedByProviderFact] + public override Task Contains_Literal_Char() + { + return base.Contains_Literal_Char(); + } + + [NotSupportedByProviderFact] + public override Task Contains_with_StringComparison_Ordinal() + { + return base.Contains_with_StringComparison_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task Contains_with_StringComparison_OrdinalIgnoreCase() + { + return base.Contains_with_StringComparison_OrdinalIgnoreCase(); + } + + [NotSupportedByProviderFact] + public override Task EndsWith_Literal_Char() + { + return base.EndsWith_Literal_Char(); + } + + [NotSupportedByProviderFact] + public override Task EndsWith_Parameter_Char() + { + return base.EndsWith_Parameter_Char(); + } + + [NotSupportedByProviderFact] + public override Task EndsWith_with_StringComparison_Ordinal() + { + return base.EndsWith_with_StringComparison_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task EndsWith_with_StringComparison_OrdinalIgnoreCase() + { + return base.EndsWith_with_StringComparison_OrdinalIgnoreCase(); + } + + [NotSupportedByProviderFact] + public override Task Equals_with_Ordinal() + { + return base.Equals_with_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task Equals_with_OrdinalIgnoreCase() + { + return base.Equals_with_OrdinalIgnoreCase(); + } + + [NotSupportedByProviderFact] + public override Task IndexOf_Char() + { + return base.IndexOf_Char(); + } + + [NotSupportedByProviderFact] + public override Task IndexOf_with_constant_starting_position_char() + { + return base.IndexOf_with_constant_starting_position_char(); + } + + [NotSupportedByProviderFact] + public override Task IndexOf_with_one_parameter_arg_char() + { + return base.IndexOf_with_one_parameter_arg_char(); + } + + [NotSupportedByProviderFact] + public override Task IndexOf_with_parameter_starting_position_char() + { + return base.IndexOf_with_parameter_starting_position_char(); + } + + [NotSupportedByProviderFact] + public override Task Replace_Char() + { + return base.Replace_Char(); + } + + [NotSupportedByProviderFact] + public override Task StartsWith_Literal_Char() + { + return base.StartsWith_Literal_Char(); + } + + [NotSupportedByProviderFact] + public override Task StartsWith_Parameter_Char() + { + return base.StartsWith_Parameter_Char(); + } + + [NotSupportedByProviderFact] + public override Task StartsWith_with_StringComparison_Ordinal() + { + return base.StartsWith_with_StringComparison_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task StartsWith_with_StringComparison_OrdinalIgnoreCase() + { + return base.StartsWith_with_StringComparison_OrdinalIgnoreCase(); + } + + [NotSupportedByProviderFact] + public override Task Static_Equals_with_Ordinal() + { + return base.Static_Equals_with_Ordinal(); + } + + [NotSupportedByProviderFact] + public override Task Static_Equals_with_OrdinalIgnoreCase() + { + return base.Static_Equals_with_OrdinalIgnoreCase(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs new file mode 100644 index 000000000..898a44502 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs @@ -0,0 +1,77 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class DateOnlyTranslationsFbTest : DateOnlyTranslationsTestBase +{ + public DateOnlyTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task DayNumber() + { + return base.DayNumber(); + } + + [NotSupportedByProviderFact] + public override Task DayNumber_subtraction() + { + return base.DayNumber_subtraction(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_constant_DateTime_with_property_TimeOnly() + { + return base.ToDateTime_constant_DateTime_with_property_TimeOnly(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_property_with_constant_TimeOnly() + { + return base.ToDateTime_property_with_constant_TimeOnly(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_property_with_property_TimeOnly() + { + return base.ToDateTime_property_with_property_TimeOnly(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_with_complex_DateTime() + { + return base.ToDateTime_with_complex_DateTime(); + } + + [NotSupportedByProviderFact] + public override Task ToDateTime_with_complex_TimeOnly() + { + return base.ToDateTime_with_complex_TimeOnly(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs new file mode 100644 index 000000000..99e4f57ea --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs @@ -0,0 +1,139 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class DateTimeOffsetTranslationsFbTest : DateTimeOffsetTranslationsTestBase +{ + public DateTimeOffsetTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + + + [NotSupportedOnFirebirdFact] + public override Task Now() + { + return base.Now(); + } + + [NotSupportedOnFirebirdFact] + public override Task UtcNow() + { + return base.UtcNow(); + } + + [NotSupportedOnFirebirdFact] + public override Task AddMilliseconds() + { + return base.AddMilliseconds(); + } + + [NotSupportedOnFirebirdFact] + public override Task AddMinutes() + { + return base.AddMinutes(); + } + + [NotSupportedOnFirebirdFact] + public override Task Date() + { + return base.Date(); + } + + [NotSupportedOnFirebirdFact] + public override Task Day() + { + return base.Day(); + } + + [NotSupportedOnFirebirdFact] + public override Task DayOfYear() + { + return base.DayOfYear(); + } + + [NotSupportedOnFirebirdFact] + public override Task Hour() + { + return base.Hour(); + } + + [NotSupportedOnFirebirdFact] + public override Task Microsecond() + { + return base.Microsecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Millisecond() + { + return base.Millisecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Minute() + { + return base.Minute(); + } + + [NotSupportedOnFirebirdFact] + public override Task Month() + { + return base.Month(); + } + + [NotSupportedOnFirebirdFact] + public override Task Nanosecond() + { + return base.Nanosecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Second() + { + return base.Second(); + } + + [NotSupportedOnFirebirdFact] + public override Task ToUnixTimeMilliseconds() + { + return base.ToUnixTimeMilliseconds(); + } + + [NotSupportedOnFirebirdFact] + public override Task ToUnixTimeSecond() + { + return base.ToUnixTimeSecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Year() + { + return base.Year(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs new file mode 100644 index 000000000..39e0c94b0 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs @@ -0,0 +1,55 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class DateTimeTranslationsFbTest : DateTimeTranslationsTestBase +{ + public DateTimeTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + + + [NotSupportedOnFirebirdFact] + public override Task UtcNow() + { + return base.UtcNow(); + } + + [NotSupportedByProviderFact] + public override Task subtract_and_TotalDays() + { + return base.subtract_and_TotalDays(); + } + + [NotSupportedByProviderFact] + public override Task TimeOfDay() + { + return base.TimeOfDay(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs new file mode 100644 index 000000000..663105e06 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs @@ -0,0 +1,65 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class TimeOnlyTranslationsFbTest : TimeOnlyTranslationsTestBase +{ + public TimeOnlyTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedByProviderFact] + public override Task Add_TimeSpan() + { + return base.Add_TimeSpan(); + } + + [NotSupportedByProviderFact] + public override Task IsBetween() + { + return base.IsBetween(); + } + + [NotSupportedOnFirebirdFact] + public override Task Microsecond() + { + return base.Microsecond(); + } + + [NotSupportedOnFirebirdFact] + public override Task Nanosecond() + { + return base.Nanosecond(); + } + + [NotSupportedByProviderFact] + public override Task Subtract() + { + return base.Subtract(); + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs new file mode 100644 index 000000000..c853a74f2 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs @@ -0,0 +1,49 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Niek Schoemaker (@niekschoemaker) + +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; +using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; +using Xunit.Abstractions; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; + +public class TimeSpanTranslationsFbTest : TimeSpanTranslationsTestBase +{ + public TimeSpanTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelper testOutputHelper) + : base(fixture) + { + Fixture.TestSqlLoggerFactory.Clear(); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + } + + [NotSupportedOnFirebirdFact] + public override Task Microseconds() + { + return base.Microseconds(); + } + + [NotSupportedOnFirebirdFact] + public override Task Nanoseconds() + { + return base.Nanoseconds(); + } + + +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs index 144862c74..c8bccb74d 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs @@ -16,6 +16,7 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using System; +using System.Data; using System.Threading.Tasks; using FirebirdSql.Data.FirebirdClient; using FirebirdSql.Data.Services; @@ -42,8 +43,15 @@ public FbTestStore(string name, bool shared) public Version ServerVersion { get; private set; } public bool ServerLessThan4() => ServerVersion < new Version(4, 0, 0, 0); + public bool ServerLessThan5() => ServerVersion < new Version(5, 0, 0, 0); + protected override async Task InitializeAsync(Func createContext, Func seed, Func clean) { + if (Connection.State != ConnectionState.Closed) + { + // Connections are maintained between tests, they have to be closed to create a new database + await Connection.CloseAsync(); + } // create database explicitly to specify Page Size and Forced Writes await FbConnection.CreateDatabaseAsync(ConnectionString, pageSize: 16384, forcedWrites: false, overwrite: true); await using (var context = createContext()) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQueryRootProcessor.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQueryRootProcessor.cs index 495717e39..d96b23fc8 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQueryRootProcessor.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQueryRootProcessor.cs @@ -26,7 +26,7 @@ public FbQueryRootProcessor(QueryTranslationPreprocessorDependencies dependencie : base(dependencies, relationalDependencies, queryCompilationContext) { } - protected override bool ShouldConvertToParameterQueryRoot(ParameterExpression constantExpression) + protected override bool ShouldConvertToParameterQueryRoot(QueryParameterExpression constantExpression) { return false; } diff --git a/src/Versions.props b/src/Versions.props index 25b76c150..3be7465ce 100644 --- a/src/Versions.props +++ b/src/Versions.props @@ -7,7 +7,7 @@ 12.0.0 10.3.2 - 9.0.1 + 10.0.0 From 2596baf91fd5ca0e3e646263c1cdf99040dbe40d Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Tue, 9 Dec 2025 06:42:30 -0300 Subject: [PATCH 10/39] Structured logging. (#1201) --- .../FirebirdClient/FbBatchCommand.cs | 5 +- .../FirebirdClient/FbCommand.cs | 3 +- .../FirebirdClient/FbConnection.cs | 3 +- .../FirebirdClient/FbTransaction.cs | 3 +- .../FirebirdSql.Data.FirebirdClient.csproj | 1 + .../Logging/ConsoleLoggingProvider.cs | 74 ----- .../Logging/FbLogLevel.cs | 28 -- .../Logging/FbLogManager.cs | 33 +- .../Logging/IFbLogger.cs | 43 --- .../Logging/IFbLoggingProvider.cs | 23 -- .../Logging/LogMessages.cs | 308 +++++------------- .../Logging/NullLoggingProvider.cs | 36 -- 12 files changed, 98 insertions(+), 462 deletions(-) delete mode 100644 src/FirebirdSql.Data.FirebirdClient/Logging/ConsoleLoggingProvider.cs delete mode 100644 src/FirebirdSql.Data.FirebirdClient/Logging/FbLogLevel.cs delete mode 100644 src/FirebirdSql.Data.FirebirdClient/Logging/IFbLogger.cs delete mode 100644 src/FirebirdSql.Data.FirebirdClient/Logging/IFbLoggingProvider.cs delete mode 100644 src/FirebirdSql.Data.FirebirdClient/Logging/NullLoggingProvider.cs diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchCommand.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchCommand.cs index c362a5df3..45c0e6727 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchCommand.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchCommand.cs @@ -19,18 +19,17 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; -using System.Data.Common; -using System.Text; using System.Threading; using System.Threading.Tasks; using FirebirdSql.Data.Common; using FirebirdSql.Data.Logging; +using Microsoft.Extensions.Logging; namespace FirebirdSql.Data.FirebirdClient; public sealed class FbBatchCommand : IFbPreparedCommand, IDescriptorFiller, IDisposable, IAsyncDisposable { - static readonly IFbLogger Log = FbLogManager.CreateLogger(nameof(FbBatchCommand)); + static readonly ILogger Log = FbLogManager.CreateLogger(); private const int DefaultBatchBufferSize = 16 * 1024 * 1024; diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbCommand.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbCommand.cs index f7481171b..551c6ea64 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbCommand.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbCommand.cs @@ -25,12 +25,13 @@ using System.Threading.Tasks; using FirebirdSql.Data.Common; using FirebirdSql.Data.Logging; +using Microsoft.Extensions.Logging; namespace FirebirdSql.Data.FirebirdClient; public sealed class FbCommand : DbCommand, IFbPreparedCommand, IDescriptorFiller, ICloneable { - static readonly IFbLogger Log = FbLogManager.CreateLogger(nameof(FbCommand)); + static readonly ILogger Log = FbLogManager.CreateLogger(); #region Fields diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnection.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnection.cs index bca335e38..0a75039aa 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnection.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbConnection.cs @@ -23,13 +23,14 @@ using System.Threading.Tasks; using FirebirdSql.Data.Common; using FirebirdSql.Data.Logging; +using Microsoft.Extensions.Logging; namespace FirebirdSql.Data.FirebirdClient; [DefaultEvent("InfoMessage")] public sealed class FbConnection : DbConnection, ICloneable { - static readonly IFbLogger Log = FbLogManager.CreateLogger(nameof(FbConnection)); + static readonly ILogger Log = FbLogManager.CreateLogger(); #region Static Pool Handling Methods diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbTransaction.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbTransaction.cs index 0b58f048f..81d157510 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbTransaction.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbTransaction.cs @@ -22,12 +22,13 @@ using System.Threading.Tasks; using FirebirdSql.Data.Common; using FirebirdSql.Data.Logging; +using Microsoft.Extensions.Logging; namespace FirebirdSql.Data.FirebirdClient; public sealed class FbTransaction : DbTransaction { - static readonly IFbLogger Log = FbLogManager.CreateLogger(nameof(FbTransaction)); + static readonly ILogger Log = FbLogManager.CreateLogger(); internal const IsolationLevel DefaultIsolationLevel = IsolationLevel.ReadCommitted; diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj b/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj index fd82e9e50..e9c00c82b 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj @@ -49,6 +49,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/FirebirdSql.Data.FirebirdClient/Logging/ConsoleLoggingProvider.cs b/src/FirebirdSql.Data.FirebirdClient/Logging/ConsoleLoggingProvider.cs deleted file mode 100644 index e25eef26d..000000000 --- a/src/FirebirdSql.Data.FirebirdClient/Logging/ConsoleLoggingProvider.cs +++ /dev/null @@ -1,74 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -using System; -using System.Text; - -namespace FirebirdSql.Data.Logging; - -[Obsolete("Use ConsoleLoggingProvider instead.")] -public class ConsoleLoggerProvider : ConsoleLoggingProvider -{ - public ConsoleLoggerProvider(FbLogLevel minimumLevel = FbLogLevel.Info) - : base(minimumLevel) - { } -} - -public class ConsoleLoggingProvider : IFbLoggingProvider -{ - readonly FbLogLevel _minimumLevel; - - public ConsoleLoggingProvider(FbLogLevel minimumLevel = FbLogLevel.Info) - { - _minimumLevel = minimumLevel; - } - - public IFbLogger CreateLogger(string name) => new ConsoleLogger(_minimumLevel); - - sealed class ConsoleLogger : IFbLogger - { - readonly FbLogLevel _minimumLevel; - - public ConsoleLogger(FbLogLevel minimumLevel) - { - _minimumLevel = minimumLevel; - } - - public bool IsEnabled(FbLogLevel level) - { - return level >= _minimumLevel; - } - - public void Log(FbLogLevel level, string msg, Exception exception = null) - { - if (!IsEnabled(level)) - return; - - var sb = new StringBuilder(); - sb.Append("["); - sb.Append(level.ToString().ToUpperInvariant()); - sb.Append("] "); - - sb.AppendLine(msg); - - if (exception != null) - sb.AppendLine(exception.ToString()); - - Console.Error.Write(sb.ToString()); - } - } -} diff --git a/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogLevel.cs b/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogLevel.cs deleted file mode 100644 index 3e48d9309..000000000 --- a/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogLevel.cs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -namespace FirebirdSql.Data.Logging; - -public enum FbLogLevel -{ - Trace = 1, - Debug = 2, - Info = 3, - Warn = 4, - Error = 5, - Fatal = 6, -} diff --git a/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogManager.cs b/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogManager.cs index 778e36d6c..08c36efca 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogManager.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogManager.cs @@ -15,37 +15,26 @@ //$Authors = Jiri Cincura (jiri@cincura.net) -using System; +using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Extensions.Logging; namespace FirebirdSql.Data.Logging; public static class FbLogManager { - public static IFbLoggingProvider Provider - { - get - { - _providerRetrieved = true; - return _provider; - } - set - { - if (_providerRetrieved) - throw new InvalidOperationException("The logging provider must be set before any action is taken"); + internal static ILoggerFactory LoggerFactory = NullLoggerFactory.Instance; + internal static bool IsParameterLoggingEnabled = false; - _provider = value ?? throw new ArgumentNullException(nameof(value)); - } + public static void UseLoggerFactory(ILoggerFactory loggerFactory) + { + LoggerFactory = loggerFactory; } - public static bool IsParameterLoggingEnabled { get; set; } - - static IFbLoggingProvider _provider; - static bool _providerRetrieved; - - static FbLogManager() + public static void EnableParameterLogging(bool enable = true) { - _provider = new NullLoggingProvider(); + IsParameterLoggingEnabled = enable; } - internal static IFbLogger CreateLogger(string name) => Provider.CreateLogger("FirebirdClient." + name); + internal static ILogger CreateLogger() => + LoggerFactory.CreateLogger(); } diff --git a/src/FirebirdSql.Data.FirebirdClient/Logging/IFbLogger.cs b/src/FirebirdSql.Data.FirebirdClient/Logging/IFbLogger.cs deleted file mode 100644 index f0f350524..000000000 --- a/src/FirebirdSql.Data.FirebirdClient/Logging/IFbLogger.cs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -using System; - -namespace FirebirdSql.Data.Logging; - -public interface IFbLogger -{ - bool IsEnabled(FbLogLevel level); - void Log(FbLogLevel level, string msg, Exception exception = null); -} - -public static class IFbLoggerExtensions -{ - public static void Trace(this IFbLogger logger, string msg) => logger.Log(FbLogLevel.Trace, msg); - public static void Debug(this IFbLogger logger, string msg) => logger.Log(FbLogLevel.Debug, msg); - public static void Info(this IFbLogger logger, string msg) => logger.Log(FbLogLevel.Info, msg); - public static void Warn(this IFbLogger logger, string msg) => logger.Log(FbLogLevel.Warn, msg); - public static void Error(this IFbLogger logger, string msg) => logger.Log(FbLogLevel.Error, msg); - public static void Fatal(this IFbLogger logger, string msg) => logger.Log(FbLogLevel.Fatal, msg); - - public static void Trace(this IFbLogger logger, string msg, Exception ex) => logger.Log(FbLogLevel.Trace, msg, ex); - public static void Debug(this IFbLogger logger, string msg, Exception ex) => logger.Log(FbLogLevel.Debug, msg, ex); - public static void Info(this IFbLogger logger, string msg, Exception ex) => logger.Log(FbLogLevel.Info, msg, ex); - public static void Warn(this IFbLogger logger, string msg, Exception ex) => logger.Log(FbLogLevel.Warn, msg, ex); - public static void Error(this IFbLogger logger, string msg, Exception ex) => logger.Log(FbLogLevel.Error, msg, ex); - public static void Fatal(this IFbLogger logger, string msg, Exception ex) => logger.Log(FbLogLevel.Fatal, msg, ex); -} diff --git a/src/FirebirdSql.Data.FirebirdClient/Logging/IFbLoggingProvider.cs b/src/FirebirdSql.Data.FirebirdClient/Logging/IFbLoggingProvider.cs deleted file mode 100644 index c152926af..000000000 --- a/src/FirebirdSql.Data.FirebirdClient/Logging/IFbLoggingProvider.cs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -namespace FirebirdSql.Data.Logging; - -public interface IFbLoggingProvider -{ - IFbLogger CreateLogger(string name); -} diff --git a/src/FirebirdSql.Data.FirebirdClient/Logging/LogMessages.cs b/src/FirebirdSql.Data.FirebirdClient/Logging/LogMessages.cs index e21b5227c..de197d0a2 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Logging/LogMessages.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Logging/LogMessages.cs @@ -16,274 +16,122 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using System; -using System.Text; +using System.Collections.Generic; +using System.Data.Common; +using System.Linq; using FirebirdSql.Data.FirebirdClient; +using Microsoft.Extensions.Logging; namespace FirebirdSql.Data.Logging; static class LogMessages { - public static void CommandExecution(IFbLogger log, FbCommand command) + public static void CommandExecution(ILogger log, FbCommand command) { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; - - var sb = new StringBuilder(); - sb.AppendLine("Command execution:"); - sb.AppendLine(command.CommandText); - if (FbLogManager.IsParameterLoggingEnabled) + if (!log.IsEnabled(LogLevel.Debug)) { - sb.AppendLine("Parameters:"); - if (!command.HasParameters) - { - sb.AppendLine(""); - } - else - { - foreach (FbParameter parameter in command.Parameters) - { - var name = parameter.ParameterName; - var type = parameter.FbDbType; - var value = !IsNullParameterValue(parameter.InternalValue) ? parameter.InternalValue : ""; - sb.AppendLine($"Name:{name}\tType:{type}\tUsed Value:{value}"); - } - } - } - log.Debug(sb.ToString()); - } - public static void CommandExecution(IFbLogger log, FbBatchCommand command) - { - if (!log.IsEnabled(FbLogLevel.Debug)) return; + } - var sb = new StringBuilder(); - sb.AppendLine("Command execution:"); - sb.AppendLine(command.CommandText); - if (FbLogManager.IsParameterLoggingEnabled) + if (!FbLogManager.IsParameterLoggingEnabled || !command.HasParameters) { - sb.AppendLine("Parameters:"); - if (command.HasParameters) - { - sb.AppendLine(""); - } - else - { - foreach (var batchParameter in command.BatchParameters) - { - foreach (FbParameter parameter in batchParameter) - { - var name = parameter.ParameterName; - var type = parameter.FbDbType; - var value = !IsNullParameterValue(parameter.InternalValue) ? parameter.InternalValue : ""; - sb.AppendLine($"Name:{name}\tType:{type}\tUsed Value:{value}"); - } - } - } + log.LogDebug("Command execution: {command}", command.CommandText); + return; } - log.Debug(sb.ToString()); + + var parameters = FbParameterCollectionToDictionary(command.Parameters); + log.LogDebug("Command execution: {command}, {parameters}", command.CommandText, parameters); } - public static void ConnectionOpening(IFbLogger log, FbConnection connection) + public static void CommandExecution(ILogger log, FbBatchCommand command) { - if (!log.IsEnabled(FbLogLevel.Debug)) + if (!log.IsEnabled(LogLevel.Debug)) + { return; + } - var sb = new StringBuilder(); - sb.AppendLine("Opening connection:"); - sb.AppendLine($"Connection String: {connection.ConnectionString}"); - log.Debug(sb.ToString()); - } - public static void ConnectionOpened(IFbLogger log, FbConnection connection) - { - if (!log.IsEnabled(FbLogLevel.Debug)) + if (!FbLogManager.IsParameterLoggingEnabled || !command.HasParameters) + { + log.LogDebug("Command execution: {command}", command.CommandText); return; + } - var sb = new StringBuilder(); - sb.AppendLine("Opened connection:"); - sb.AppendLine($"Connection String: {connection.ConnectionString}"); - log.Debug(sb.ToString()); + var parameters = command.BatchParameters.SelectMany(FbParameterCollectionToDictionary); + log.LogDebug("Command execution: {command}, {parameters}", command.CommandText, parameters); } - public static void ConnectionClosing(IFbLogger log, FbConnection connection) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; - var sb = new StringBuilder(); - sb.AppendLine("Closing connection:"); - sb.AppendLine($"Connection String: {connection.ConnectionString}"); - log.Debug(sb.ToString()); - } - public static void ConnectionClosed(IFbLogger log, FbConnection connection) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void ConnectionOpening(ILogger log, FbConnection connection) => + log.LogDebug("Opening connection: {connectionString}", connection.ConnectionString); - var sb = new StringBuilder(); - sb.AppendLine("Closed connection:"); - sb.AppendLine($"Connection String: {connection.ConnectionString}"); - log.Debug(sb.ToString()); - } + public static void ConnectionOpened(ILogger log, FbConnection connection) => + log.LogDebug("Opened connection: {connectionString}", connection.ConnectionString); - public static void TransactionBeginning(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void ConnectionClosing(ILogger log, FbConnection connection) => + log.LogDebug("Closing connection: {connectionString}", connection.ConnectionString); - var sb = new StringBuilder(); - sb.AppendLine("Beginning transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionBegan(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void ConnectionClosed(ILogger log, FbConnection connection) => + log.LogDebug("Closed connection: {connectionString}", connection.ConnectionString); - var sb = new StringBuilder(); - sb.AppendLine("Began transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionCommitting(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionBeginning(ILogger log, FbTransaction transaction) => + // TODO: Transaction Id? + log.LogDebug("Beginning transaction: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Committing transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionCommitted(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionBegan(ILogger log, FbTransaction transaction) => + log.LogDebug("Began transaction: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Committed transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionRollingBack(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionCommitting(ILogger log, FbTransaction transaction) => + log.LogDebug("Committing transaction: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Rolling back transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionRolledBack(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionCommitted(ILogger log, FbTransaction transaction) => + log.LogDebug("Committed transaction: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Rolled back transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionSaving(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionRollingBack(ILogger log, FbTransaction transaction) => + log.LogDebug("Rolling back transaction: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Creating savepoint:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionSaved(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionRolledBack(ILogger log, FbTransaction transaction) => + log.LogDebug("Rolled back transaction: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Created savepoint:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionReleasingSavepoint(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionSaving(ILogger log, FbTransaction transaction) => + log.LogDebug("Creating savepoint: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Releasing savepoint:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionReleasedSavepoint(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionSaved(ILogger log, FbTransaction transaction) => + log.LogDebug("Created savepoint: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Released savepoint:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionRollingBackSavepoint(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionReleasingSavepoint(ILogger log, FbTransaction transaction) => + log.LogDebug("Releasing savepoint: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Rolling back savepoint:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionRolledBackSavepoint(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionReleasedSavepoint(ILogger log, FbTransaction transaction) => + log.LogDebug("Released savepoint: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Rolled back savepoint:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionCommittingRetaining(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionRollingBackSavepoint(ILogger log, FbTransaction transaction) => + log.LogDebug("Rolling back savepoint: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Committing (retaining) transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionCommittedRetaining(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionRolledBackSavepoint(ILogger log, FbTransaction transaction) => + log.LogDebug("Rolled back savepoint: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Committed (retaining) transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionRollingBackRetaining(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionCommittingRetaining(ILogger log, FbTransaction transaction) => + log.LogDebug("Committing (retaining) transaction: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Rolling back (retaining) transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } - public static void TransactionRolledBackRetaining(IFbLogger log, FbTransaction transaction) - { - if (!log.IsEnabled(FbLogLevel.Debug)) - return; + public static void TransactionCommittedRetaining(ILogger log, FbTransaction transaction) => + log.LogDebug("Committed (retaining) transaction: {isolationLevel}", transaction.IsolationLevel); - var sb = new StringBuilder(); - sb.AppendLine("Rolled back (retaining) transaction:"); - sb.AppendLine($"Isolation Level: {transaction.IsolationLevel}"); - log.Debug(sb.ToString()); - } + public static void TransactionRollingBackRetaining(ILogger log, FbTransaction transaction) => + log.LogDebug("Rolling back (retaining) transaction: {isolationLevel}", transaction.IsolationLevel); + + public static void TransactionRolledBackRetaining(ILogger log, FbTransaction transaction) => + log.LogDebug("Rolled back (retaining) transaction: {isolationLevel}", transaction.IsolationLevel); + + private static object NormalizeDbNull(object value) => + value == DBNull.Value || value == null + ? null + : value; - static bool IsNullParameterValue(object value) => value == DBNull.Value || value == null; + private static Dictionary FbParameterCollectionToDictionary(FbParameterCollection parameters) => + parameters + .Cast() + .ToList() + .ToDictionary( + p => p.ParameterName, + p => NormalizeDbNull(p.Value) + ); } diff --git a/src/FirebirdSql.Data.FirebirdClient/Logging/NullLoggingProvider.cs b/src/FirebirdSql.Data.FirebirdClient/Logging/NullLoggingProvider.cs deleted file mode 100644 index bb2a5f16c..000000000 --- a/src/FirebirdSql.Data.FirebirdClient/Logging/NullLoggingProvider.cs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -using System; - -namespace FirebirdSql.Data.Logging; - -sealed class NullLoggingProvider : IFbLoggingProvider -{ - public IFbLogger CreateLogger(string name) => NullLogger.Instance; - - sealed class NullLogger : IFbLogger - { - internal static NullLogger Instance = new NullLogger(); - - NullLogger() { } - - public bool IsEnabled(FbLogLevel level) => false; - - public void Log(FbLogLevel level, string msg, Exception exception = null) { } - } -} From 50b318d200d30137eaf2d8b6fb239524d4983824 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Tue, 9 Dec 2025 11:06:05 +0100 Subject: [PATCH 11/39] Small cleanup around logging. --- .../Logging/FbLogManager.cs | 13 ++++------- .../Logging/LogMessages.cs | 23 ++++++++++--------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogManager.cs b/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogManager.cs index 08c36efca..e82cfd8fd 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogManager.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Logging/FbLogManager.cs @@ -22,18 +22,15 @@ namespace FirebirdSql.Data.Logging; public static class FbLogManager { - internal static ILoggerFactory LoggerFactory = NullLoggerFactory.Instance; - internal static bool IsParameterLoggingEnabled = false; + public static bool IsParameterLoggingEnabled { get; private set; } = false; - public static void UseLoggerFactory(ILoggerFactory loggerFactory) - { + private static ILoggerFactory LoggerFactory = NullLoggerFactory.Instance; + + public static void UseLoggerFactory(ILoggerFactory loggerFactory) => LoggerFactory = loggerFactory; - } - public static void EnableParameterLogging(bool enable = true) - { + public static void EnableParameterLogging(bool enable = true) => IsParameterLoggingEnabled = enable; - } internal static ILogger CreateLogger() => LoggerFactory.CreateLogger(); diff --git a/src/FirebirdSql.Data.FirebirdClient/Logging/LogMessages.cs b/src/FirebirdSql.Data.FirebirdClient/Logging/LogMessages.cs index de197d0a2..efb1a188e 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Logging/LogMessages.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Logging/LogMessages.cs @@ -33,14 +33,15 @@ public static void CommandExecution(ILogger log, FbCommand command) return; } - if (!FbLogManager.IsParameterLoggingEnabled || !command.HasParameters) + if (FbLogManager.IsParameterLoggingEnabled && command.HasParameters) + { + var parameters = FbParameterCollectionToDictionary(command.Parameters); + log.LogDebug("Command execution: {command}, {parameters}", command.CommandText, parameters); + } + else { log.LogDebug("Command execution: {command}", command.CommandText); - return; } - - var parameters = FbParameterCollectionToDictionary(command.Parameters); - log.LogDebug("Command execution: {command}, {parameters}", command.CommandText, parameters); } public static void CommandExecution(ILogger log, FbBatchCommand command) @@ -50,14 +51,15 @@ public static void CommandExecution(ILogger log, FbBatchCommand command) return; } - if (!FbLogManager.IsParameterLoggingEnabled || !command.HasParameters) + if (FbLogManager.IsParameterLoggingEnabled && command.HasParameters) + { + var parameters = command.BatchParameters.SelectMany(FbParameterCollectionToDictionary); + log.LogDebug("Command execution: {command}, {parameters}", command.CommandText, parameters); + } + else { log.LogDebug("Command execution: {command}", command.CommandText); - return; } - - var parameters = command.BatchParameters.SelectMany(FbParameterCollectionToDictionary); - log.LogDebug("Command execution: {command}, {parameters}", command.CommandText, parameters); } public static void ConnectionOpening(ILogger log, FbConnection connection) => @@ -129,7 +131,6 @@ private static object NormalizeDbNull(object value) => private static Dictionary FbParameterCollectionToDictionary(FbParameterCollection parameters) => parameters .Cast() - .ToList() .ToDictionary( p => p.ParameterName, p => NormalizeDbNull(p.Value) From ac9f3ad276779ceac792bad56943e3f7074d466c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20C=C3=ADsa=C5=99?= Date: Fri, 12 Dec 2025 18:37:48 +0100 Subject: [PATCH 12/39] Add deepWiki shield --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8949c0d75..7d5f084d1 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ * [Downloads](https://github.com/FirebirdSQL/NETProvider/releases) * [Issue tracker](https://github.com/FirebirdSQL/NETProvider/issues) * [Development mailing list](https://groups.google.com/forum/#!forum/firebird-net-provider) +* [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/FirebirdSQL/NETProvider) ## Builds From 8ee6adb04bf78cfaf62fa4e0e9cadb0fee475462 Mon Sep 17 00:00:00 2001 From: pl752 Date: Wed, 17 Dec 2025 16:11:28 +0500 Subject: [PATCH 13/39] Wrong offset calculation (#1246) --- .../Client/Managed/FirebirdNetworkHandlingWrapper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs index 19b0cb79b..17f068a30 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs @@ -122,12 +122,12 @@ public async ValueTask ReadAsync(byte[] buffer, int offset, int count, Canc public void Write(byte[] buffer, int offset, int count) { - for (var i = offset; i < count; i++) + for (var i = 0; i < count; i++) _outputBuffer.Enqueue(buffer[offset + i]); } public ValueTask WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default) { - for (var i = offset; i < count; i++) + for (var i = 0; i < count; i++) _outputBuffer.Enqueue(buffer[offset + i]); return ValueTask.CompletedTask; } From 8f4460b8da60e7dee61adb87fb179fb1de383a72 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Wed, 17 Dec 2025 19:27:43 +0100 Subject: [PATCH 14/39] Tune dependencies. --- .../FirebirdSql.Data.FirebirdClient.csproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj b/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj index e9c00c82b..a040e0613 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj @@ -39,17 +39,19 @@ + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - From 9f991c3ee03bdd2c9b9993a289c80f6d6e5e03fb Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Wed, 17 Dec 2025 19:28:20 +0100 Subject: [PATCH 15/39] Bump ADO.NET provider version. --- src/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Versions.props b/src/Versions.props index 3be7465ce..0914ce138 100644 --- a/src/Versions.props +++ b/src/Versions.props @@ -1,7 +1,7 @@ - 10.3.4 + 11.0.0-alpha1 From 0fd83068f811748ed361e74bb0c9811b775fb0cd Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Wed, 17 Dec 2025 19:28:44 +0100 Subject: [PATCH 16/39] Bump EFCore provider version. --- src/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Versions.props b/src/Versions.props index 0914ce138..75151cf37 100644 --- a/src/Versions.props +++ b/src/Versions.props @@ -5,8 +5,8 @@ - 12.0.0 - 10.3.2 + 13.0.0-alpha1 + 11.0.0-alpha1 10.0.0 From fd7e09954b56f8cc3144fe75061b649b2628643f Mon Sep 17 00:00:00 2001 From: Niek <32094562+niekschoemaker@users.noreply.github.com> Date: Thu, 8 Jan 2026 10:02:18 +0100 Subject: [PATCH 17/39] Fix GTT tables being mapped to views (#1250) --- .../Scaffolding/Internal/FbDatabaseModelFactory.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs index 7bc317d15..a636e2cb5 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs @@ -121,9 +121,9 @@ private IEnumerable GetTables(DbConnection connection, Func Date: Sun, 8 Feb 2026 11:27:11 +0100 Subject: [PATCH 18/39] Update copyright year. --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 183e41420..27f7e6a29 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -20,7 +20,7 @@ license.txt - 2025 + 2026 From 97eb898c5bc910e888426ce0b820347baca54872 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Sun, 8 Feb 2026 11:27:31 +0100 Subject: [PATCH 19/39] Downgrade version. New provider is not needed. --- src/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Versions.props b/src/Versions.props index 75151cf37..446e42512 100644 --- a/src/Versions.props +++ b/src/Versions.props @@ -6,7 +6,7 @@ 13.0.0-alpha1 - 11.0.0-alpha1 + 10.3.4 10.0.0 From 73e62c7aeac5fb1944879063b07127a7e990f8a9 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Sun, 8 Feb 2026 11:28:06 +0100 Subject: [PATCH 20/39] Final EFCore provider. --- src/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Versions.props b/src/Versions.props index 446e42512..e134dd2ec 100644 --- a/src/Versions.props +++ b/src/Versions.props @@ -5,7 +5,7 @@ - 13.0.0-alpha1 + 13.0.0 10.3.4 10.0.0 From fcec8034afdea2fc1846bf28a1b4e4f62a4ed166 Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Tue, 24 Mar 2026 09:51:54 -0300 Subject: [PATCH 21/39] GetIndexesQuery: Exclude expression indexes at the database level. Fix #1188. (#1262) --- .../Scaffolding/ScaffoldingTests.cs | 48 +++++++++++++++++++ .../Internal/FbDatabaseModelFactory.cs | 9 +++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Scaffolding/ScaffoldingTests.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Scaffolding/ScaffoldingTests.cs index 18e903462..4b33cb2eb 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Scaffolding/ScaffoldingTests.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Scaffolding/ScaffoldingTests.cs @@ -107,6 +107,54 @@ public async Task ReadsCorrectFieldType(string dataType) Assert.That(column.StoreType, Is.EqualTo(dataType)); } + [Test] + public async Task ExpressionIndexDoesNotBreakScaffolding() + { + var tableName = "TEST_EXPR_IDX"; + + using var commandTable = Connection.CreateCommand(); + commandTable.CommandText = $"recreate table {tableName} (ID INTEGER NOT NULL, DATA VARCHAR(100))"; + await commandTable.ExecuteNonQueryAsync(); + + using var commandIndex = Connection.CreateCommand(); + commandIndex.CommandText = $"create index IDX_EXPR on {tableName} computed by (upper(DATA))"; + await commandIndex.ExecuteNonQueryAsync(); + + var modelFactory = GetModelFactory(); + var model = modelFactory.Create(Connection.ConnectionString, new DatabaseModelFactoryOptions(new string[] { tableName })); + var table = model.Tables.Single(x => x.Name == tableName); + + Assert.That(table.Indexes, Has.None.Matches(x => x.Name == "IDX_EXPR")); + } + + [Test] + public async Task RegularIndexScaffoldedAlongsideExpressionIndex() + { + var tableName = "TEST_MIX_IDX"; + + using var commandTable = Connection.CreateCommand(); + commandTable.CommandText = $"recreate table {tableName} (ID INTEGER NOT NULL, DATA VARCHAR(100))"; + await commandTable.ExecuteNonQueryAsync(); + + using var commandRegularIndex = Connection.CreateCommand(); + commandRegularIndex.CommandText = $"create index IDX_REGULAR on {tableName} (DATA)"; + await commandRegularIndex.ExecuteNonQueryAsync(); + + using var commandExprIndex = Connection.CreateCommand(); + commandExprIndex.CommandText = $"create index IDX_EXPR_MIX on {tableName} computed by (upper(DATA))"; + await commandExprIndex.ExecuteNonQueryAsync(); + + var modelFactory = GetModelFactory(); + var model = modelFactory.Create(Connection.ConnectionString, new DatabaseModelFactoryOptions(new string[] { tableName })); + var table = model.Tables.Single(x => x.Name == tableName); + + Assert.Multiple(() => + { + Assert.That(table.Indexes, Has.Some.Matches(x => x.Name == "IDX_REGULAR")); + Assert.That(table.Indexes, Has.None.Matches(x => x.Name == "IDX_EXPR_MIX")); + }); + } + static IDatabaseModelFactory GetModelFactory() { return new FbDatabaseModelFactory(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs index a636e2cb5..d99193722 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs @@ -319,6 +319,7 @@ private void GetPrimaryKeys(DbConnection connection, IReadOnlyList ta { while (reader.Read()) { + var columns = reader.IsDBNull(3) ? string.Empty : reader.GetString(3); + if (string.IsNullOrEmpty(columns)) + { + continue; + } + var index = new DatabaseIndex { Table = table, @@ -344,7 +351,7 @@ private void GetIndexes(DbConnection connection, IReadOnlyList ta IsUnique = reader.GetBoolean(1), }; - foreach (var column in reader.GetString(3).Split(',')) + foreach (var column in columns.Split(',')) { index.Columns.Add(table.Columns.Single(y => y.Name == column.Trim())); } From cbecc824192a167b51656c0246cbe88bfffbb283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Cincura=20=E2=86=B9?= Date: Mon, 4 May 2026 08:56:42 +0200 Subject: [PATCH 22/39] Update contributing --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c7142416e..8bc7ccd07 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,16 +2,16 @@ Thanks for considering contributing. Here are some items to consider before starting (in no particular order). -* Check [tracker](https://github.com/FirebirdSQL/NETProvider/issues) if you want to start on something. -* Before you start working on something announce your intention on the mailing list (or in comment in tracker). +* Check [issues](https://github.com/FirebirdSQL/NETProvider/issues) if you want to start on something. +* Before you start working on something announce your intention on the mailing list (or comment on the issue). * Issue only complete PRs (no WIPs). * Make sure your PR doesn't contain unneccessary changes (whitespaces, new lines, ...). -* Consider squashing your commits. * Follow existing code formatting/styling (even for new files). +* Disclose AI usage. * Make sure you swept all corners (i.e. all build configurations are fine, works with all Firebird version, etc.). * Make sure your changes merge without conflicts. * Consider backward compatibility. * Don't be afraid to ask (i.e. backward compatibility). * Be prepared to do some changes after your PR is reviewed. * Consider whether your change is benefit for majority of users (opposite to only a small group). -* All contributions are licensed under [_Initial Developer's Public License_](license.txt). \ No newline at end of file +* All contributions are licensed under [_Initial Developer's Public License_](license.txt). From a61996cb5734af1e90a4083e9c9933e4de8b2e05 Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Thu, 7 May 2026 05:17:42 -0300 Subject: [PATCH 23/39] Scaffolding improvements (#120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Scaffolding improvements. - Ability to distinguish NUMERIC from DECIMAL datatypes. - Precision and Scale for NUMERIC/DECIMAL column types. - Collation for CHAR/VARCHAR column types. - Expression for COMPUTED BY columns. - Refactor GetColumnsQuery. * Scaffolding: retrieves BlobSegmentSize, CharacterSet, DomainName, IdentityType, IdentityStart and IdentityIncrement from database. * Adds tests for GENERATED BY identities. * Scaffolding: adds new data types (Firebird 4+). * Scaffolding: Adds Trim() to ColumnDomain. * Fix rebase error. * GetColumns: Fix integer subtypes. Minor formatting fixes. * Fix DECFLOAT (Firebird 4+). * Uses ServerVersionAtLeast. * Fix authors. * Remove unnecessary private modifiers. * Fix parameter name. * Trim() in SQL. * Removes modelFactory from SetUp. * Removes (Exception) from catch. * Use when clause for catch condition. * Use raw strings for queries. * Use parameterized queries. Removes string.Format(). * Fix SQL formatting (SQL keywords in uppercase, database objects in lowercase). * Apply Visual Studio suggested refactors. * Fix formatting of SQL query in FbDatabaseModelFactory --------- Co-authored-by: Jiri Cincura ↹ --- .../FbTestsSetup.cs | 2 +- .../Scaffolding/ScaffoldingTests.cs | 166 +++++++ .../Metadata/FbIdentityType.cs | 24 + .../Metadata/Internal/FbAnnotationNames.cs | 10 +- .../Internal/FbDatabaseModelFactory.cs | 410 ++++++++++-------- 5 files changed, 423 insertions(+), 189 deletions(-) create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird/Metadata/FbIdentityType.cs diff --git a/src/FirebirdSql.Data.TestsBase/FbTestsSetup.cs b/src/FirebirdSql.Data.TestsBase/FbTestsSetup.cs index b9b844a49..b7c9766a1 100644 --- a/src/FirebirdSql.Data.TestsBase/FbTestsSetup.cs +++ b/src/FirebirdSql.Data.TestsBase/FbTestsSetup.cs @@ -111,7 +111,7 @@ private static async Task CreateTables(FbConnection connection, Version serverVe commandText.Append("VARRAY_FIELD VARCHAR(30) [1:4],"); commandText.Append("BIG_ARRAY INTEGER [1:32767],"); commandText.Append("EXPR_FIELD COMPUTED BY (smallint_field * 1000),"); - commandText.Append("CS_FIELD CHAR(1) CHARACTER SET UNICODE_FSS,"); + commandText.Append("CS_FIELD CHAR(1) CHARACTER SET UNICODE_FSS COLLATE UNICODE_FSS,"); commandText.Append("UCCHAR_ARRAY CHAR(10) [1:10] CHARACTER SET UNICODE_FSS);"); await using (var command = new FbCommand(commandText.ToString(), connection)) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Scaffolding/ScaffoldingTests.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Scaffolding/ScaffoldingTests.cs index 4b33cb2eb..d9f9593bb 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Scaffolding/ScaffoldingTests.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Scaffolding/ScaffoldingTests.cs @@ -15,16 +15,28 @@ //$Authors = Jiri Cincura (jiri@cincura.net) +using System; using System.Linq; using System.Threading.Tasks; +using FirebirdSql.Data.FirebirdClient; +using FirebirdSql.EntityFrameworkCore.Firebird.Metadata; +using FirebirdSql.EntityFrameworkCore.Firebird.Metadata.Internal; using FirebirdSql.EntityFrameworkCore.Firebird.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; using NUnit.Framework; namespace FirebirdSql.EntityFrameworkCore.Firebird.Tests.Scaffolding; #pragma warning disable EF1001 public class ScaffoldingTests : EntityFrameworkCoreTestsBase { + public override async Task SetUp() + { + await base.SetUp(); + + await CreateScaffoldingObjectsAsync(); + } + [Test] public void JustCanRun() { @@ -108,6 +120,160 @@ public async Task ReadsCorrectFieldType(string dataType) } [Test] + public void CanScaffoldPrimaryKey() + { + var modelFactory = GetModelFactory(); + var databaseModel = modelFactory.Create(Connection, new DatabaseModelFactoryOptions()); + var testTable = databaseModel.Tables.Where(t => t.Name.Equals("TEST")).First(); + + Assert.NotNull(testTable.PrimaryKey); + Assert.AreEqual("INT_FIELD", testTable.PrimaryKey.Columns[0].Name); + } + + [Test] + public void CanScaffoldGeneratedByIdentities() + { + var modelFactory = GetModelFactory(); + var databaseModel = modelFactory.Create(Connection, new DatabaseModelFactoryOptions()); + var testTable = databaseModel.Tables.Where(t => t.Name == "SCAFFOLD_TEST").First(); + Assert.NotNull(testTable); + + var idDefaultColumn = testTable.Columns.Where(c => c.Name == "ID_DEFAULT").First(); + Assert.AreEqual(FbIdentityType.GeneratedByDefault, (FbIdentityType)(idDefaultColumn.GetAnnotation(FbAnnotationNames.IdentityType).Value)); + if (FbTestsSetup.ServerVersionAtLeast(ServerVersion, new Version(4, 0, 0, 0))) + { + Assert.IsNull(idDefaultColumn.FindAnnotation(FbAnnotationNames.IdentityStart)); + Assert.IsNull(idDefaultColumn.FindAnnotation(FbAnnotationNames.IdentityIncrement)); + + var testTableFirebird4 = databaseModel.Tables.Where(t => t.Name == "SCAFFOLD_NEW_FB4_TYPES").First(); + Assert.NotNull(testTableFirebird4); + + var idAlwaysColumn = testTableFirebird4.Columns.Where(c => c.Name == "ID_ALWAYS").First(); + Assert.AreEqual(FbIdentityType.GeneratedAlways, (FbIdentityType)idAlwaysColumn.GetAnnotation(FbAnnotationNames.IdentityType).Value); + Assert.AreEqual(2, Convert.ToInt32(idAlwaysColumn.GetAnnotation(FbAnnotationNames.IdentityStart).Value)); + Assert.AreEqual(3, Convert.ToInt32(idAlwaysColumn.GetAnnotation(FbAnnotationNames.IdentityIncrement).Value)); + } + } + + [Test] + public void CanScaffoldColumns() + { + var modelFactory = GetModelFactory(); + var databaseModel = modelFactory.Create(Connection, new DatabaseModelFactoryOptions()); + var testTable = databaseModel.Tables.Where(t => t.Name == "TEST").First(); + Assert.NotNull(testTable); + + var intColumn = testTable.Columns.Where(c => c.Name == "INT_FIELD").First(); + Assert.AreEqual("INTEGER", intColumn.StoreType); + Assert.AreEqual("0", intColumn.DefaultValueSql); + Assert.IsNull(intColumn.FindAnnotation(FbAnnotationNames.IdentityType)); + + var charColumn = testTable.Columns.Where(c => c.Name == "CHAR_FIELD").First(); + Assert.AreEqual("CHAR(30)", charColumn.StoreType); + + var varcharColumn = testTable.Columns.Where(c => c.Name == "VARCHAR_FIELD").First(); + Assert.AreEqual("VARCHAR(100)", varcharColumn.StoreType); + + var numericColumn = testTable.Columns.Where(c => c.Name == "NUMERIC_FIELD").First(); + Assert.AreEqual("NUMERIC(15,2)", numericColumn.StoreType); + + var decimalColumn = testTable.Columns.Where(c => c.Name == "DECIMAL_FIELD").First(); + Assert.AreEqual("DECIMAL(15,2)", decimalColumn.StoreType); + + var blobColumn = testTable.Columns.Where(c => c.Name == "BLOB_FIELD").First(); + Assert.AreEqual("BLOB SUB_TYPE BINARY", blobColumn.StoreType); + Assert.AreEqual(80, Convert.ToInt32(blobColumn.GetAnnotation(FbAnnotationNames.BlobSegmentSize).Value)); + + var clobColumn = testTable.Columns.Where(c => c.Name == "CLOB_FIELD").First(); + Assert.AreEqual("BLOB SUB_TYPE TEXT", clobColumn.StoreType); + Assert.AreEqual(80, Convert.ToInt32(clobColumn.GetAnnotation(FbAnnotationNames.BlobSegmentSize).Value)); + + var exprColumn = testTable.Columns.Where(c => c.Name == "EXPR_FIELD").First(); + Assert.AreEqual("(smallint_field * 1000)", exprColumn.ComputedColumnSql); + + var csColumn = testTable.Columns.Where(c => c.Name == "CS_FIELD").First(); + Assert.AreEqual("CHAR(1)", csColumn.StoreType); + Assert.AreEqual("UNICODE_FSS", csColumn.Collation); + Assert.AreEqual("UNICODE_FSS", csColumn.GetAnnotation(FbAnnotationNames.CharacterSet).Value.ToString()); + } + + [Test] + public void CanScaffoldFirebird4DataTypes() + { + if (!EnsureServerVersionAtLeast(new Version(4, 0, 0, 0))) + return; + + var modelFactory = GetModelFactory(); + var databaseModel = modelFactory.Create(Connection, new DatabaseModelFactoryOptions()); + var testTable = databaseModel.Tables.Where(t => t.Name == "SCAFFOLD_NEW_FB4_TYPES").First(); + Assert.NotNull(testTable); + + var int128Column = testTable.Columns.Where(c => c.Name == "INT128_FIELD").First(); + Assert.AreEqual("INT128", int128Column.StoreType); + + var decFloat16Column = testTable.Columns.Where(c => c.Name == "DECFLOAT_16_FIELD").First(); + Assert.AreEqual("DECFLOAT(16)", decFloat16Column.StoreType); + + var decFloat34Column = testTable.Columns.Where(c => c.Name == "DECFLOAT_34_FIELD").First(); + Assert.AreEqual("DECFLOAT(34)", decFloat34Column.StoreType); + + var timeWithTimeZoneColumn = testTable.Columns.Where(c => c.Name == "TWTZ_FIELD").First(); + Assert.AreEqual("TIME WITH TIME ZONE", timeWithTimeZoneColumn.StoreType); + + var timestampWithTimeZoneColumn = testTable.Columns.Where(c => c.Name == "TSWTZ_FIELD").First(); + Assert.AreEqual("TIMESTAMP WITH TIME ZONE", timestampWithTimeZoneColumn.StoreType); + } + + async Task CreateScaffoldingObjectsAsync() + { + await ExecuteDdlAsync(Connection, "DROP TABLE SCAFFOLD_NEW_FB4_TYPES", true); + + await ExecuteDdlAsync(Connection, "DROP TABLE SCAFFOLD_TEST", true); + + if (FbTestsSetup.ServerVersionAtLeast(ServerVersion, new Version(4, 0, 0, 0))) + { + await ExecuteDdlAsync(Connection, """ + CREATE TABLE SCAFFOLD_TEST ( + ID_DEFAULT INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1) + ) + """ + ); + + await ExecuteDdlAsync(Connection, """ + CREATE TABLE SCAFFOLD_NEW_FB4_TYPES ( + ID_ALWAYS INTEGER GENERATED ALWAYS AS IDENTITY (START WITH 2 INCREMENT BY 3), + INT128_FIELD INT128, + DECFLOAT_16_FIELD DECFLOAT(16), + DECFLOAT_34_FIELD DECFLOAT(34), + TWTZ_FIELD TIME WITH TIME ZONE, + TSWTZ_FIELD TIMESTAMP WITH TIME ZONE + ) + """); + } + else + { + await ExecuteDdlAsync(Connection, """ + CREATE TABLE SCAFFOLD_TEST ( + ID_DEFAULT INTEGER GENERATED BY DEFAULT AS IDENTITY + ) + """ + ); + } + } + + static async Task ExecuteDdlAsync(FbConnection connection, string ddlScript, bool ignoreErrors = false) + { + try + { + await using var command = new FbCommand(ddlScript, connection); + await command.ExecuteNonQueryAsync(); + } + catch when (ignoreErrors) + { + } + } + + [Test] public async Task ExpressionIndexDoesNotBreakScaffolding() { var tableName = "TEST_EXPR_IDX"; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Metadata/FbIdentityType.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Metadata/FbIdentityType.cs new file mode 100644 index 000000000..917dfd5f4 --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Metadata/FbIdentityType.cs @@ -0,0 +1,24 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Jiri Cincura (jiri@cincura.net) + +namespace FirebirdSql.EntityFrameworkCore.Firebird.Metadata; + +public enum FbIdentityType +{ + GeneratedAlways = 0, + GeneratedByDefault = 1, +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Metadata/Internal/FbAnnotationNames.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Metadata/Internal/FbAnnotationNames.cs index b4483d141..4e7abe2aa 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Metadata/Internal/FbAnnotationNames.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Metadata/Internal/FbAnnotationNames.cs @@ -25,5 +25,13 @@ public static class FbAnnotationNames public const string HiLoSequenceSchema = Prefix + nameof(HiLoSequenceSchema); public const string SequenceName = Prefix + nameof(SequenceName); public const string SequenceSchema = Prefix + nameof(SequenceSchema); - public const string SequenceNameSuffix = Prefix+ nameof(SequenceNameSuffix); + public const string SequenceNameSuffix = Prefix + nameof(SequenceNameSuffix); + + public const string BlobSegmentSize = Prefix + nameof(BlobSegmentSize); + public const string CharacterSet = Prefix + nameof(CharacterSet); + public const string DomainName = Prefix + nameof(DomainName); + + public const string IdentityType = Prefix + nameof(IdentityType); + public const string IdentityStart = Prefix + nameof(IdentityStart); + public const string IdentityIncrement = Prefix + nameof(IdentityIncrement); } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs index d99193722..3d0f487ef 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Scaffolding/Internal/FbDatabaseModelFactory.cs @@ -22,11 +22,11 @@ using System.Linq; using FirebirdSql.Data.FirebirdClient; using FirebirdSql.Data.Services; +using FirebirdSql.EntityFrameworkCore.Firebird.Metadata.Internal; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Scaffolding; using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; -using Microsoft.Extensions.Logging; namespace FirebirdSql.EntityFrameworkCore.Firebird.Scaffolding.Internal; @@ -39,7 +39,7 @@ public override DatabaseModel Create(string connectionString, DatabaseModelFacto using (var connection = new FbConnection(connectionString)) { return Create(connection, options); - } + }; } public override DatabaseModel Create(DbConnection connection, DatabaseModelFactoryOptions options) @@ -51,20 +51,18 @@ public override DatabaseModel Create(DbConnection connection, DatabaseModelFacto { connection.Open(); } - - var serverVersion = FbServerProperties.ParseServerVersion(connection.ServerVersion); - MajorVersionNumber = serverVersion.Major; - try { + var serverVersion = FbServerProperties.ParseServerVersion(connection.ServerVersion); + MajorVersionNumber = serverVersion.Major; + databaseModel.DatabaseName = connection.Database; - databaseModel.DefaultSchema = GetDefaultSchema(connection); + databaseModel.DefaultSchema = GetDefaultSchema(); - var schemaList = new List(); var tableList = options.Tables.ToList(); - var tableFilter = GenerateTableFilter(tableList, schemaList); + var tableFilter = GenerateTableFilter(tableList); - var tables = GetTables(connection, tableFilter); + var tables = GetTables(connection); foreach (var table in tables) { table.Database = databaseModel; @@ -85,34 +83,31 @@ public override DatabaseModel Create(DbConnection connection, DatabaseModelFacto } } - private static string GetDefaultSchema(DbConnection connection) - { - return null; - } - - private static Func GenerateTableFilter(IReadOnlyList tables, IReadOnlyList schemas) - { - return tables.Any() ? x => tables.Contains(x.Name) : _ => true; - } - - private const string GetTablesQuery = - @"SELECT - trim(r.RDB$RELATION_NAME), - r.RDB$DESCRIPTION, - r.RDB$RELATION_TYPE - FROM - RDB$RELATIONS r - WHERE - r.RDB$SYSTEM_FLAG is distinct from 1 - ORDER BY - r.RDB$RELATION_NAME"; - - private IEnumerable GetTables(DbConnection connection, Func filter) + private static string GetDefaultSchema() => null; + + private static Func GenerateTableFilter(IReadOnlyList tables) => + tables.Any() ? x => tables.Contains(x.Name) : _ => true; + + private const string GetTablesQuery = """ + SELECT + TRIM(r.rdb$relation_name) relation_name, + r.rdb$description description, + r.rdb$relation_type relation_type + FROM + rdb$relations r + WHERE + r.rdb$system_flag IS DISTINCT FROM 1 + ORDER BY + r.rdb$relation_name + """; + + private List GetTables(DbConnection connection) { using (var command = connection.CreateCommand()) { var tables = new List(); command.CommandText = GetTablesQuery; + using (var reader = command.ExecuteReader()) { while (reader.Read()) @@ -133,114 +128,168 @@ private IEnumerable GetTables(DbConnection connection, Func $""" + SELECT + TRIM(rf.rdb$field_name) column_name, + COALESCE(rf.rdb$null_flag, f.rdb$null_flag, 0) column_required, + + CASE COALESCE(f.rdb$field_type, 0) + WHEN 7 THEN + CASE f.rdb$field_sub_type + WHEN 0 THEN 'SMALLINT' + WHEN 1 THEN 'NUMERIC(' || (f.rdb$field_precision) || ',' || ABS(f.rdb$field_scale) || ')' + WHEN 2 THEN 'DECIMAL(' || (f.rdb$field_precision) || ',' || ABS(f.rdb$field_scale) || ')' + ELSE '?' + END + WHEN 8 THEN + CASE f.rdb$field_sub_type + WHEN 0 THEN 'INTEGER' + WHEN 1 THEN 'NUMERIC(' || (f.rdb$field_precision) || ',' || ABS(f.rdb$field_scale) || ')' + WHEN 2 THEN 'DECIMAL(' || (f.rdb$field_precision) || ',' || ABS(f.rdb$field_scale) || ')' + ELSE '?' + END WHEN 9 THEN 'QUAD' WHEN 10 THEN 'FLOAT' WHEN 12 THEN 'DATE' WHEN 13 THEN 'TIME' - WHEN 14 THEN 'CHAR(' || (TRUNC(F.RDB$FIELD_LENGTH / CH.RDB$BYTES_PER_CHARACTER)) || ')' + WHEN 14 THEN 'CHAR(' || (TRUNC(f.rdb$field_length / ch.rdb$bytes_per_character)) || ')' WHEN 16 THEN - CASE F.RDB$FIELD_SUB_TYPE - WHEN 0 THEN 'BIGINT' - WHEN 1 THEN 'NUMERIC(' || (F.RDB$FIELD_PRECISION) || ',' || ABS(F.RDB$FIELD_SCALE) || ')' - WHEN 2 THEN 'DECIMAL(' || (F.RDB$FIELD_PRECISION) || ',' || ABS(F.RDB$FIELD_SCALE) || ')' - ELSE '?' - END + CASE f.rdb$field_sub_type + WHEN 0 THEN 'BIGINT' + WHEN 1 THEN 'NUMERIC(' || (f.rdb$field_precision) || ',' || ABS(f.rdb$field_scale) || ')' + WHEN 2 THEN 'DECIMAL(' || (f.rdb$field_precision) || ',' || ABS(f.rdb$field_scale) || ')' + ELSE '?' + END WHEN 23 THEN 'BOOLEAN' + WHEN 24 THEN 'DECFLOAT(' || (f.rdb$field_precision) || ')' + WHEN 25 THEN 'DECFLOAT(' || (f.rdb$field_precision) || ')' + WHEN 26 THEN 'INT128' WHEN 27 THEN 'DOUBLE PRECISION' + WHEN 28 THEN 'TIME WITH TIME ZONE' + WHEN 29 THEN 'TIMESTAMP WITH TIME ZONE' WHEN 35 THEN 'TIMESTAMP' - WHEN 37 THEN 'VARCHAR(' || (TRUNC(F.RDB$FIELD_LENGTH / CH.RDB$BYTES_PER_CHARACTER)) || ')' - WHEN 40 THEN 'CSTRING' || (TRUNC(F.RDB$FIELD_LENGTH / CH.RDB$BYTES_PER_CHARACTER)) || ')' + WHEN 37 THEN 'VARCHAR(' || (TRUNC(f.rdb$field_length / ch.rdb$bytes_per_character)) || ')' + WHEN 40 THEN 'CSTRING(' || (TRUNC(f.rdb$field_length / ch.rdb$bytes_per_character)) || ')' WHEN 45 THEN 'BLOB_ID' WHEN 261 THEN 'BLOB SUB_TYPE ' || - CASE F.RDB$FIELD_SUB_TYPE - WHEN 0 THEN 'BINARY' - WHEN 1 THEN 'TEXT' - ELSE F.RDB$FIELD_SUB_TYPE - END - ELSE 'RDB$FIELD_TYPE: ' || F.RDB$FIELD_TYPE || '?' - END as STORE_TYPE, - F.rdb$description as COLUMN_COMMENT, - COALESCE({1}, 0) as AUTO_GENERATED, - ch.RDB$CHARACTER_SET_NAME as CHARACTER_SET_NAME - FROM - RDB$RELATION_FIELDS RF - JOIN RDB$FIELDS F ON(F.RDB$FIELD_NAME = RF.RDB$FIELD_SOURCE) - LEFT OUTER JOIN RDB$CHARACTER_SETS CH ON(CH.RDB$CHARACTER_SET_ID = F.RDB$CHARACTER_SET_ID) - WHERE - trim(RF.RDB$RELATION_NAME) = '" + "{0}" + @"' - AND COALESCE(RF.RDB$SYSTEM_FLAG, 0) = 0 - ORDER BY - RF.RDB$FIELD_POSITION;"; - - private void GetColumns(DbConnection connection, IReadOnlyList tables, Func tableFilter) + CASE f.rdb$field_sub_type + WHEN 0 THEN 'BINARY' + WHEN 1 THEN 'TEXT' + ELSE f.rdb$field_sub_type + END + ELSE 'RDB$FIELD_TYPE: ' || f.rdb$field_type || '?' + END column_store_type, + + rf.rdb$field_source column_domain, + + NULLIF(ch.rdb$character_set_name, d.rdb$character_set_name) character_set_name, + co.rdb$collation_name collation_name, + COALESCE(f.rdb$segment_length, 0) segment_length, + + COALESCE(rf.rdb$default_source, f.rdb$default_source) column_default, + f.rdb$computed_source column_computed_source, + f.rdb$description column_comment, + + COALESCE({(MajorVersionNumber < 3 ? "NULL" : "rf.rdb$identity_type")}, -1) identity_type, + COALESCE({(MajorVersionNumber < 3 ? "NULL" : "g.rdb$initial_value")}, 1) identity_start, + COALESCE({(MajorVersionNumber < 3 ? "NULL" : "g.rdb$generator_increment")}, 1) identity_increment + FROM + rdb$relation_fields rf + JOIN rdb$fields f ON f.rdb$field_name = rf.rdb$field_source + LEFT JOIN rdb$character_sets ch ON ch.rdb$character_set_id = f.rdb$character_set_id + LEFT JOIN rdb$collations co ON co.rdb$character_set_id = f.rdb$character_set_id AND co.rdb$collation_id = rf.rdb$collation_id + {(MajorVersionNumber < 3 ? "" : "LEFT JOIN rdb$generators g ON g.rdb$generator_name = rf.rdb$generator_name")} + CROSS JOIN rdb$database d + WHERE + TRIM(rf.rdb$relation_name) = @RelationName AND COALESCE(rf.rdb$system_flag, 0) = 0 + ORDER BY + rf.rdb$field_position + """; + + private void GetColumns(DbConnection connection, IReadOnlyList tables) { - var identityType = MajorVersionNumber < 3 ? "null" : "rf.RDB$IDENTITY_TYPE"; - foreach (var table in tables) { using (var command = connection.CreateCommand()) { - command.CommandText = string.Format(GetColumnsQuery, table.Name, identityType); + command.CommandText = GetColumnsQuery(); + command.Parameters.Add(new FbParameter("@RelationName", table.Name)); + using (var reader = command.ExecuteReader()) { while (reader.Read()) { var name = reader["COLUMN_NAME"].ToString(); - var defaultValue = reader["COLUMN_DEFAULT"].ToString(); - var nullable = !Convert.ToBoolean(reader["NOT_NULL"]); - var autoGenerated = Convert.ToBoolean(reader["AUTO_GENERATED"]); - var storeType = reader["STORE_TYPE"].ToString(); - var charset = reader["CHARACTER_SET_NAME"].ToString(); - var comment = reader["COLUMN_COMMENT"].ToString(); + var isNullable = !Convert.ToBoolean(reader["COLUMN_REQUIRED"]); + var storeType = reader["COLUMN_STORE_TYPE"].ToString(); + var columnDomain = reader["COLUMN_DOMAIN"].ToString(); - var valueGenerated = ValueGenerated.Never; + var charset = reader["CHARACTER_SET_NAME"].ToString(); + var collation = reader["COLLATION_NAME"].ToString(); + var segmentSize = Convert.ToInt32(reader["SEGMENT_LENGTH"]); - if (autoGenerated) - { - valueGenerated = ValueGenerated.OnAdd; - } + var defaultValue = reader["COLUMN_DEFAULT"].ToString(); + var computedSource = reader["COLUMN_COMPUTED_SOURCE"].ToString(); + var comment = reader["COLUMN_COMMENT"].ToString(); + + var identityType = Convert.ToInt32(reader["IDENTITY_TYPE"]); + var identityStart = Convert.ToInt32(reader["IDENTITY_START"]); + var identityIncrement = Convert.ToInt32(reader["IDENTITY_INCREMENT"]); var column = new DatabaseColumn { Table = table, Name = name, StoreType = storeType, - IsNullable = nullable, - DefaultValueSql = CreateDefaultValueString(defaultValue), - ValueGenerated = valueGenerated, + IsNullable = isNullable, + + DefaultValueSql = string.IsNullOrEmpty(defaultValue) ? null : defaultValue.Remove(0, 8), + ValueGenerated = identityType == -1 ? ValueGenerated.Never : ValueGenerated.OnAdd, Comment = string.IsNullOrEmpty(comment) ? null : comment, + Collation = string.IsNullOrEmpty(collation) ? null : collation.Trim(), + ComputedColumnSql = string.IsNullOrEmpty(computedSource) ? null : computedSource }; + if (segmentSize > 0) + { + column.SetAnnotation(FbAnnotationNames.BlobSegmentSize, segmentSize); + } + + if (!string.IsNullOrEmpty(charset)) + { + column.SetAnnotation(FbAnnotationNames.CharacterSet, charset.Trim()); + } + + if (!columnDomain.StartsWith("RDB$")) + { + column.SetAnnotation(FbAnnotationNames.DomainName, columnDomain.Trim()); + } + + if (identityType != -1) + { + column.SetAnnotation(FbAnnotationNames.IdentityType, identityType); + } + + if (identityStart != 1) + { + column.SetAnnotation(FbAnnotationNames.IdentityStart, identityStart); + } + + if (identityIncrement != 1) + { + column.SetAnnotation(FbAnnotationNames.IdentityIncrement, identityIncrement); + } + table.Columns.Add(column); } } @@ -248,91 +297,75 @@ private void GetColumns(DbConnection connection, IReadOnlyList ta } } - private string CreateDefaultValueString(string defaultValue) + private const string GetPrimaryKeysQuery = """ + SELECT + TRIM(i.rdb$index_name) index_name, + TRIM(sg.rdb$field_name) field_name + FROM + rdb$indices i + LEFT JOIN rdb$index_segments sg ON i.rdb$index_name = sg.rdb$index_name + LEFT JOIN rdb$relation_constraints rc ON rc.rdb$index_name = i.rdb$index_name + WHERE + rc.rdb$constraint_type = 'PRIMARY KEY' AND TRIM(i.rdb$relation_name) = @RelationName + ORDER BY + sg.rdb$field_position + """; + + private static void GetPrimaryKeys(DbConnection connection, IReadOnlyList tables) { - if (defaultValue == null) - { - return null; - } - if (defaultValue.StartsWith("default ")) - { - return defaultValue.Remove(0, 8); - } - else - { - return null; - } - - } - - private const string GetPrimaryQuery = - @"SELECT - trim(i.rdb$index_name) as INDEX_NAME, - trim(sg.rdb$field_name) as FIELD_NAME - FROM - RDB$INDICES i - LEFT JOIN rdb$index_segments sg on i.rdb$index_name = sg.rdb$index_name - LEFT JOIN rdb$relation_constraints rc on rc.rdb$index_name = I.rdb$index_name - WHERE - rc.rdb$constraint_type = 'PRIMARY KEY' - AND trim(i.rdb$relation_name) = '{0}' - ORDER BY sg.RDB$FIELD_POSITION;"; - - private void GetPrimaryKeys(DbConnection connection, IReadOnlyList tables) - { - foreach (var x in tables) + foreach (var table in tables) { using (var command = connection.CreateCommand()) { - command.CommandText = string.Format(GetPrimaryQuery, x.Name); + command.CommandText = GetPrimaryKeysQuery; + command.Parameters.Add(new FbParameter("@RelationName", table.Name)); using (var reader = command.ExecuteReader()) { DatabasePrimaryKey index = null; while (reader.Read()) { - if (index == null) + index ??= new DatabasePrimaryKey { - index = new DatabasePrimaryKey - { - Table = x, - Name = reader.GetString(0).Trim() - }; - } - index.Columns.Add(x.Columns.Single(y => y.Name == reader.GetString(1).Trim())); - x.PrimaryKey = index; + Table = table, + Name = reader.GetString(0).Trim() + }; + index.Columns.Add(table.Columns.Single(y => y.Name == reader.GetString(1).Trim())); + table.PrimaryKey = index; } } } } } - private const string GetIndexesQuery = - @"SELECT - trim(I.rdb$index_name) as INDEX_NAME, - COALESCE(I.rdb$unique_flag, 0) as IS_UNIQUE, - Coalesce(I.rdb$index_type, 0) as IS_DESC, - list(trim(sg.RDB$FIELD_NAME)) as COLUMNS - FROM - RDB$INDICES i - LEFT JOIN rdb$index_segments sg on i.rdb$index_name = sg.rdb$index_name - LEFT JOIN rdb$relation_constraints rc on rc.rdb$index_name = I.rdb$index_name and rc.rdb$constraint_type = null - WHERE - trim(i.rdb$relation_name) = '{0}' - AND i.RDB$EXPRESSION_SOURCE IS NULL - GROUP BY - INDEX_NAME, IS_UNIQUE, IS_DESC ;"; + private const string GetIndexesQuery = """ + SELECT + TRIM(i.rdb$index_name) index_name, + COALESCE(i.rdb$unique_flag, 0) is_unique, + Coalesce(i.rdb$index_type, 0) is_desc, + LIST(TRIM(sg.rdb$field_name)) columns + FROM + RDB$INDICES i + LEFT JOIN rdb$index_segments sg ON i.rdb$index_name = sg.rdb$index_name + LEFT JOIN rdb$relation_constraints rc ON rc.rdb$index_name = i.rdb$index_name + WHERE + TRIM(i.rdb$relation_name) = @RelationName + AND i.RDB$EXPRESSION_SOURCE IS NULL + GROUP BY + index_name, is_unique, is_desc + """; /// /// Primary keys are handled as in , not here /// - private void GetIndexes(DbConnection connection, IReadOnlyList tables, Func tableFilter) + private static void GetIndexes(DbConnection connection, IReadOnlyList tables) { foreach (var table in tables) { using (var command = connection.CreateCommand()) { - command.CommandText = string.Format(GetIndexesQuery, table.Name); + command.CommandText = GetIndexesQuery; + command.Parameters.Add(new FbParameter("@RelationName", table.Name)); using (var reader = command.ExecuteReader()) { @@ -370,33 +403,38 @@ private void GetIndexes(DbConnection connection, IReadOnlyList ta } } - private const string GetConstraintsQuery = - @"SELECT - trim(drs.rdb$constraint_name) as CONSTRAINT_NAME, - trim(drs.RDB$RELATION_NAME) as TABLE_NAME, - trim(mrc.rdb$relation_name) AS REFERENCED_TABLE_NAME, - (select list(trim(di.rdb$field_name)||'|'||trim(mi.rdb$field_name)) - from - rdb$index_segments di - join rdb$index_segments mi on mi.RDB$FIELD_POSITION=di.RDB$FIELD_POSITION and mi.rdb$index_name = mrc.rdb$index_name - where - di.rdb$index_name = drs.rdb$index_name) as PAIRED_COLUMNS, - trim(rc.RDB$DELETE_RULE) as DELETE_RULE - FROM - rdb$relation_constraints drs - left JOIN rdb$ref_constraints rc ON drs.rdb$constraint_name = rc.rdb$constraint_name - left JOIN rdb$relation_constraints mrc ON rc.rdb$const_name_uq = mrc.rdb$constraint_name - WHERE - drs.rdb$constraint_type = 'FOREIGN KEY' - AND trim(drs.RDB$RELATION_NAME) = '{0}' "; - - private void GetConstraints(DbConnection connection, IReadOnlyList tables) + private const string GetConstraintsQuery = """ + SELECT + TRIM(drs.rdb$constraint_name) constraint_name, + TRIM(drs.rdb$relation_name) table_name, + TRIM(mrc.rdb$relation_name) referenced_table_name, + ( + SELECT + LIST(TRIM(di.rdb$field_name) || '|' || TRIM(mi.rdb$field_name)) + FROM + rdb$index_segments di + join rdb$index_segments mi ON mi.rdb$field_position = di.rdb$field_position AND mi.rdb$index_name = mrc.rdb$index_name + WHERE + di.rdb$index_name = drs.rdb$index_name + ) paired_columns, + TRIM(rc.rdb$delete_rule) delete_rule + FROM + rdb$relation_constraints drs + LEFT JOIN rdb$ref_constraints rc ON drs.rdb$constraint_name = rc.rdb$constraint_name + LEFT JOIN rdb$relation_constraints mrc ON rc.rdb$const_name_uq = mrc.rdb$constraint_name + WHERE + drs.rdb$constraint_type = 'FOREIGN KEY' AND TRIM(drs.rdb$relation_name) = @RelationName + """; + + private static void GetConstraints(DbConnection connection, IReadOnlyList tables) { foreach (var table in tables) { using (var command = connection.CreateCommand()) { - command.CommandText = string.Format(GetConstraintsQuery, table.Name); + command.CommandText = GetConstraintsQuery; + command.Parameters.Add(new FbParameter("@RelationName", table.Name)); + using (var reader = command.ExecuteReader()) { while (reader.Read()) @@ -419,9 +457,8 @@ private void GetConstraints(DbConnection connection, IReadOnlyList + onDeleteAction.ToUpperInvariant() switch { "RESTRICT" => ReferentialAction.Restrict, "CASCADE" => ReferentialAction.Cascade, @@ -429,5 +466,4 @@ private void GetConstraints(DbConnection connection, IReadOnlyList ReferentialAction.NoAction, _ => null, }; - } } From 34acfda601380e4626605191def614c2fc9e8f34 Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Wed, 13 May 2026 04:15:34 -0300 Subject: [PATCH 24/39] Add tests for Value column quoting in Single/SingleOrDefault queries. Fix #1234 (#1263) --- .../Query/ElementaryTests.cs | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Query/ElementaryTests.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Query/ElementaryTests.cs index 3c73dd6c5..18aa34361 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Query/ElementaryTests.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Query/ElementaryTests.cs @@ -209,6 +209,42 @@ public async Task SelectWithCollate() StringAssert.Contains(@"CAST(_UTF8'test' AS VARCHAR(4) CHARACTER SET UTF8) COLLATE UNICODE_CI_AI", sql); } } + + [Test] + public async Task SqlQueryScalarSingleQuotesValueColumn() + { + await using (var db = await GetDbContext()) + { + var query = db.Database.SqlQueryRaw(@"SELECT 1 AS ""Value"" FROM RDB$DATABASE"); + Assert.DoesNotThrowAsync(() => query.SingleAsync()); + var sql = db.LastCommandText; + StringAssert.Contains(@".""Value""", sql); + } + } + + [Test] + public async Task SqlQueryScalarSingleOrDefaultQuotesValueColumn() + { + await using (var db = await GetDbContext()) + { + var query = db.Database.SqlQueryRaw(@"SELECT 1 AS ""Value"" FROM RDB$DATABASE"); + Assert.DoesNotThrowAsync(() => query.SingleOrDefaultAsync()); + var sql = db.LastCommandText; + StringAssert.Contains(@".""Value""", sql); + } + } + + [Test] + public async Task SqlQueryScalarComposedWhereQuotesValueColumn() + { + await using (var db = await GetDbContext()) + { + var query = db.Database.SqlQueryRaw(@"SELECT 1 AS ""Value"" FROM RDB$DATABASE").Where(x => x > 0); + Assert.DoesNotThrowAsync(() => query.LoadAsync()); + var sql = db.LastCommandText; + StringAssert.Contains(@".""Value""", sql); + } + } } class SelectContext : FbTestDbContext From 8ae5d9ee48e09bcc88c006aba2a5f50357a91969 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Thu, 8 Oct 2026 14:51:44 +0200 Subject: [PATCH 25/39] Fix not equals for FbZonedDateTime and FbZonedTime. --- src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs | 2 +- src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs index 54e7e5c7b..3525dc009 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs @@ -101,5 +101,5 @@ object IConvertible.ToType(Type conversionType, IFormatProvider provider) public static bool operator ==(FbZonedDateTime lhs, FbZonedDateTime rhs) => lhs.Equals(rhs); - public static bool operator !=(FbZonedDateTime lhs, FbZonedDateTime rhs) => lhs.Equals(rhs); + public static bool operator !=(FbZonedDateTime lhs, FbZonedDateTime rhs) => !lhs.Equals(rhs); } diff --git a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs index f4f34506f..ff3758820 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs @@ -100,5 +100,5 @@ object IConvertible.ToType(Type conversionType, IFormatProvider provider) public static bool operator ==(FbZonedTime lhs, FbZonedTime rhs) => lhs.Equals(rhs); - public static bool operator !=(FbZonedTime lhs, FbZonedTime rhs) => lhs.Equals(rhs); + public static bool operator !=(FbZonedTime lhs, FbZonedTime rhs) => !lhs.Equals(rhs); } From 1ebed4a0e33875ea6b129f41af45d43072dd22f7 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Thu, 8 Oct 2026 14:52:38 +0200 Subject: [PATCH 26/39] Fix not equals for FbDecFloat. --- src/FirebirdSql.Data.FirebirdClient/Types/FbDecFloat.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FirebirdSql.Data.FirebirdClient/Types/FbDecFloat.cs b/src/FirebirdSql.Data.FirebirdClient/Types/FbDecFloat.cs index dc8e5c886..b6b6e6c0a 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Types/FbDecFloat.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Types/FbDecFloat.cs @@ -154,7 +154,7 @@ public bool Equals(FbDecFloat other) public static bool operator !=(FbDecFloat lhs, FbDecFloat rhs) { - return lhs.Equals(rhs); + return !lhs.Equals(rhs); } static FbDecFloat ParseNumber(IFormattable formattable, string format) From ea44018af458fed8cd8c98a2df13d454abff247d Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Thu, 8 Oct 2026 15:11:19 +0200 Subject: [PATCH 27/39] Fix GetHashCode/Equals discrepancy. Add tests. --- .../FbZonedDateTimeTypeTests.cs | 7 +++++++ .../FbZonedTimeTypeTests.cs | 7 +++++++ .../Types/FbZonedDateTime.cs | 15 ++++++--------- .../Types/FbZonedTime.cs | 15 ++++++--------- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedDateTimeTypeTests.cs b/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedDateTimeTypeTests.cs index b69dc7044..7776c2139 100644 --- a/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedDateTimeTypeTests.cs +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedDateTimeTypeTests.cs @@ -29,6 +29,7 @@ public class FbZonedDateTimeTypeTests { new object[] { new FbZonedDateTime(new DateTime(2020, 12, 4, 10, 38, 0, DateTimeKind.Utc), "UTC"), new FbZonedDateTime(new DateTime(2020, 12, 4, 10, 38, 0, DateTimeKind.Utc), "UTC") }, new object[] { new FbZonedDateTime(new DateTime(2020, 12, 4, 10, 38, 0, DateTimeKind.Utc), "UTC"), new FbZonedDateTime(new DateTime(2020, 12, 4, 10, 38, 0, DateTimeKind.Utc), "utc") }, + new object[] { new FbZonedDateTime(new DateTime(2020, 12, 4, 10, 38, 0, DateTimeKind.Utc), "UTC"), new FbZonedDateTime(new DateTime(2020, 12, 4, 10, 38, 0, DateTimeKind.Utc), "UTC", TimeSpan.Zero) }, }; [TestCaseSource(nameof(SimpleEqualityTrueSource))] public void EqualityTrue(FbZonedDateTime expected, FbZonedDateTime actual) @@ -36,6 +37,12 @@ public void EqualityTrue(FbZonedDateTime expected, FbZonedDateTime actual) Assert.AreEqual(expected, actual); } + [TestCaseSource(nameof(SimpleEqualityTrueSource))] + public void HashCodeEqual(FbZonedDateTime expected, FbZonedDateTime actual) + { + Assert.AreEqual(expected.GetHashCode(), actual.GetHashCode()); + } + static readonly object[] SimpleEqualityFalseSource = new object[] { new object[] { new FbZonedDateTime(new DateTime(2020, 12, 4, 10, 38, 0, DateTimeKind.Utc), "UTC"), new FbZonedDateTime(new DateTime(2020, 12, 4, 10, 38, 1, DateTimeKind.Utc), "UTC") }, diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedTimeTypeTests.cs b/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedTimeTypeTests.cs index 959c2a579..6f103b5be 100644 --- a/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedTimeTypeTests.cs +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedTimeTypeTests.cs @@ -29,6 +29,7 @@ public class FbZonedTimeTypeTests { new object[] { new FbZonedTime(TimeSpan.FromMinutes(142), "UTC"), new FbZonedTime(TimeSpan.FromMinutes(142), "UTC") }, new object[] { new FbZonedTime(TimeSpan.FromMinutes(142), "UTC"), new FbZonedTime(TimeSpan.FromMinutes(142), "utc") }, + new object[] { new FbZonedTime(TimeSpan.FromMinutes(142), "UTC"), new FbZonedTime(TimeSpan.FromMinutes(142), "UTC", TimeSpan.Zero) }, }; [TestCaseSource(nameof(SimpleEqualityTrueSource))] public void EqualityTrue(FbZonedTime expected, FbZonedTime actual) @@ -36,6 +37,12 @@ public void EqualityTrue(FbZonedTime expected, FbZonedTime actual) Assert.AreEqual(expected, actual); } + [TestCaseSource(nameof(SimpleEqualityTrueSource))] + public void HashCodeEqual(FbZonedTime expected, FbZonedTime actual) + { + Assert.AreEqual(expected.GetHashCode(), actual.GetHashCode()); + } + static readonly object[] SimpleEqualityFalseSource = new object[] { new object[] { new FbZonedTime(TimeSpan.FromMinutes(142), "UTC"), new FbZonedTime(TimeSpan.FromMinutes(141), "UTC") }, diff --git a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs index 3525dc009..6b5abb9dc 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs @@ -59,19 +59,16 @@ public override bool Equals(object obj) return obj is FbZonedDateTime fbZonedDateTime && Equals(fbZonedDateTime); } + // Offset is intentionally excluded, it's derived from DateTime and TimeZone and only present in extended bind. public override int GetHashCode() { - unchecked - { - var hash = (int)2166136261; - hash = (hash * 16777619) ^ DateTime.GetHashCode(); - hash = (hash * 16777619) ^ TimeZone.GetHashCode(); - if (Offset != null) - hash = (hash * 16777619) ^ Offset.GetHashCode(); - return hash; - } + var hash = new HashCode(); + hash.Add(DateTime); + hash.Add(TimeZone, StringComparer.OrdinalIgnoreCase); + return hash.ToHashCode(); } + // Offset is intentionally excluded, it's derived from DateTime and TimeZone and only present in extended bind. public bool Equals(FbZonedDateTime other) => DateTime.Equals(other.DateTime) && TimeZone.Equals(other.TimeZone, StringComparison.OrdinalIgnoreCase); TypeCode IConvertible.GetTypeCode() => TypeCode.Object; diff --git a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs index ff3758820..49992d1f2 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs @@ -57,19 +57,16 @@ public override bool Equals(object obj) return obj is FbZonedTime fbZonedTime && Equals(fbZonedTime); } + // Offset is intentionally excluded, it's derived from Time and TimeZone and only present in extended bind. public override int GetHashCode() { - unchecked - { - var hash = (int)2166136261; - hash = (hash * 16777619) ^ Time.GetHashCode(); - hash = (hash * 16777619) ^ TimeZone.GetHashCode(); - if (Offset != null) - hash = (hash * 16777619) ^ Offset.GetHashCode(); - return hash; - } + var hash = new HashCode(); + hash.Add(Time); + hash.Add(TimeZone, StringComparer.OrdinalIgnoreCase); + return hash.ToHashCode(); } + // Offset is intentionally excluded, it's derived from Time and TimeZone and only present in extended bind. public bool Equals(FbZonedTime other) => Time.Equals(other.Time) && TimeZone.Equals(other.TimeZone, StringComparison.OrdinalIgnoreCase); TypeCode IConvertible.GetTypeCode() => TypeCode.Object; From 31a17069f484c75b251769694c1ffc9a67f58357 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Fri, 9 Oct 2026 10:04:19 +0200 Subject: [PATCH 28/39] Fix GetHashCode/Equals discrepancy in FbDecFloat. --- .../FbDecFloatTypeTests.cs | 9 ++++ .../Types/FbDecFloat.cs | 42 +++++++++---------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/FbDecFloatTypeTests.cs b/src/FirebirdSql.Data.FirebirdClient.Tests/FbDecFloatTypeTests.cs index b2775d6c1..4df15b2d5 100644 --- a/src/FirebirdSql.Data.FirebirdClient.Tests/FbDecFloatTypeTests.cs +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/FbDecFloatTypeTests.cs @@ -38,6 +38,7 @@ public class FbDecFloatTypeTests new object[] { new FbDecFloat(-10, 3), new FbDecFloat(-100, 2) }, new object[] { new FbDecFloat(10, -3), new FbDecFloat(1, -2) }, new object[] { new FbDecFloat(-10, -3), new FbDecFloat(-1, -2) }, + new object[] { new FbDecFloat(0, 0), new FbDecFloat(0, 5) }, new object[] { FbDecFloat.PositiveInfinity, FbDecFloat.PositiveInfinity }, new object[] { FbDecFloat.NegativeInfinity, FbDecFloat.NegativeInfinity }, new object[] { FbDecFloat.PositiveNaN, FbDecFloat.PositiveNaN }, @@ -48,11 +49,19 @@ public void EqualityTrue(FbDecFloat expected, FbDecFloat actual) Assert.AreEqual(expected, actual); } + [TestCaseSource(nameof(SimpleEqualityTrueSource))] + public void HashCodeEqual(FbDecFloat expected, FbDecFloat actual) + { + Assert.AreEqual(expected.GetHashCode(), actual.GetHashCode()); + } + static readonly object[] SimpleEqualityFalseSource = new object[] { new object[] { new FbDecFloat(0), new FbDecFloat(BigInteger.Parse("986767875675879890678765756798079808709")) }, new object[] { new FbDecFloat(6, 3), new FbDecFloat(-6, 3) }, new object[] { new FbDecFloat(6, 3), new FbDecFloat(6, -3) }, + new object[] { new FbDecFloat(1, 0), new FbDecFloat(1, 1_000_000_000) }, + new object[] { new FbDecFloat(1, int.MaxValue), new FbDecFloat(1, int.MinValue) }, new object[] { FbDecFloat.PositiveInfinity, FbDecFloat.NegativeInfinity }, new object[] { FbDecFloat.PositiveNaN, FbDecFloat.NegativeNaN }, new object[] { FbDecFloat.PositiveInfinity, FbDecFloat.PositiveNaN }, diff --git a/src/FirebirdSql.Data.FirebirdClient/Types/FbDecFloat.cs b/src/FirebirdSql.Data.FirebirdClient/Types/FbDecFloat.cs index b6b6e6c0a..29c37c4ee 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Types/FbDecFloat.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Types/FbDecFloat.cs @@ -115,36 +115,34 @@ public override bool Equals(object obj) public override int GetHashCode() { - unchecked - { - var hash = (int)2166136261; - hash = (hash * 16777619) ^ Type.GetHashCode(); - hash = (hash * 16777619) ^ Negative.GetHashCode(); - hash = (hash * 16777619) ^ Coefficient.GetHashCode(); - hash = (hash * 16777619) ^ Exponent.GetHashCode(); - return hash; - } + var (coefficient, exponent) = Normalize(); + return HashCode.Combine(Type, Negative, coefficient, exponent); } public bool Equals(FbDecFloat other) { - if (!(Type.Equals(other.Type) && Negative.Equals(other.Negative))) + if (Type != other.Type || Negative != other.Negative) return false; - if (Coefficient.Equals(other.Coefficient) && Exponent.Equals(other.Exponent)) + if (Coefficient.Equals(other.Coefficient) && Exponent == other.Exponent) return true; - if (Exponent < other.Exponent) - { - var difference = other.Exponent - Exponent; - var value = other.Coefficient * BigInteger.Pow(10, difference); - return value.Equals(Coefficient); - } - if (Exponent > other.Exponent) + return Normalize() == other.Normalize(); + } + + // Values with the same numeric value (e.g. 1E1 and 10E0) normalize to the same representation. + (BigInteger coefficient, int exponent) Normalize() + { + if (Coefficient.IsZero) + return (BigInteger.Zero, 0); + var coefficient = Coefficient; + var exponent = Exponent; + while (true) { - var difference = Exponent - other.Exponent; - var value = Coefficient * BigInteger.Pow(10, difference); - return value.Equals(other.Coefficient); + var quotient = BigInteger.DivRem(coefficient, 10, out var remainder); + if (!remainder.IsZero) + return (coefficient, exponent); + coefficient = quotient; + exponent++; } - return false; } public static bool operator ==(FbDecFloat lhs, FbDecFloat rhs) From 7c2ac4b7558f51591cacf17347e8754aa0a36296 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Fri, 9 Oct 2026 11:06:10 +0200 Subject: [PATCH 29/39] Fix CI warning. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7de7a822a..34f49d975 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: shell: powershell - name: Publish Artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: 'ci_${{ matrix.TEST_SUITE }}_${{ matrix.FIREBIRD_SELECTION }}_${{ env.CONFIGURATION }}' path: '.\\out\\' From b141e0a63d67f1a46979ab9077df221968a39494 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Fri, 9 Oct 2026 11:10:33 +0200 Subject: [PATCH 30/39] Fix handling of timezones as raw offset. --- .../FbTimeZonesSupportTests.cs | 55 + .../FbZonedDateTimeTypeTests.cs | 7 + .../FbZonedTimeTypeTests.cs | 7 + .../TimeZoneMappingTests.cs | 66 + .../Common/TimeZoneMapping.cs | 3410 ++++++++++++++++- .../Types/FbZonedDateTime.cs | 3 +- .../Types/FbZonedTime.cs | 3 +- 7 files changed, 3544 insertions(+), 7 deletions(-) create mode 100644 src/FirebirdSql.Data.FirebirdClient.Tests/TimeZoneMappingTests.cs diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/FbTimeZonesSupportTests.cs b/src/FirebirdSql.Data.FirebirdClient.Tests/FbTimeZonesSupportTests.cs index d2caca40a..41d0a5c43 100644 --- a/src/FirebirdSql.Data.FirebirdClient.Tests/FbTimeZonesSupportTests.cs +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/FbTimeZonesSupportTests.cs @@ -58,6 +58,24 @@ public async Task ReadsZonedDateTimeCorrectly(bool isExtended) } } + [TestCase(true)] + [TestCase(false)] + public async Task ReadsZonedDateTimeWithOffsetCorrectly(bool isExtended) + { + if (isExtended) + { + await SetExtended(); + } + await using (var cmd = Connection.CreateCommand()) + { + cmd.CommandText = "select cast('2020-08-27 10:00 +01:00' as timestamp with time zone) from rdb$database"; + var result = (FbZonedDateTime)await cmd.ExecuteScalarAsync(); + Assert.AreEqual(new DateTime(2020, 08, 27, 09, 00, 00, DateTimeKind.Utc), result.DateTime); + Assert.AreEqual("+01:00", result.TimeZone); + Assert.AreEqual(isExtended ? TimeSpan.FromMinutes(60) : (TimeSpan?)null, result.Offset); + } + } + [TestCase(true)] [TestCase(false)] public async Task ReadsZonedDateTimeNullCorrectly(bool isExtended) @@ -92,6 +110,25 @@ public async Task PassesZonedDateTimeCorrectly(bool isExtended) } } + [TestCase(true)] + [TestCase(false)] + public async Task PassesZonedDateTimeWithOffsetCorrectly(bool isExtended) + { + if (isExtended) + { + await SetExtended(); + } + var value = new FbZonedDateTime(new DateTime(2020, 08, 27, 08, 00, 00, DateTimeKind.Utc), "-5:30"); + await using (var cmd = Connection.CreateCommand()) + { + cmd.CommandText = "select cast(@value as timestamp with time zone) from rdb$database"; + cmd.Parameters.AddWithValue("value", value); + var result = (FbZonedDateTime)await cmd.ExecuteScalarAsync(); + Assert.AreEqual(value, result); + Assert.AreEqual("-05:30", result.TimeZone); + } + } + [TestCase(true)] [TestCase(false)] public async Task PassesZonedDateTimeNullCorrectly(bool isExtended) @@ -127,6 +164,24 @@ public async Task ReadsZonedTimeCorrectly(bool isExtended) } } + [TestCase(true)] + [TestCase(false)] + public async Task ReadsZonedTimeWithOffsetCorrectly(bool isExtended) + { + if (isExtended) + { + await SetExtended(); + } + await using (var cmd = Connection.CreateCommand()) + { + cmd.CommandText = "select cast('15:00 -05:30' as time with time zone) from rdb$database"; + var result = (FbZonedTime)await cmd.ExecuteScalarAsync(); + Assert.AreEqual(new TimeSpan(20, 30, 00), result.Time); + Assert.AreEqual("-05:30", result.TimeZone); + Assert.AreEqual(isExtended ? TimeSpan.FromMinutes(-330) : (TimeSpan?)null, result.Offset); + } + } + [TestCase(true)] [TestCase(false)] public async Task ReadsZonedTimeNullCorrectly(bool isExtended) diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedDateTimeTypeTests.cs b/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedDateTimeTypeTests.cs index 7776c2139..0edc9c064 100644 --- a/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedDateTimeTypeTests.cs +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedDateTimeTypeTests.cs @@ -54,6 +54,13 @@ public void EqualityFalse(FbZonedDateTime expected, FbZonedDateTime actual) Assert.AreNotEqual(expected, actual); } + [TestCase("-5:0", "-05:00")] + [TestCase("europe/prague", "Europe/Prague")] + public void TimeZoneIsNormalized(string timeZone, string expected) + { + Assert.AreEqual(expected, new FbZonedDateTime(new DateTime(2020, 12, 4, 10, 38, 0, DateTimeKind.Utc), timeZone).TimeZone); + } + [Test] public void ConvertToDateTimeShouldNotThrow() { diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedTimeTypeTests.cs b/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedTimeTypeTests.cs index 6f103b5be..94791695b 100644 --- a/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedTimeTypeTests.cs +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/FbZonedTimeTypeTests.cs @@ -54,6 +54,13 @@ public void EqualityFalse(FbZonedTime expected, FbZonedTime actual) Assert.AreNotEqual(expected, actual); } + [TestCase("-5:0", "-05:00")] + [TestCase("europe/prague", "Europe/Prague")] + public void TimeZoneIsNormalized(string timeZone, string expected) + { + Assert.AreEqual(expected, new FbZonedTime(TimeSpan.FromMinutes(142), timeZone).TimeZone); + } + [Test] public void ConvertToTimeSpanShouldNotThrow() { diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/TimeZoneMappingTests.cs b/src/FirebirdSql.Data.FirebirdClient.Tests/TimeZoneMappingTests.cs new file mode 100644 index 000000000..de2c38bc4 --- /dev/null +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/TimeZoneMappingTests.cs @@ -0,0 +1,66 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Jiri Cincura (jiri@cincura.net) + +using FirebirdSql.Data.Common; +using FirebirdSql.Data.TestsBase; +using NUnit.Framework; + +namespace FirebirdSql.Data.FirebirdClient.Tests; + +[NoServerCategory] +public class TimeZoneMappingTests +{ + [TestCase((ushort)599, "-14:00")] + [TestCase((ushort)1439, "+00:00")] + [TestCase((ushort)1499, "+01:00")] + [TestCase((ushort)2279, "+14:00")] + [TestCase((ushort)65059, "Europe/Prague")] + public void TryGetById(ushort id, string expected) + { + Assert.IsTrue(TimeZoneMapping.TryGetById(id, out var name)); + Assert.AreEqual(expected, name); + } + + [TestCase("+01:00", (ushort)1499)] + [TestCase("Europe/Prague", (ushort)65059)] + [TestCase("europe/prague", (ushort)65059)] + public void TryGetByName(string name, ushort expected) + { + Assert.IsTrue(TimeZoneMapping.TryGetByName(name, out var id)); + Assert.AreEqual(expected, id); + } + + [TestCase("+01:00", "+01:00")] + [TestCase("+1:00", "+01:00")] + [TestCase("+1", "+01:00")] + [TestCase("-5:0", "-05:00")] + [TestCase(" - 05 : 30 ", "-05:30")] + [TestCase("-00:00", "+00:00")] + [TestCase("+001:00", "+01:00")] + [TestCase("-14:00", "-14:00")] + [TestCase("europe/prague", "Europe/Prague")] + [TestCase("+14:01", "+14:01")] + [TestCase("+15:00", "+15:00")] + [TestCase("+01:60", "+01:60")] + [TestCase("+99999999999:00", "+99999999999:00")] + [TestCase("+01:00x", "+01:00x")] + [TestCase("Europe/Nowhere", "Europe/Nowhere")] + public void Normalize(string name, string expected) + { + Assert.AreEqual(expected, TimeZoneMapping.Normalize(name)); + } +} diff --git a/src/FirebirdSql.Data.FirebirdClient/Common/TimeZoneMapping.cs b/src/FirebirdSql.Data.FirebirdClient/Common/TimeZoneMapping.cs index 917885e60..d74cec4b2 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Common/TimeZoneMapping.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Common/TimeZoneMapping.cs @@ -15,14 +15,17 @@ //$Authors = Jiri Cincura (jiri@cincura.net) +using System; using System.Collections.Generic; +using System.Globalization; +using System.Text.RegularExpressions; namespace FirebirdSql.Data.Common; -internal class TimeZoneMapping +internal partial class TimeZoneMapping { // select '{ ' || rdb$time_zone_id || ', "' || trim(rdb$time_zone_name) || '" },' from rdb$time_zones order by rdb$time_zone_id desc; - static Dictionary _idToName = new Dictionary() + static readonly Dictionary IdToName = new Dictionary() { { 65535, "GMT" }, { 65534, "ACT" }, @@ -661,10 +664,1692 @@ internal class TimeZoneMapping { 64901, "Pacific/Kanton" }, { 64900, "Europe/Kyiv" }, { 64899, "America/Ciudad_Juarez" }, + +{ 599, "-14:00" }, +{ 600, "-13:59" }, +{ 601, "-13:58" }, +{ 602, "-13:57" }, +{ 603, "-13:56" }, +{ 604, "-13:55" }, +{ 605, "-13:54" }, +{ 606, "-13:53" }, +{ 607, "-13:52" }, +{ 608, "-13:51" }, +{ 609, "-13:50" }, +{ 610, "-13:49" }, +{ 611, "-13:48" }, +{ 612, "-13:47" }, +{ 613, "-13:46" }, +{ 614, "-13:45" }, +{ 615, "-13:44" }, +{ 616, "-13:43" }, +{ 617, "-13:42" }, +{ 618, "-13:41" }, +{ 619, "-13:40" }, +{ 620, "-13:39" }, +{ 621, "-13:38" }, +{ 622, "-13:37" }, +{ 623, "-13:36" }, +{ 624, "-13:35" }, +{ 625, "-13:34" }, +{ 626, "-13:33" }, +{ 627, "-13:32" }, +{ 628, "-13:31" }, +{ 629, "-13:30" }, +{ 630, "-13:29" }, +{ 631, "-13:28" }, +{ 632, "-13:27" }, +{ 633, "-13:26" }, +{ 634, "-13:25" }, +{ 635, "-13:24" }, +{ 636, "-13:23" }, +{ 637, "-13:22" }, +{ 638, "-13:21" }, +{ 639, "-13:20" }, +{ 640, "-13:19" }, +{ 641, "-13:18" }, +{ 642, "-13:17" }, +{ 643, "-13:16" }, +{ 644, "-13:15" }, +{ 645, "-13:14" }, +{ 646, "-13:13" }, +{ 647, "-13:12" }, +{ 648, "-13:11" }, +{ 649, "-13:10" }, +{ 650, "-13:09" }, +{ 651, "-13:08" }, +{ 652, "-13:07" }, +{ 653, "-13:06" }, +{ 654, "-13:05" }, +{ 655, "-13:04" }, +{ 656, "-13:03" }, +{ 657, "-13:02" }, +{ 658, "-13:01" }, +{ 659, "-13:00" }, +{ 660, "-12:59" }, +{ 661, "-12:58" }, +{ 662, "-12:57" }, +{ 663, "-12:56" }, +{ 664, "-12:55" }, +{ 665, "-12:54" }, +{ 666, "-12:53" }, +{ 667, "-12:52" }, +{ 668, "-12:51" }, +{ 669, "-12:50" }, +{ 670, "-12:49" }, +{ 671, "-12:48" }, +{ 672, "-12:47" }, +{ 673, "-12:46" }, +{ 674, "-12:45" }, +{ 675, "-12:44" }, +{ 676, "-12:43" }, +{ 677, "-12:42" }, +{ 678, "-12:41" }, +{ 679, "-12:40" }, +{ 680, "-12:39" }, +{ 681, "-12:38" }, +{ 682, "-12:37" }, +{ 683, "-12:36" }, +{ 684, "-12:35" }, +{ 685, "-12:34" }, +{ 686, "-12:33" }, +{ 687, "-12:32" }, +{ 688, "-12:31" }, +{ 689, "-12:30" }, +{ 690, "-12:29" }, +{ 691, "-12:28" }, +{ 692, "-12:27" }, +{ 693, "-12:26" }, +{ 694, "-12:25" }, +{ 695, "-12:24" }, +{ 696, "-12:23" }, +{ 697, "-12:22" }, +{ 698, "-12:21" }, +{ 699, "-12:20" }, +{ 700, "-12:19" }, +{ 701, "-12:18" }, +{ 702, "-12:17" }, +{ 703, "-12:16" }, +{ 704, "-12:15" }, +{ 705, "-12:14" }, +{ 706, "-12:13" }, +{ 707, "-12:12" }, +{ 708, "-12:11" }, +{ 709, "-12:10" }, +{ 710, "-12:09" }, +{ 711, "-12:08" }, +{ 712, "-12:07" }, +{ 713, "-12:06" }, +{ 714, "-12:05" }, +{ 715, "-12:04" }, +{ 716, "-12:03" }, +{ 717, "-12:02" }, +{ 718, "-12:01" }, +{ 719, "-12:00" }, +{ 720, "-11:59" }, +{ 721, "-11:58" }, +{ 722, "-11:57" }, +{ 723, "-11:56" }, +{ 724, "-11:55" }, +{ 725, "-11:54" }, +{ 726, "-11:53" }, +{ 727, "-11:52" }, +{ 728, "-11:51" }, +{ 729, "-11:50" }, +{ 730, "-11:49" }, +{ 731, "-11:48" }, +{ 732, "-11:47" }, +{ 733, "-11:46" }, +{ 734, "-11:45" }, +{ 735, "-11:44" }, +{ 736, "-11:43" }, +{ 737, "-11:42" }, +{ 738, "-11:41" }, +{ 739, "-11:40" }, +{ 740, "-11:39" }, +{ 741, "-11:38" }, +{ 742, "-11:37" }, +{ 743, "-11:36" }, +{ 744, "-11:35" }, +{ 745, "-11:34" }, +{ 746, "-11:33" }, +{ 747, "-11:32" }, +{ 748, "-11:31" }, +{ 749, "-11:30" }, +{ 750, "-11:29" }, +{ 751, "-11:28" }, +{ 752, "-11:27" }, +{ 753, "-11:26" }, +{ 754, "-11:25" }, +{ 755, "-11:24" }, +{ 756, "-11:23" }, +{ 757, "-11:22" }, +{ 758, "-11:21" }, +{ 759, "-11:20" }, +{ 760, "-11:19" }, +{ 761, "-11:18" }, +{ 762, "-11:17" }, +{ 763, "-11:16" }, +{ 764, "-11:15" }, +{ 765, "-11:14" }, +{ 766, "-11:13" }, +{ 767, "-11:12" }, +{ 768, "-11:11" }, +{ 769, "-11:10" }, +{ 770, "-11:09" }, +{ 771, "-11:08" }, +{ 772, "-11:07" }, +{ 773, "-11:06" }, +{ 774, "-11:05" }, +{ 775, "-11:04" }, +{ 776, "-11:03" }, +{ 777, "-11:02" }, +{ 778, "-11:01" }, +{ 779, "-11:00" }, +{ 780, "-10:59" }, +{ 781, "-10:58" }, +{ 782, "-10:57" }, +{ 783, "-10:56" }, +{ 784, "-10:55" }, +{ 785, "-10:54" }, +{ 786, "-10:53" }, +{ 787, "-10:52" }, +{ 788, "-10:51" }, +{ 789, "-10:50" }, +{ 790, "-10:49" }, +{ 791, "-10:48" }, +{ 792, "-10:47" }, +{ 793, "-10:46" }, +{ 794, "-10:45" }, +{ 795, "-10:44" }, +{ 796, "-10:43" }, +{ 797, "-10:42" }, +{ 798, "-10:41" }, +{ 799, "-10:40" }, +{ 800, "-10:39" }, +{ 801, "-10:38" }, +{ 802, "-10:37" }, +{ 803, "-10:36" }, +{ 804, "-10:35" }, +{ 805, "-10:34" }, +{ 806, "-10:33" }, +{ 807, "-10:32" }, +{ 808, "-10:31" }, +{ 809, "-10:30" }, +{ 810, "-10:29" }, +{ 811, "-10:28" }, +{ 812, "-10:27" }, +{ 813, "-10:26" }, +{ 814, "-10:25" }, +{ 815, "-10:24" }, +{ 816, "-10:23" }, +{ 817, "-10:22" }, +{ 818, "-10:21" }, +{ 819, "-10:20" }, +{ 820, "-10:19" }, +{ 821, "-10:18" }, +{ 822, "-10:17" }, +{ 823, "-10:16" }, +{ 824, "-10:15" }, +{ 825, "-10:14" }, +{ 826, "-10:13" }, +{ 827, "-10:12" }, +{ 828, "-10:11" }, +{ 829, "-10:10" }, +{ 830, "-10:09" }, +{ 831, "-10:08" }, +{ 832, "-10:07" }, +{ 833, "-10:06" }, +{ 834, "-10:05" }, +{ 835, "-10:04" }, +{ 836, "-10:03" }, +{ 837, "-10:02" }, +{ 838, "-10:01" }, +{ 839, "-10:00" }, +{ 840, "-09:59" }, +{ 841, "-09:58" }, +{ 842, "-09:57" }, +{ 843, "-09:56" }, +{ 844, "-09:55" }, +{ 845, "-09:54" }, +{ 846, "-09:53" }, +{ 847, "-09:52" }, +{ 848, "-09:51" }, +{ 849, "-09:50" }, +{ 850, "-09:49" }, +{ 851, "-09:48" }, +{ 852, "-09:47" }, +{ 853, "-09:46" }, +{ 854, "-09:45" }, +{ 855, "-09:44" }, +{ 856, "-09:43" }, +{ 857, "-09:42" }, +{ 858, "-09:41" }, +{ 859, "-09:40" }, +{ 860, "-09:39" }, +{ 861, "-09:38" }, +{ 862, "-09:37" }, +{ 863, "-09:36" }, +{ 864, "-09:35" }, +{ 865, "-09:34" }, +{ 866, "-09:33" }, +{ 867, "-09:32" }, +{ 868, "-09:31" }, +{ 869, "-09:30" }, +{ 870, "-09:29" }, +{ 871, "-09:28" }, +{ 872, "-09:27" }, +{ 873, "-09:26" }, +{ 874, "-09:25" }, +{ 875, "-09:24" }, +{ 876, "-09:23" }, +{ 877, "-09:22" }, +{ 878, "-09:21" }, +{ 879, "-09:20" }, +{ 880, "-09:19" }, +{ 881, "-09:18" }, +{ 882, "-09:17" }, +{ 883, "-09:16" }, +{ 884, "-09:15" }, +{ 885, "-09:14" }, +{ 886, "-09:13" }, +{ 887, "-09:12" }, +{ 888, "-09:11" }, +{ 889, "-09:10" }, +{ 890, "-09:09" }, +{ 891, "-09:08" }, +{ 892, "-09:07" }, +{ 893, "-09:06" }, +{ 894, "-09:05" }, +{ 895, "-09:04" }, +{ 896, "-09:03" }, +{ 897, "-09:02" }, +{ 898, "-09:01" }, +{ 899, "-09:00" }, +{ 900, "-08:59" }, +{ 901, "-08:58" }, +{ 902, "-08:57" }, +{ 903, "-08:56" }, +{ 904, "-08:55" }, +{ 905, "-08:54" }, +{ 906, "-08:53" }, +{ 907, "-08:52" }, +{ 908, "-08:51" }, +{ 909, "-08:50" }, +{ 910, "-08:49" }, +{ 911, "-08:48" }, +{ 912, "-08:47" }, +{ 913, "-08:46" }, +{ 914, "-08:45" }, +{ 915, "-08:44" }, +{ 916, "-08:43" }, +{ 917, "-08:42" }, +{ 918, "-08:41" }, +{ 919, "-08:40" }, +{ 920, "-08:39" }, +{ 921, "-08:38" }, +{ 922, "-08:37" }, +{ 923, "-08:36" }, +{ 924, "-08:35" }, +{ 925, "-08:34" }, +{ 926, "-08:33" }, +{ 927, "-08:32" }, +{ 928, "-08:31" }, +{ 929, "-08:30" }, +{ 930, "-08:29" }, +{ 931, "-08:28" }, +{ 932, "-08:27" }, +{ 933, "-08:26" }, +{ 934, "-08:25" }, +{ 935, "-08:24" }, +{ 936, "-08:23" }, +{ 937, "-08:22" }, +{ 938, "-08:21" }, +{ 939, "-08:20" }, +{ 940, "-08:19" }, +{ 941, "-08:18" }, +{ 942, "-08:17" }, +{ 943, "-08:16" }, +{ 944, "-08:15" }, +{ 945, "-08:14" }, +{ 946, "-08:13" }, +{ 947, "-08:12" }, +{ 948, "-08:11" }, +{ 949, "-08:10" }, +{ 950, "-08:09" }, +{ 951, "-08:08" }, +{ 952, "-08:07" }, +{ 953, "-08:06" }, +{ 954, "-08:05" }, +{ 955, "-08:04" }, +{ 956, "-08:03" }, +{ 957, "-08:02" }, +{ 958, "-08:01" }, +{ 959, "-08:00" }, +{ 960, "-07:59" }, +{ 961, "-07:58" }, +{ 962, "-07:57" }, +{ 963, "-07:56" }, +{ 964, "-07:55" }, +{ 965, "-07:54" }, +{ 966, "-07:53" }, +{ 967, "-07:52" }, +{ 968, "-07:51" }, +{ 969, "-07:50" }, +{ 970, "-07:49" }, +{ 971, "-07:48" }, +{ 972, "-07:47" }, +{ 973, "-07:46" }, +{ 974, "-07:45" }, +{ 975, "-07:44" }, +{ 976, "-07:43" }, +{ 977, "-07:42" }, +{ 978, "-07:41" }, +{ 979, "-07:40" }, +{ 980, "-07:39" }, +{ 981, "-07:38" }, +{ 982, "-07:37" }, +{ 983, "-07:36" }, +{ 984, "-07:35" }, +{ 985, "-07:34" }, +{ 986, "-07:33" }, +{ 987, "-07:32" }, +{ 988, "-07:31" }, +{ 989, "-07:30" }, +{ 990, "-07:29" }, +{ 991, "-07:28" }, +{ 992, "-07:27" }, +{ 993, "-07:26" }, +{ 994, "-07:25" }, +{ 995, "-07:24" }, +{ 996, "-07:23" }, +{ 997, "-07:22" }, +{ 998, "-07:21" }, +{ 999, "-07:20" }, +{ 1000, "-07:19" }, +{ 1001, "-07:18" }, +{ 1002, "-07:17" }, +{ 1003, "-07:16" }, +{ 1004, "-07:15" }, +{ 1005, "-07:14" }, +{ 1006, "-07:13" }, +{ 1007, "-07:12" }, +{ 1008, "-07:11" }, +{ 1009, "-07:10" }, +{ 1010, "-07:09" }, +{ 1011, "-07:08" }, +{ 1012, "-07:07" }, +{ 1013, "-07:06" }, +{ 1014, "-07:05" }, +{ 1015, "-07:04" }, +{ 1016, "-07:03" }, +{ 1017, "-07:02" }, +{ 1018, "-07:01" }, +{ 1019, "-07:00" }, +{ 1020, "-06:59" }, +{ 1021, "-06:58" }, +{ 1022, "-06:57" }, +{ 1023, "-06:56" }, +{ 1024, "-06:55" }, +{ 1025, "-06:54" }, +{ 1026, "-06:53" }, +{ 1027, "-06:52" }, +{ 1028, "-06:51" }, +{ 1029, "-06:50" }, +{ 1030, "-06:49" }, +{ 1031, "-06:48" }, +{ 1032, "-06:47" }, +{ 1033, "-06:46" }, +{ 1034, "-06:45" }, +{ 1035, "-06:44" }, +{ 1036, "-06:43" }, +{ 1037, "-06:42" }, +{ 1038, "-06:41" }, +{ 1039, "-06:40" }, +{ 1040, "-06:39" }, +{ 1041, "-06:38" }, +{ 1042, "-06:37" }, +{ 1043, "-06:36" }, +{ 1044, "-06:35" }, +{ 1045, "-06:34" }, +{ 1046, "-06:33" }, +{ 1047, "-06:32" }, +{ 1048, "-06:31" }, +{ 1049, "-06:30" }, +{ 1050, "-06:29" }, +{ 1051, "-06:28" }, +{ 1052, "-06:27" }, +{ 1053, "-06:26" }, +{ 1054, "-06:25" }, +{ 1055, "-06:24" }, +{ 1056, "-06:23" }, +{ 1057, "-06:22" }, +{ 1058, "-06:21" }, +{ 1059, "-06:20" }, +{ 1060, "-06:19" }, +{ 1061, "-06:18" }, +{ 1062, "-06:17" }, +{ 1063, "-06:16" }, +{ 1064, "-06:15" }, +{ 1065, "-06:14" }, +{ 1066, "-06:13" }, +{ 1067, "-06:12" }, +{ 1068, "-06:11" }, +{ 1069, "-06:10" }, +{ 1070, "-06:09" }, +{ 1071, "-06:08" }, +{ 1072, "-06:07" }, +{ 1073, "-06:06" }, +{ 1074, "-06:05" }, +{ 1075, "-06:04" }, +{ 1076, "-06:03" }, +{ 1077, "-06:02" }, +{ 1078, "-06:01" }, +{ 1079, "-06:00" }, +{ 1080, "-05:59" }, +{ 1081, "-05:58" }, +{ 1082, "-05:57" }, +{ 1083, "-05:56" }, +{ 1084, "-05:55" }, +{ 1085, "-05:54" }, +{ 1086, "-05:53" }, +{ 1087, "-05:52" }, +{ 1088, "-05:51" }, +{ 1089, "-05:50" }, +{ 1090, "-05:49" }, +{ 1091, "-05:48" }, +{ 1092, "-05:47" }, +{ 1093, "-05:46" }, +{ 1094, "-05:45" }, +{ 1095, "-05:44" }, +{ 1096, "-05:43" }, +{ 1097, "-05:42" }, +{ 1098, "-05:41" }, +{ 1099, "-05:40" }, +{ 1100, "-05:39" }, +{ 1101, "-05:38" }, +{ 1102, "-05:37" }, +{ 1103, "-05:36" }, +{ 1104, "-05:35" }, +{ 1105, "-05:34" }, +{ 1106, "-05:33" }, +{ 1107, "-05:32" }, +{ 1108, "-05:31" }, +{ 1109, "-05:30" }, +{ 1110, "-05:29" }, +{ 1111, "-05:28" }, +{ 1112, "-05:27" }, +{ 1113, "-05:26" }, +{ 1114, "-05:25" }, +{ 1115, "-05:24" }, +{ 1116, "-05:23" }, +{ 1117, "-05:22" }, +{ 1118, "-05:21" }, +{ 1119, "-05:20" }, +{ 1120, "-05:19" }, +{ 1121, "-05:18" }, +{ 1122, "-05:17" }, +{ 1123, "-05:16" }, +{ 1124, "-05:15" }, +{ 1125, "-05:14" }, +{ 1126, "-05:13" }, +{ 1127, "-05:12" }, +{ 1128, "-05:11" }, +{ 1129, "-05:10" }, +{ 1130, "-05:09" }, +{ 1131, "-05:08" }, +{ 1132, "-05:07" }, +{ 1133, "-05:06" }, +{ 1134, "-05:05" }, +{ 1135, "-05:04" }, +{ 1136, "-05:03" }, +{ 1137, "-05:02" }, +{ 1138, "-05:01" }, +{ 1139, "-05:00" }, +{ 1140, "-04:59" }, +{ 1141, "-04:58" }, +{ 1142, "-04:57" }, +{ 1143, "-04:56" }, +{ 1144, "-04:55" }, +{ 1145, "-04:54" }, +{ 1146, "-04:53" }, +{ 1147, "-04:52" }, +{ 1148, "-04:51" }, +{ 1149, "-04:50" }, +{ 1150, "-04:49" }, +{ 1151, "-04:48" }, +{ 1152, "-04:47" }, +{ 1153, "-04:46" }, +{ 1154, "-04:45" }, +{ 1155, "-04:44" }, +{ 1156, "-04:43" }, +{ 1157, "-04:42" }, +{ 1158, "-04:41" }, +{ 1159, "-04:40" }, +{ 1160, "-04:39" }, +{ 1161, "-04:38" }, +{ 1162, "-04:37" }, +{ 1163, "-04:36" }, +{ 1164, "-04:35" }, +{ 1165, "-04:34" }, +{ 1166, "-04:33" }, +{ 1167, "-04:32" }, +{ 1168, "-04:31" }, +{ 1169, "-04:30" }, +{ 1170, "-04:29" }, +{ 1171, "-04:28" }, +{ 1172, "-04:27" }, +{ 1173, "-04:26" }, +{ 1174, "-04:25" }, +{ 1175, "-04:24" }, +{ 1176, "-04:23" }, +{ 1177, "-04:22" }, +{ 1178, "-04:21" }, +{ 1179, "-04:20" }, +{ 1180, "-04:19" }, +{ 1181, "-04:18" }, +{ 1182, "-04:17" }, +{ 1183, "-04:16" }, +{ 1184, "-04:15" }, +{ 1185, "-04:14" }, +{ 1186, "-04:13" }, +{ 1187, "-04:12" }, +{ 1188, "-04:11" }, +{ 1189, "-04:10" }, +{ 1190, "-04:09" }, +{ 1191, "-04:08" }, +{ 1192, "-04:07" }, +{ 1193, "-04:06" }, +{ 1194, "-04:05" }, +{ 1195, "-04:04" }, +{ 1196, "-04:03" }, +{ 1197, "-04:02" }, +{ 1198, "-04:01" }, +{ 1199, "-04:00" }, +{ 1200, "-03:59" }, +{ 1201, "-03:58" }, +{ 1202, "-03:57" }, +{ 1203, "-03:56" }, +{ 1204, "-03:55" }, +{ 1205, "-03:54" }, +{ 1206, "-03:53" }, +{ 1207, "-03:52" }, +{ 1208, "-03:51" }, +{ 1209, "-03:50" }, +{ 1210, "-03:49" }, +{ 1211, "-03:48" }, +{ 1212, "-03:47" }, +{ 1213, "-03:46" }, +{ 1214, "-03:45" }, +{ 1215, "-03:44" }, +{ 1216, "-03:43" }, +{ 1217, "-03:42" }, +{ 1218, "-03:41" }, +{ 1219, "-03:40" }, +{ 1220, "-03:39" }, +{ 1221, "-03:38" }, +{ 1222, "-03:37" }, +{ 1223, "-03:36" }, +{ 1224, "-03:35" }, +{ 1225, "-03:34" }, +{ 1226, "-03:33" }, +{ 1227, "-03:32" }, +{ 1228, "-03:31" }, +{ 1229, "-03:30" }, +{ 1230, "-03:29" }, +{ 1231, "-03:28" }, +{ 1232, "-03:27" }, +{ 1233, "-03:26" }, +{ 1234, "-03:25" }, +{ 1235, "-03:24" }, +{ 1236, "-03:23" }, +{ 1237, "-03:22" }, +{ 1238, "-03:21" }, +{ 1239, "-03:20" }, +{ 1240, "-03:19" }, +{ 1241, "-03:18" }, +{ 1242, "-03:17" }, +{ 1243, "-03:16" }, +{ 1244, "-03:15" }, +{ 1245, "-03:14" }, +{ 1246, "-03:13" }, +{ 1247, "-03:12" }, +{ 1248, "-03:11" }, +{ 1249, "-03:10" }, +{ 1250, "-03:09" }, +{ 1251, "-03:08" }, +{ 1252, "-03:07" }, +{ 1253, "-03:06" }, +{ 1254, "-03:05" }, +{ 1255, "-03:04" }, +{ 1256, "-03:03" }, +{ 1257, "-03:02" }, +{ 1258, "-03:01" }, +{ 1259, "-03:00" }, +{ 1260, "-02:59" }, +{ 1261, "-02:58" }, +{ 1262, "-02:57" }, +{ 1263, "-02:56" }, +{ 1264, "-02:55" }, +{ 1265, "-02:54" }, +{ 1266, "-02:53" }, +{ 1267, "-02:52" }, +{ 1268, "-02:51" }, +{ 1269, "-02:50" }, +{ 1270, "-02:49" }, +{ 1271, "-02:48" }, +{ 1272, "-02:47" }, +{ 1273, "-02:46" }, +{ 1274, "-02:45" }, +{ 1275, "-02:44" }, +{ 1276, "-02:43" }, +{ 1277, "-02:42" }, +{ 1278, "-02:41" }, +{ 1279, "-02:40" }, +{ 1280, "-02:39" }, +{ 1281, "-02:38" }, +{ 1282, "-02:37" }, +{ 1283, "-02:36" }, +{ 1284, "-02:35" }, +{ 1285, "-02:34" }, +{ 1286, "-02:33" }, +{ 1287, "-02:32" }, +{ 1288, "-02:31" }, +{ 1289, "-02:30" }, +{ 1290, "-02:29" }, +{ 1291, "-02:28" }, +{ 1292, "-02:27" }, +{ 1293, "-02:26" }, +{ 1294, "-02:25" }, +{ 1295, "-02:24" }, +{ 1296, "-02:23" }, +{ 1297, "-02:22" }, +{ 1298, "-02:21" }, +{ 1299, "-02:20" }, +{ 1300, "-02:19" }, +{ 1301, "-02:18" }, +{ 1302, "-02:17" }, +{ 1303, "-02:16" }, +{ 1304, "-02:15" }, +{ 1305, "-02:14" }, +{ 1306, "-02:13" }, +{ 1307, "-02:12" }, +{ 1308, "-02:11" }, +{ 1309, "-02:10" }, +{ 1310, "-02:09" }, +{ 1311, "-02:08" }, +{ 1312, "-02:07" }, +{ 1313, "-02:06" }, +{ 1314, "-02:05" }, +{ 1315, "-02:04" }, +{ 1316, "-02:03" }, +{ 1317, "-02:02" }, +{ 1318, "-02:01" }, +{ 1319, "-02:00" }, +{ 1320, "-01:59" }, +{ 1321, "-01:58" }, +{ 1322, "-01:57" }, +{ 1323, "-01:56" }, +{ 1324, "-01:55" }, +{ 1325, "-01:54" }, +{ 1326, "-01:53" }, +{ 1327, "-01:52" }, +{ 1328, "-01:51" }, +{ 1329, "-01:50" }, +{ 1330, "-01:49" }, +{ 1331, "-01:48" }, +{ 1332, "-01:47" }, +{ 1333, "-01:46" }, +{ 1334, "-01:45" }, +{ 1335, "-01:44" }, +{ 1336, "-01:43" }, +{ 1337, "-01:42" }, +{ 1338, "-01:41" }, +{ 1339, "-01:40" }, +{ 1340, "-01:39" }, +{ 1341, "-01:38" }, +{ 1342, "-01:37" }, +{ 1343, "-01:36" }, +{ 1344, "-01:35" }, +{ 1345, "-01:34" }, +{ 1346, "-01:33" }, +{ 1347, "-01:32" }, +{ 1348, "-01:31" }, +{ 1349, "-01:30" }, +{ 1350, "-01:29" }, +{ 1351, "-01:28" }, +{ 1352, "-01:27" }, +{ 1353, "-01:26" }, +{ 1354, "-01:25" }, +{ 1355, "-01:24" }, +{ 1356, "-01:23" }, +{ 1357, "-01:22" }, +{ 1358, "-01:21" }, +{ 1359, "-01:20" }, +{ 1360, "-01:19" }, +{ 1361, "-01:18" }, +{ 1362, "-01:17" }, +{ 1363, "-01:16" }, +{ 1364, "-01:15" }, +{ 1365, "-01:14" }, +{ 1366, "-01:13" }, +{ 1367, "-01:12" }, +{ 1368, "-01:11" }, +{ 1369, "-01:10" }, +{ 1370, "-01:09" }, +{ 1371, "-01:08" }, +{ 1372, "-01:07" }, +{ 1373, "-01:06" }, +{ 1374, "-01:05" }, +{ 1375, "-01:04" }, +{ 1376, "-01:03" }, +{ 1377, "-01:02" }, +{ 1378, "-01:01" }, +{ 1379, "-01:00" }, +{ 1380, "-00:59" }, +{ 1381, "-00:58" }, +{ 1382, "-00:57" }, +{ 1383, "-00:56" }, +{ 1384, "-00:55" }, +{ 1385, "-00:54" }, +{ 1386, "-00:53" }, +{ 1387, "-00:52" }, +{ 1388, "-00:51" }, +{ 1389, "-00:50" }, +{ 1390, "-00:49" }, +{ 1391, "-00:48" }, +{ 1392, "-00:47" }, +{ 1393, "-00:46" }, +{ 1394, "-00:45" }, +{ 1395, "-00:44" }, +{ 1396, "-00:43" }, +{ 1397, "-00:42" }, +{ 1398, "-00:41" }, +{ 1399, "-00:40" }, +{ 1400, "-00:39" }, +{ 1401, "-00:38" }, +{ 1402, "-00:37" }, +{ 1403, "-00:36" }, +{ 1404, "-00:35" }, +{ 1405, "-00:34" }, +{ 1406, "-00:33" }, +{ 1407, "-00:32" }, +{ 1408, "-00:31" }, +{ 1409, "-00:30" }, +{ 1410, "-00:29" }, +{ 1411, "-00:28" }, +{ 1412, "-00:27" }, +{ 1413, "-00:26" }, +{ 1414, "-00:25" }, +{ 1415, "-00:24" }, +{ 1416, "-00:23" }, +{ 1417, "-00:22" }, +{ 1418, "-00:21" }, +{ 1419, "-00:20" }, +{ 1420, "-00:19" }, +{ 1421, "-00:18" }, +{ 1422, "-00:17" }, +{ 1423, "-00:16" }, +{ 1424, "-00:15" }, +{ 1425, "-00:14" }, +{ 1426, "-00:13" }, +{ 1427, "-00:12" }, +{ 1428, "-00:11" }, +{ 1429, "-00:10" }, +{ 1430, "-00:09" }, +{ 1431, "-00:08" }, +{ 1432, "-00:07" }, +{ 1433, "-00:06" }, +{ 1434, "-00:05" }, +{ 1435, "-00:04" }, +{ 1436, "-00:03" }, +{ 1437, "-00:02" }, +{ 1438, "-00:01" }, +{ 1439, "+00:00" }, +{ 1440, "+00:01" }, +{ 1441, "+00:02" }, +{ 1442, "+00:03" }, +{ 1443, "+00:04" }, +{ 1444, "+00:05" }, +{ 1445, "+00:06" }, +{ 1446, "+00:07" }, +{ 1447, "+00:08" }, +{ 1448, "+00:09" }, +{ 1449, "+00:10" }, +{ 1450, "+00:11" }, +{ 1451, "+00:12" }, +{ 1452, "+00:13" }, +{ 1453, "+00:14" }, +{ 1454, "+00:15" }, +{ 1455, "+00:16" }, +{ 1456, "+00:17" }, +{ 1457, "+00:18" }, +{ 1458, "+00:19" }, +{ 1459, "+00:20" }, +{ 1460, "+00:21" }, +{ 1461, "+00:22" }, +{ 1462, "+00:23" }, +{ 1463, "+00:24" }, +{ 1464, "+00:25" }, +{ 1465, "+00:26" }, +{ 1466, "+00:27" }, +{ 1467, "+00:28" }, +{ 1468, "+00:29" }, +{ 1469, "+00:30" }, +{ 1470, "+00:31" }, +{ 1471, "+00:32" }, +{ 1472, "+00:33" }, +{ 1473, "+00:34" }, +{ 1474, "+00:35" }, +{ 1475, "+00:36" }, +{ 1476, "+00:37" }, +{ 1477, "+00:38" }, +{ 1478, "+00:39" }, +{ 1479, "+00:40" }, +{ 1480, "+00:41" }, +{ 1481, "+00:42" }, +{ 1482, "+00:43" }, +{ 1483, "+00:44" }, +{ 1484, "+00:45" }, +{ 1485, "+00:46" }, +{ 1486, "+00:47" }, +{ 1487, "+00:48" }, +{ 1488, "+00:49" }, +{ 1489, "+00:50" }, +{ 1490, "+00:51" }, +{ 1491, "+00:52" }, +{ 1492, "+00:53" }, +{ 1493, "+00:54" }, +{ 1494, "+00:55" }, +{ 1495, "+00:56" }, +{ 1496, "+00:57" }, +{ 1497, "+00:58" }, +{ 1498, "+00:59" }, +{ 1499, "+01:00" }, +{ 1500, "+01:01" }, +{ 1501, "+01:02" }, +{ 1502, "+01:03" }, +{ 1503, "+01:04" }, +{ 1504, "+01:05" }, +{ 1505, "+01:06" }, +{ 1506, "+01:07" }, +{ 1507, "+01:08" }, +{ 1508, "+01:09" }, +{ 1509, "+01:10" }, +{ 1510, "+01:11" }, +{ 1511, "+01:12" }, +{ 1512, "+01:13" }, +{ 1513, "+01:14" }, +{ 1514, "+01:15" }, +{ 1515, "+01:16" }, +{ 1516, "+01:17" }, +{ 1517, "+01:18" }, +{ 1518, "+01:19" }, +{ 1519, "+01:20" }, +{ 1520, "+01:21" }, +{ 1521, "+01:22" }, +{ 1522, "+01:23" }, +{ 1523, "+01:24" }, +{ 1524, "+01:25" }, +{ 1525, "+01:26" }, +{ 1526, "+01:27" }, +{ 1527, "+01:28" }, +{ 1528, "+01:29" }, +{ 1529, "+01:30" }, +{ 1530, "+01:31" }, +{ 1531, "+01:32" }, +{ 1532, "+01:33" }, +{ 1533, "+01:34" }, +{ 1534, "+01:35" }, +{ 1535, "+01:36" }, +{ 1536, "+01:37" }, +{ 1537, "+01:38" }, +{ 1538, "+01:39" }, +{ 1539, "+01:40" }, +{ 1540, "+01:41" }, +{ 1541, "+01:42" }, +{ 1542, "+01:43" }, +{ 1543, "+01:44" }, +{ 1544, "+01:45" }, +{ 1545, "+01:46" }, +{ 1546, "+01:47" }, +{ 1547, "+01:48" }, +{ 1548, "+01:49" }, +{ 1549, "+01:50" }, +{ 1550, "+01:51" }, +{ 1551, "+01:52" }, +{ 1552, "+01:53" }, +{ 1553, "+01:54" }, +{ 1554, "+01:55" }, +{ 1555, "+01:56" }, +{ 1556, "+01:57" }, +{ 1557, "+01:58" }, +{ 1558, "+01:59" }, +{ 1559, "+02:00" }, +{ 1560, "+02:01" }, +{ 1561, "+02:02" }, +{ 1562, "+02:03" }, +{ 1563, "+02:04" }, +{ 1564, "+02:05" }, +{ 1565, "+02:06" }, +{ 1566, "+02:07" }, +{ 1567, "+02:08" }, +{ 1568, "+02:09" }, +{ 1569, "+02:10" }, +{ 1570, "+02:11" }, +{ 1571, "+02:12" }, +{ 1572, "+02:13" }, +{ 1573, "+02:14" }, +{ 1574, "+02:15" }, +{ 1575, "+02:16" }, +{ 1576, "+02:17" }, +{ 1577, "+02:18" }, +{ 1578, "+02:19" }, +{ 1579, "+02:20" }, +{ 1580, "+02:21" }, +{ 1581, "+02:22" }, +{ 1582, "+02:23" }, +{ 1583, "+02:24" }, +{ 1584, "+02:25" }, +{ 1585, "+02:26" }, +{ 1586, "+02:27" }, +{ 1587, "+02:28" }, +{ 1588, "+02:29" }, +{ 1589, "+02:30" }, +{ 1590, "+02:31" }, +{ 1591, "+02:32" }, +{ 1592, "+02:33" }, +{ 1593, "+02:34" }, +{ 1594, "+02:35" }, +{ 1595, "+02:36" }, +{ 1596, "+02:37" }, +{ 1597, "+02:38" }, +{ 1598, "+02:39" }, +{ 1599, "+02:40" }, +{ 1600, "+02:41" }, +{ 1601, "+02:42" }, +{ 1602, "+02:43" }, +{ 1603, "+02:44" }, +{ 1604, "+02:45" }, +{ 1605, "+02:46" }, +{ 1606, "+02:47" }, +{ 1607, "+02:48" }, +{ 1608, "+02:49" }, +{ 1609, "+02:50" }, +{ 1610, "+02:51" }, +{ 1611, "+02:52" }, +{ 1612, "+02:53" }, +{ 1613, "+02:54" }, +{ 1614, "+02:55" }, +{ 1615, "+02:56" }, +{ 1616, "+02:57" }, +{ 1617, "+02:58" }, +{ 1618, "+02:59" }, +{ 1619, "+03:00" }, +{ 1620, "+03:01" }, +{ 1621, "+03:02" }, +{ 1622, "+03:03" }, +{ 1623, "+03:04" }, +{ 1624, "+03:05" }, +{ 1625, "+03:06" }, +{ 1626, "+03:07" }, +{ 1627, "+03:08" }, +{ 1628, "+03:09" }, +{ 1629, "+03:10" }, +{ 1630, "+03:11" }, +{ 1631, "+03:12" }, +{ 1632, "+03:13" }, +{ 1633, "+03:14" }, +{ 1634, "+03:15" }, +{ 1635, "+03:16" }, +{ 1636, "+03:17" }, +{ 1637, "+03:18" }, +{ 1638, "+03:19" }, +{ 1639, "+03:20" }, +{ 1640, "+03:21" }, +{ 1641, "+03:22" }, +{ 1642, "+03:23" }, +{ 1643, "+03:24" }, +{ 1644, "+03:25" }, +{ 1645, "+03:26" }, +{ 1646, "+03:27" }, +{ 1647, "+03:28" }, +{ 1648, "+03:29" }, +{ 1649, "+03:30" }, +{ 1650, "+03:31" }, +{ 1651, "+03:32" }, +{ 1652, "+03:33" }, +{ 1653, "+03:34" }, +{ 1654, "+03:35" }, +{ 1655, "+03:36" }, +{ 1656, "+03:37" }, +{ 1657, "+03:38" }, +{ 1658, "+03:39" }, +{ 1659, "+03:40" }, +{ 1660, "+03:41" }, +{ 1661, "+03:42" }, +{ 1662, "+03:43" }, +{ 1663, "+03:44" }, +{ 1664, "+03:45" }, +{ 1665, "+03:46" }, +{ 1666, "+03:47" }, +{ 1667, "+03:48" }, +{ 1668, "+03:49" }, +{ 1669, "+03:50" }, +{ 1670, "+03:51" }, +{ 1671, "+03:52" }, +{ 1672, "+03:53" }, +{ 1673, "+03:54" }, +{ 1674, "+03:55" }, +{ 1675, "+03:56" }, +{ 1676, "+03:57" }, +{ 1677, "+03:58" }, +{ 1678, "+03:59" }, +{ 1679, "+04:00" }, +{ 1680, "+04:01" }, +{ 1681, "+04:02" }, +{ 1682, "+04:03" }, +{ 1683, "+04:04" }, +{ 1684, "+04:05" }, +{ 1685, "+04:06" }, +{ 1686, "+04:07" }, +{ 1687, "+04:08" }, +{ 1688, "+04:09" }, +{ 1689, "+04:10" }, +{ 1690, "+04:11" }, +{ 1691, "+04:12" }, +{ 1692, "+04:13" }, +{ 1693, "+04:14" }, +{ 1694, "+04:15" }, +{ 1695, "+04:16" }, +{ 1696, "+04:17" }, +{ 1697, "+04:18" }, +{ 1698, "+04:19" }, +{ 1699, "+04:20" }, +{ 1700, "+04:21" }, +{ 1701, "+04:22" }, +{ 1702, "+04:23" }, +{ 1703, "+04:24" }, +{ 1704, "+04:25" }, +{ 1705, "+04:26" }, +{ 1706, "+04:27" }, +{ 1707, "+04:28" }, +{ 1708, "+04:29" }, +{ 1709, "+04:30" }, +{ 1710, "+04:31" }, +{ 1711, "+04:32" }, +{ 1712, "+04:33" }, +{ 1713, "+04:34" }, +{ 1714, "+04:35" }, +{ 1715, "+04:36" }, +{ 1716, "+04:37" }, +{ 1717, "+04:38" }, +{ 1718, "+04:39" }, +{ 1719, "+04:40" }, +{ 1720, "+04:41" }, +{ 1721, "+04:42" }, +{ 1722, "+04:43" }, +{ 1723, "+04:44" }, +{ 1724, "+04:45" }, +{ 1725, "+04:46" }, +{ 1726, "+04:47" }, +{ 1727, "+04:48" }, +{ 1728, "+04:49" }, +{ 1729, "+04:50" }, +{ 1730, "+04:51" }, +{ 1731, "+04:52" }, +{ 1732, "+04:53" }, +{ 1733, "+04:54" }, +{ 1734, "+04:55" }, +{ 1735, "+04:56" }, +{ 1736, "+04:57" }, +{ 1737, "+04:58" }, +{ 1738, "+04:59" }, +{ 1739, "+05:00" }, +{ 1740, "+05:01" }, +{ 1741, "+05:02" }, +{ 1742, "+05:03" }, +{ 1743, "+05:04" }, +{ 1744, "+05:05" }, +{ 1745, "+05:06" }, +{ 1746, "+05:07" }, +{ 1747, "+05:08" }, +{ 1748, "+05:09" }, +{ 1749, "+05:10" }, +{ 1750, "+05:11" }, +{ 1751, "+05:12" }, +{ 1752, "+05:13" }, +{ 1753, "+05:14" }, +{ 1754, "+05:15" }, +{ 1755, "+05:16" }, +{ 1756, "+05:17" }, +{ 1757, "+05:18" }, +{ 1758, "+05:19" }, +{ 1759, "+05:20" }, +{ 1760, "+05:21" }, +{ 1761, "+05:22" }, +{ 1762, "+05:23" }, +{ 1763, "+05:24" }, +{ 1764, "+05:25" }, +{ 1765, "+05:26" }, +{ 1766, "+05:27" }, +{ 1767, "+05:28" }, +{ 1768, "+05:29" }, +{ 1769, "+05:30" }, +{ 1770, "+05:31" }, +{ 1771, "+05:32" }, +{ 1772, "+05:33" }, +{ 1773, "+05:34" }, +{ 1774, "+05:35" }, +{ 1775, "+05:36" }, +{ 1776, "+05:37" }, +{ 1777, "+05:38" }, +{ 1778, "+05:39" }, +{ 1779, "+05:40" }, +{ 1780, "+05:41" }, +{ 1781, "+05:42" }, +{ 1782, "+05:43" }, +{ 1783, "+05:44" }, +{ 1784, "+05:45" }, +{ 1785, "+05:46" }, +{ 1786, "+05:47" }, +{ 1787, "+05:48" }, +{ 1788, "+05:49" }, +{ 1789, "+05:50" }, +{ 1790, "+05:51" }, +{ 1791, "+05:52" }, +{ 1792, "+05:53" }, +{ 1793, "+05:54" }, +{ 1794, "+05:55" }, +{ 1795, "+05:56" }, +{ 1796, "+05:57" }, +{ 1797, "+05:58" }, +{ 1798, "+05:59" }, +{ 1799, "+06:00" }, +{ 1800, "+06:01" }, +{ 1801, "+06:02" }, +{ 1802, "+06:03" }, +{ 1803, "+06:04" }, +{ 1804, "+06:05" }, +{ 1805, "+06:06" }, +{ 1806, "+06:07" }, +{ 1807, "+06:08" }, +{ 1808, "+06:09" }, +{ 1809, "+06:10" }, +{ 1810, "+06:11" }, +{ 1811, "+06:12" }, +{ 1812, "+06:13" }, +{ 1813, "+06:14" }, +{ 1814, "+06:15" }, +{ 1815, "+06:16" }, +{ 1816, "+06:17" }, +{ 1817, "+06:18" }, +{ 1818, "+06:19" }, +{ 1819, "+06:20" }, +{ 1820, "+06:21" }, +{ 1821, "+06:22" }, +{ 1822, "+06:23" }, +{ 1823, "+06:24" }, +{ 1824, "+06:25" }, +{ 1825, "+06:26" }, +{ 1826, "+06:27" }, +{ 1827, "+06:28" }, +{ 1828, "+06:29" }, +{ 1829, "+06:30" }, +{ 1830, "+06:31" }, +{ 1831, "+06:32" }, +{ 1832, "+06:33" }, +{ 1833, "+06:34" }, +{ 1834, "+06:35" }, +{ 1835, "+06:36" }, +{ 1836, "+06:37" }, +{ 1837, "+06:38" }, +{ 1838, "+06:39" }, +{ 1839, "+06:40" }, +{ 1840, "+06:41" }, +{ 1841, "+06:42" }, +{ 1842, "+06:43" }, +{ 1843, "+06:44" }, +{ 1844, "+06:45" }, +{ 1845, "+06:46" }, +{ 1846, "+06:47" }, +{ 1847, "+06:48" }, +{ 1848, "+06:49" }, +{ 1849, "+06:50" }, +{ 1850, "+06:51" }, +{ 1851, "+06:52" }, +{ 1852, "+06:53" }, +{ 1853, "+06:54" }, +{ 1854, "+06:55" }, +{ 1855, "+06:56" }, +{ 1856, "+06:57" }, +{ 1857, "+06:58" }, +{ 1858, "+06:59" }, +{ 1859, "+07:00" }, +{ 1860, "+07:01" }, +{ 1861, "+07:02" }, +{ 1862, "+07:03" }, +{ 1863, "+07:04" }, +{ 1864, "+07:05" }, +{ 1865, "+07:06" }, +{ 1866, "+07:07" }, +{ 1867, "+07:08" }, +{ 1868, "+07:09" }, +{ 1869, "+07:10" }, +{ 1870, "+07:11" }, +{ 1871, "+07:12" }, +{ 1872, "+07:13" }, +{ 1873, "+07:14" }, +{ 1874, "+07:15" }, +{ 1875, "+07:16" }, +{ 1876, "+07:17" }, +{ 1877, "+07:18" }, +{ 1878, "+07:19" }, +{ 1879, "+07:20" }, +{ 1880, "+07:21" }, +{ 1881, "+07:22" }, +{ 1882, "+07:23" }, +{ 1883, "+07:24" }, +{ 1884, "+07:25" }, +{ 1885, "+07:26" }, +{ 1886, "+07:27" }, +{ 1887, "+07:28" }, +{ 1888, "+07:29" }, +{ 1889, "+07:30" }, +{ 1890, "+07:31" }, +{ 1891, "+07:32" }, +{ 1892, "+07:33" }, +{ 1893, "+07:34" }, +{ 1894, "+07:35" }, +{ 1895, "+07:36" }, +{ 1896, "+07:37" }, +{ 1897, "+07:38" }, +{ 1898, "+07:39" }, +{ 1899, "+07:40" }, +{ 1900, "+07:41" }, +{ 1901, "+07:42" }, +{ 1902, "+07:43" }, +{ 1903, "+07:44" }, +{ 1904, "+07:45" }, +{ 1905, "+07:46" }, +{ 1906, "+07:47" }, +{ 1907, "+07:48" }, +{ 1908, "+07:49" }, +{ 1909, "+07:50" }, +{ 1910, "+07:51" }, +{ 1911, "+07:52" }, +{ 1912, "+07:53" }, +{ 1913, "+07:54" }, +{ 1914, "+07:55" }, +{ 1915, "+07:56" }, +{ 1916, "+07:57" }, +{ 1917, "+07:58" }, +{ 1918, "+07:59" }, +{ 1919, "+08:00" }, +{ 1920, "+08:01" }, +{ 1921, "+08:02" }, +{ 1922, "+08:03" }, +{ 1923, "+08:04" }, +{ 1924, "+08:05" }, +{ 1925, "+08:06" }, +{ 1926, "+08:07" }, +{ 1927, "+08:08" }, +{ 1928, "+08:09" }, +{ 1929, "+08:10" }, +{ 1930, "+08:11" }, +{ 1931, "+08:12" }, +{ 1932, "+08:13" }, +{ 1933, "+08:14" }, +{ 1934, "+08:15" }, +{ 1935, "+08:16" }, +{ 1936, "+08:17" }, +{ 1937, "+08:18" }, +{ 1938, "+08:19" }, +{ 1939, "+08:20" }, +{ 1940, "+08:21" }, +{ 1941, "+08:22" }, +{ 1942, "+08:23" }, +{ 1943, "+08:24" }, +{ 1944, "+08:25" }, +{ 1945, "+08:26" }, +{ 1946, "+08:27" }, +{ 1947, "+08:28" }, +{ 1948, "+08:29" }, +{ 1949, "+08:30" }, +{ 1950, "+08:31" }, +{ 1951, "+08:32" }, +{ 1952, "+08:33" }, +{ 1953, "+08:34" }, +{ 1954, "+08:35" }, +{ 1955, "+08:36" }, +{ 1956, "+08:37" }, +{ 1957, "+08:38" }, +{ 1958, "+08:39" }, +{ 1959, "+08:40" }, +{ 1960, "+08:41" }, +{ 1961, "+08:42" }, +{ 1962, "+08:43" }, +{ 1963, "+08:44" }, +{ 1964, "+08:45" }, +{ 1965, "+08:46" }, +{ 1966, "+08:47" }, +{ 1967, "+08:48" }, +{ 1968, "+08:49" }, +{ 1969, "+08:50" }, +{ 1970, "+08:51" }, +{ 1971, "+08:52" }, +{ 1972, "+08:53" }, +{ 1973, "+08:54" }, +{ 1974, "+08:55" }, +{ 1975, "+08:56" }, +{ 1976, "+08:57" }, +{ 1977, "+08:58" }, +{ 1978, "+08:59" }, +{ 1979, "+09:00" }, +{ 1980, "+09:01" }, +{ 1981, "+09:02" }, +{ 1982, "+09:03" }, +{ 1983, "+09:04" }, +{ 1984, "+09:05" }, +{ 1985, "+09:06" }, +{ 1986, "+09:07" }, +{ 1987, "+09:08" }, +{ 1988, "+09:09" }, +{ 1989, "+09:10" }, +{ 1990, "+09:11" }, +{ 1991, "+09:12" }, +{ 1992, "+09:13" }, +{ 1993, "+09:14" }, +{ 1994, "+09:15" }, +{ 1995, "+09:16" }, +{ 1996, "+09:17" }, +{ 1997, "+09:18" }, +{ 1998, "+09:19" }, +{ 1999, "+09:20" }, +{ 2000, "+09:21" }, +{ 2001, "+09:22" }, +{ 2002, "+09:23" }, +{ 2003, "+09:24" }, +{ 2004, "+09:25" }, +{ 2005, "+09:26" }, +{ 2006, "+09:27" }, +{ 2007, "+09:28" }, +{ 2008, "+09:29" }, +{ 2009, "+09:30" }, +{ 2010, "+09:31" }, +{ 2011, "+09:32" }, +{ 2012, "+09:33" }, +{ 2013, "+09:34" }, +{ 2014, "+09:35" }, +{ 2015, "+09:36" }, +{ 2016, "+09:37" }, +{ 2017, "+09:38" }, +{ 2018, "+09:39" }, +{ 2019, "+09:40" }, +{ 2020, "+09:41" }, +{ 2021, "+09:42" }, +{ 2022, "+09:43" }, +{ 2023, "+09:44" }, +{ 2024, "+09:45" }, +{ 2025, "+09:46" }, +{ 2026, "+09:47" }, +{ 2027, "+09:48" }, +{ 2028, "+09:49" }, +{ 2029, "+09:50" }, +{ 2030, "+09:51" }, +{ 2031, "+09:52" }, +{ 2032, "+09:53" }, +{ 2033, "+09:54" }, +{ 2034, "+09:55" }, +{ 2035, "+09:56" }, +{ 2036, "+09:57" }, +{ 2037, "+09:58" }, +{ 2038, "+09:59" }, +{ 2039, "+10:00" }, +{ 2040, "+10:01" }, +{ 2041, "+10:02" }, +{ 2042, "+10:03" }, +{ 2043, "+10:04" }, +{ 2044, "+10:05" }, +{ 2045, "+10:06" }, +{ 2046, "+10:07" }, +{ 2047, "+10:08" }, +{ 2048, "+10:09" }, +{ 2049, "+10:10" }, +{ 2050, "+10:11" }, +{ 2051, "+10:12" }, +{ 2052, "+10:13" }, +{ 2053, "+10:14" }, +{ 2054, "+10:15" }, +{ 2055, "+10:16" }, +{ 2056, "+10:17" }, +{ 2057, "+10:18" }, +{ 2058, "+10:19" }, +{ 2059, "+10:20" }, +{ 2060, "+10:21" }, +{ 2061, "+10:22" }, +{ 2062, "+10:23" }, +{ 2063, "+10:24" }, +{ 2064, "+10:25" }, +{ 2065, "+10:26" }, +{ 2066, "+10:27" }, +{ 2067, "+10:28" }, +{ 2068, "+10:29" }, +{ 2069, "+10:30" }, +{ 2070, "+10:31" }, +{ 2071, "+10:32" }, +{ 2072, "+10:33" }, +{ 2073, "+10:34" }, +{ 2074, "+10:35" }, +{ 2075, "+10:36" }, +{ 2076, "+10:37" }, +{ 2077, "+10:38" }, +{ 2078, "+10:39" }, +{ 2079, "+10:40" }, +{ 2080, "+10:41" }, +{ 2081, "+10:42" }, +{ 2082, "+10:43" }, +{ 2083, "+10:44" }, +{ 2084, "+10:45" }, +{ 2085, "+10:46" }, +{ 2086, "+10:47" }, +{ 2087, "+10:48" }, +{ 2088, "+10:49" }, +{ 2089, "+10:50" }, +{ 2090, "+10:51" }, +{ 2091, "+10:52" }, +{ 2092, "+10:53" }, +{ 2093, "+10:54" }, +{ 2094, "+10:55" }, +{ 2095, "+10:56" }, +{ 2096, "+10:57" }, +{ 2097, "+10:58" }, +{ 2098, "+10:59" }, +{ 2099, "+11:00" }, +{ 2100, "+11:01" }, +{ 2101, "+11:02" }, +{ 2102, "+11:03" }, +{ 2103, "+11:04" }, +{ 2104, "+11:05" }, +{ 2105, "+11:06" }, +{ 2106, "+11:07" }, +{ 2107, "+11:08" }, +{ 2108, "+11:09" }, +{ 2109, "+11:10" }, +{ 2110, "+11:11" }, +{ 2111, "+11:12" }, +{ 2112, "+11:13" }, +{ 2113, "+11:14" }, +{ 2114, "+11:15" }, +{ 2115, "+11:16" }, +{ 2116, "+11:17" }, +{ 2117, "+11:18" }, +{ 2118, "+11:19" }, +{ 2119, "+11:20" }, +{ 2120, "+11:21" }, +{ 2121, "+11:22" }, +{ 2122, "+11:23" }, +{ 2123, "+11:24" }, +{ 2124, "+11:25" }, +{ 2125, "+11:26" }, +{ 2126, "+11:27" }, +{ 2127, "+11:28" }, +{ 2128, "+11:29" }, +{ 2129, "+11:30" }, +{ 2130, "+11:31" }, +{ 2131, "+11:32" }, +{ 2132, "+11:33" }, +{ 2133, "+11:34" }, +{ 2134, "+11:35" }, +{ 2135, "+11:36" }, +{ 2136, "+11:37" }, +{ 2137, "+11:38" }, +{ 2138, "+11:39" }, +{ 2139, "+11:40" }, +{ 2140, "+11:41" }, +{ 2141, "+11:42" }, +{ 2142, "+11:43" }, +{ 2143, "+11:44" }, +{ 2144, "+11:45" }, +{ 2145, "+11:46" }, +{ 2146, "+11:47" }, +{ 2147, "+11:48" }, +{ 2148, "+11:49" }, +{ 2149, "+11:50" }, +{ 2150, "+11:51" }, +{ 2151, "+11:52" }, +{ 2152, "+11:53" }, +{ 2153, "+11:54" }, +{ 2154, "+11:55" }, +{ 2155, "+11:56" }, +{ 2156, "+11:57" }, +{ 2157, "+11:58" }, +{ 2158, "+11:59" }, +{ 2159, "+12:00" }, +{ 2160, "+12:01" }, +{ 2161, "+12:02" }, +{ 2162, "+12:03" }, +{ 2163, "+12:04" }, +{ 2164, "+12:05" }, +{ 2165, "+12:06" }, +{ 2166, "+12:07" }, +{ 2167, "+12:08" }, +{ 2168, "+12:09" }, +{ 2169, "+12:10" }, +{ 2170, "+12:11" }, +{ 2171, "+12:12" }, +{ 2172, "+12:13" }, +{ 2173, "+12:14" }, +{ 2174, "+12:15" }, +{ 2175, "+12:16" }, +{ 2176, "+12:17" }, +{ 2177, "+12:18" }, +{ 2178, "+12:19" }, +{ 2179, "+12:20" }, +{ 2180, "+12:21" }, +{ 2181, "+12:22" }, +{ 2182, "+12:23" }, +{ 2183, "+12:24" }, +{ 2184, "+12:25" }, +{ 2185, "+12:26" }, +{ 2186, "+12:27" }, +{ 2187, "+12:28" }, +{ 2188, "+12:29" }, +{ 2189, "+12:30" }, +{ 2190, "+12:31" }, +{ 2191, "+12:32" }, +{ 2192, "+12:33" }, +{ 2193, "+12:34" }, +{ 2194, "+12:35" }, +{ 2195, "+12:36" }, +{ 2196, "+12:37" }, +{ 2197, "+12:38" }, +{ 2198, "+12:39" }, +{ 2199, "+12:40" }, +{ 2200, "+12:41" }, +{ 2201, "+12:42" }, +{ 2202, "+12:43" }, +{ 2203, "+12:44" }, +{ 2204, "+12:45" }, +{ 2205, "+12:46" }, +{ 2206, "+12:47" }, +{ 2207, "+12:48" }, +{ 2208, "+12:49" }, +{ 2209, "+12:50" }, +{ 2210, "+12:51" }, +{ 2211, "+12:52" }, +{ 2212, "+12:53" }, +{ 2213, "+12:54" }, +{ 2214, "+12:55" }, +{ 2215, "+12:56" }, +{ 2216, "+12:57" }, +{ 2217, "+12:58" }, +{ 2218, "+12:59" }, +{ 2219, "+13:00" }, +{ 2220, "+13:01" }, +{ 2221, "+13:02" }, +{ 2222, "+13:03" }, +{ 2223, "+13:04" }, +{ 2224, "+13:05" }, +{ 2225, "+13:06" }, +{ 2226, "+13:07" }, +{ 2227, "+13:08" }, +{ 2228, "+13:09" }, +{ 2229, "+13:10" }, +{ 2230, "+13:11" }, +{ 2231, "+13:12" }, +{ 2232, "+13:13" }, +{ 2233, "+13:14" }, +{ 2234, "+13:15" }, +{ 2235, "+13:16" }, +{ 2236, "+13:17" }, +{ 2237, "+13:18" }, +{ 2238, "+13:19" }, +{ 2239, "+13:20" }, +{ 2240, "+13:21" }, +{ 2241, "+13:22" }, +{ 2242, "+13:23" }, +{ 2243, "+13:24" }, +{ 2244, "+13:25" }, +{ 2245, "+13:26" }, +{ 2246, "+13:27" }, +{ 2247, "+13:28" }, +{ 2248, "+13:29" }, +{ 2249, "+13:30" }, +{ 2250, "+13:31" }, +{ 2251, "+13:32" }, +{ 2252, "+13:33" }, +{ 2253, "+13:34" }, +{ 2254, "+13:35" }, +{ 2255, "+13:36" }, +{ 2256, "+13:37" }, +{ 2257, "+13:38" }, +{ 2258, "+13:39" }, +{ 2259, "+13:40" }, +{ 2260, "+13:41" }, +{ 2261, "+13:42" }, +{ 2262, "+13:43" }, +{ 2263, "+13:44" }, +{ 2264, "+13:45" }, +{ 2265, "+13:46" }, +{ 2266, "+13:47" }, +{ 2267, "+13:48" }, +{ 2268, "+13:49" }, +{ 2269, "+13:50" }, +{ 2270, "+13:51" }, +{ 2271, "+13:52" }, +{ 2272, "+13:53" }, +{ 2273, "+13:54" }, +{ 2274, "+13:55" }, +{ 2275, "+13:56" }, +{ 2276, "+13:57" }, +{ 2277, "+13:58" }, +{ 2278, "+13:59" }, +{ 2279, "+14:00" }, }; // select '{ "' || trim(rdb$time_zone_name) || '", ' || rdb$time_zone_id || ' },' from rdb$time_zones order by rdb$time_zone_id desc; - static Dictionary _nameToId = new Dictionary() + static readonly Dictionary NameToId = new Dictionary(StringComparer.OrdinalIgnoreCase) { { "GMT", 65535 }, { "ACT", 65534 }, @@ -1303,11 +2988,1726 @@ internal class TimeZoneMapping { "Pacific/Kanton", 64901 }, { "Europe/Kyiv", 64900 }, { "America/Ciudad_Juarez", 64899 }, + +{ "-14:00", 599 }, +{ "-13:59", 600 }, +{ "-13:58", 601 }, +{ "-13:57", 602 }, +{ "-13:56", 603 }, +{ "-13:55", 604 }, +{ "-13:54", 605 }, +{ "-13:53", 606 }, +{ "-13:52", 607 }, +{ "-13:51", 608 }, +{ "-13:50", 609 }, +{ "-13:49", 610 }, +{ "-13:48", 611 }, +{ "-13:47", 612 }, +{ "-13:46", 613 }, +{ "-13:45", 614 }, +{ "-13:44", 615 }, +{ "-13:43", 616 }, +{ "-13:42", 617 }, +{ "-13:41", 618 }, +{ "-13:40", 619 }, +{ "-13:39", 620 }, +{ "-13:38", 621 }, +{ "-13:37", 622 }, +{ "-13:36", 623 }, +{ "-13:35", 624 }, +{ "-13:34", 625 }, +{ "-13:33", 626 }, +{ "-13:32", 627 }, +{ "-13:31", 628 }, +{ "-13:30", 629 }, +{ "-13:29", 630 }, +{ "-13:28", 631 }, +{ "-13:27", 632 }, +{ "-13:26", 633 }, +{ "-13:25", 634 }, +{ "-13:24", 635 }, +{ "-13:23", 636 }, +{ "-13:22", 637 }, +{ "-13:21", 638 }, +{ "-13:20", 639 }, +{ "-13:19", 640 }, +{ "-13:18", 641 }, +{ "-13:17", 642 }, +{ "-13:16", 643 }, +{ "-13:15", 644 }, +{ "-13:14", 645 }, +{ "-13:13", 646 }, +{ "-13:12", 647 }, +{ "-13:11", 648 }, +{ "-13:10", 649 }, +{ "-13:09", 650 }, +{ "-13:08", 651 }, +{ "-13:07", 652 }, +{ "-13:06", 653 }, +{ "-13:05", 654 }, +{ "-13:04", 655 }, +{ "-13:03", 656 }, +{ "-13:02", 657 }, +{ "-13:01", 658 }, +{ "-13:00", 659 }, +{ "-12:59", 660 }, +{ "-12:58", 661 }, +{ "-12:57", 662 }, +{ "-12:56", 663 }, +{ "-12:55", 664 }, +{ "-12:54", 665 }, +{ "-12:53", 666 }, +{ "-12:52", 667 }, +{ "-12:51", 668 }, +{ "-12:50", 669 }, +{ "-12:49", 670 }, +{ "-12:48", 671 }, +{ "-12:47", 672 }, +{ "-12:46", 673 }, +{ "-12:45", 674 }, +{ "-12:44", 675 }, +{ "-12:43", 676 }, +{ "-12:42", 677 }, +{ "-12:41", 678 }, +{ "-12:40", 679 }, +{ "-12:39", 680 }, +{ "-12:38", 681 }, +{ "-12:37", 682 }, +{ "-12:36", 683 }, +{ "-12:35", 684 }, +{ "-12:34", 685 }, +{ "-12:33", 686 }, +{ "-12:32", 687 }, +{ "-12:31", 688 }, +{ "-12:30", 689 }, +{ "-12:29", 690 }, +{ "-12:28", 691 }, +{ "-12:27", 692 }, +{ "-12:26", 693 }, +{ "-12:25", 694 }, +{ "-12:24", 695 }, +{ "-12:23", 696 }, +{ "-12:22", 697 }, +{ "-12:21", 698 }, +{ "-12:20", 699 }, +{ "-12:19", 700 }, +{ "-12:18", 701 }, +{ "-12:17", 702 }, +{ "-12:16", 703 }, +{ "-12:15", 704 }, +{ "-12:14", 705 }, +{ "-12:13", 706 }, +{ "-12:12", 707 }, +{ "-12:11", 708 }, +{ "-12:10", 709 }, +{ "-12:09", 710 }, +{ "-12:08", 711 }, +{ "-12:07", 712 }, +{ "-12:06", 713 }, +{ "-12:05", 714 }, +{ "-12:04", 715 }, +{ "-12:03", 716 }, +{ "-12:02", 717 }, +{ "-12:01", 718 }, +{ "-12:00", 719 }, +{ "-11:59", 720 }, +{ "-11:58", 721 }, +{ "-11:57", 722 }, +{ "-11:56", 723 }, +{ "-11:55", 724 }, +{ "-11:54", 725 }, +{ "-11:53", 726 }, +{ "-11:52", 727 }, +{ "-11:51", 728 }, +{ "-11:50", 729 }, +{ "-11:49", 730 }, +{ "-11:48", 731 }, +{ "-11:47", 732 }, +{ "-11:46", 733 }, +{ "-11:45", 734 }, +{ "-11:44", 735 }, +{ "-11:43", 736 }, +{ "-11:42", 737 }, +{ "-11:41", 738 }, +{ "-11:40", 739 }, +{ "-11:39", 740 }, +{ "-11:38", 741 }, +{ "-11:37", 742 }, +{ "-11:36", 743 }, +{ "-11:35", 744 }, +{ "-11:34", 745 }, +{ "-11:33", 746 }, +{ "-11:32", 747 }, +{ "-11:31", 748 }, +{ "-11:30", 749 }, +{ "-11:29", 750 }, +{ "-11:28", 751 }, +{ "-11:27", 752 }, +{ "-11:26", 753 }, +{ "-11:25", 754 }, +{ "-11:24", 755 }, +{ "-11:23", 756 }, +{ "-11:22", 757 }, +{ "-11:21", 758 }, +{ "-11:20", 759 }, +{ "-11:19", 760 }, +{ "-11:18", 761 }, +{ "-11:17", 762 }, +{ "-11:16", 763 }, +{ "-11:15", 764 }, +{ "-11:14", 765 }, +{ "-11:13", 766 }, +{ "-11:12", 767 }, +{ "-11:11", 768 }, +{ "-11:10", 769 }, +{ "-11:09", 770 }, +{ "-11:08", 771 }, +{ "-11:07", 772 }, +{ "-11:06", 773 }, +{ "-11:05", 774 }, +{ "-11:04", 775 }, +{ "-11:03", 776 }, +{ "-11:02", 777 }, +{ "-11:01", 778 }, +{ "-11:00", 779 }, +{ "-10:59", 780 }, +{ "-10:58", 781 }, +{ "-10:57", 782 }, +{ "-10:56", 783 }, +{ "-10:55", 784 }, +{ "-10:54", 785 }, +{ "-10:53", 786 }, +{ "-10:52", 787 }, +{ "-10:51", 788 }, +{ "-10:50", 789 }, +{ "-10:49", 790 }, +{ "-10:48", 791 }, +{ "-10:47", 792 }, +{ "-10:46", 793 }, +{ "-10:45", 794 }, +{ "-10:44", 795 }, +{ "-10:43", 796 }, +{ "-10:42", 797 }, +{ "-10:41", 798 }, +{ "-10:40", 799 }, +{ "-10:39", 800 }, +{ "-10:38", 801 }, +{ "-10:37", 802 }, +{ "-10:36", 803 }, +{ "-10:35", 804 }, +{ "-10:34", 805 }, +{ "-10:33", 806 }, +{ "-10:32", 807 }, +{ "-10:31", 808 }, +{ "-10:30", 809 }, +{ "-10:29", 810 }, +{ "-10:28", 811 }, +{ "-10:27", 812 }, +{ "-10:26", 813 }, +{ "-10:25", 814 }, +{ "-10:24", 815 }, +{ "-10:23", 816 }, +{ "-10:22", 817 }, +{ "-10:21", 818 }, +{ "-10:20", 819 }, +{ "-10:19", 820 }, +{ "-10:18", 821 }, +{ "-10:17", 822 }, +{ "-10:16", 823 }, +{ "-10:15", 824 }, +{ "-10:14", 825 }, +{ "-10:13", 826 }, +{ "-10:12", 827 }, +{ "-10:11", 828 }, +{ "-10:10", 829 }, +{ "-10:09", 830 }, +{ "-10:08", 831 }, +{ "-10:07", 832 }, +{ "-10:06", 833 }, +{ "-10:05", 834 }, +{ "-10:04", 835 }, +{ "-10:03", 836 }, +{ "-10:02", 837 }, +{ "-10:01", 838 }, +{ "-10:00", 839 }, +{ "-09:59", 840 }, +{ "-09:58", 841 }, +{ "-09:57", 842 }, +{ "-09:56", 843 }, +{ "-09:55", 844 }, +{ "-09:54", 845 }, +{ "-09:53", 846 }, +{ "-09:52", 847 }, +{ "-09:51", 848 }, +{ "-09:50", 849 }, +{ "-09:49", 850 }, +{ "-09:48", 851 }, +{ "-09:47", 852 }, +{ "-09:46", 853 }, +{ "-09:45", 854 }, +{ "-09:44", 855 }, +{ "-09:43", 856 }, +{ "-09:42", 857 }, +{ "-09:41", 858 }, +{ "-09:40", 859 }, +{ "-09:39", 860 }, +{ "-09:38", 861 }, +{ "-09:37", 862 }, +{ "-09:36", 863 }, +{ "-09:35", 864 }, +{ "-09:34", 865 }, +{ "-09:33", 866 }, +{ "-09:32", 867 }, +{ "-09:31", 868 }, +{ "-09:30", 869 }, +{ "-09:29", 870 }, +{ "-09:28", 871 }, +{ "-09:27", 872 }, +{ "-09:26", 873 }, +{ "-09:25", 874 }, +{ "-09:24", 875 }, +{ "-09:23", 876 }, +{ "-09:22", 877 }, +{ "-09:21", 878 }, +{ "-09:20", 879 }, +{ "-09:19", 880 }, +{ "-09:18", 881 }, +{ "-09:17", 882 }, +{ "-09:16", 883 }, +{ "-09:15", 884 }, +{ "-09:14", 885 }, +{ "-09:13", 886 }, +{ "-09:12", 887 }, +{ "-09:11", 888 }, +{ "-09:10", 889 }, +{ "-09:09", 890 }, +{ "-09:08", 891 }, +{ "-09:07", 892 }, +{ "-09:06", 893 }, +{ "-09:05", 894 }, +{ "-09:04", 895 }, +{ "-09:03", 896 }, +{ "-09:02", 897 }, +{ "-09:01", 898 }, +{ "-09:00", 899 }, +{ "-08:59", 900 }, +{ "-08:58", 901 }, +{ "-08:57", 902 }, +{ "-08:56", 903 }, +{ "-08:55", 904 }, +{ "-08:54", 905 }, +{ "-08:53", 906 }, +{ "-08:52", 907 }, +{ "-08:51", 908 }, +{ "-08:50", 909 }, +{ "-08:49", 910 }, +{ "-08:48", 911 }, +{ "-08:47", 912 }, +{ "-08:46", 913 }, +{ "-08:45", 914 }, +{ "-08:44", 915 }, +{ "-08:43", 916 }, +{ "-08:42", 917 }, +{ "-08:41", 918 }, +{ "-08:40", 919 }, +{ "-08:39", 920 }, +{ "-08:38", 921 }, +{ "-08:37", 922 }, +{ "-08:36", 923 }, +{ "-08:35", 924 }, +{ "-08:34", 925 }, +{ "-08:33", 926 }, +{ "-08:32", 927 }, +{ "-08:31", 928 }, +{ "-08:30", 929 }, +{ "-08:29", 930 }, +{ "-08:28", 931 }, +{ "-08:27", 932 }, +{ "-08:26", 933 }, +{ "-08:25", 934 }, +{ "-08:24", 935 }, +{ "-08:23", 936 }, +{ "-08:22", 937 }, +{ "-08:21", 938 }, +{ "-08:20", 939 }, +{ "-08:19", 940 }, +{ "-08:18", 941 }, +{ "-08:17", 942 }, +{ "-08:16", 943 }, +{ "-08:15", 944 }, +{ "-08:14", 945 }, +{ "-08:13", 946 }, +{ "-08:12", 947 }, +{ "-08:11", 948 }, +{ "-08:10", 949 }, +{ "-08:09", 950 }, +{ "-08:08", 951 }, +{ "-08:07", 952 }, +{ "-08:06", 953 }, +{ "-08:05", 954 }, +{ "-08:04", 955 }, +{ "-08:03", 956 }, +{ "-08:02", 957 }, +{ "-08:01", 958 }, +{ "-08:00", 959 }, +{ "-07:59", 960 }, +{ "-07:58", 961 }, +{ "-07:57", 962 }, +{ "-07:56", 963 }, +{ "-07:55", 964 }, +{ "-07:54", 965 }, +{ "-07:53", 966 }, +{ "-07:52", 967 }, +{ "-07:51", 968 }, +{ "-07:50", 969 }, +{ "-07:49", 970 }, +{ "-07:48", 971 }, +{ "-07:47", 972 }, +{ "-07:46", 973 }, +{ "-07:45", 974 }, +{ "-07:44", 975 }, +{ "-07:43", 976 }, +{ "-07:42", 977 }, +{ "-07:41", 978 }, +{ "-07:40", 979 }, +{ "-07:39", 980 }, +{ "-07:38", 981 }, +{ "-07:37", 982 }, +{ "-07:36", 983 }, +{ "-07:35", 984 }, +{ "-07:34", 985 }, +{ "-07:33", 986 }, +{ "-07:32", 987 }, +{ "-07:31", 988 }, +{ "-07:30", 989 }, +{ "-07:29", 990 }, +{ "-07:28", 991 }, +{ "-07:27", 992 }, +{ "-07:26", 993 }, +{ "-07:25", 994 }, +{ "-07:24", 995 }, +{ "-07:23", 996 }, +{ "-07:22", 997 }, +{ "-07:21", 998 }, +{ "-07:20", 999 }, +{ "-07:19", 1000 }, +{ "-07:18", 1001 }, +{ "-07:17", 1002 }, +{ "-07:16", 1003 }, +{ "-07:15", 1004 }, +{ "-07:14", 1005 }, +{ "-07:13", 1006 }, +{ "-07:12", 1007 }, +{ "-07:11", 1008 }, +{ "-07:10", 1009 }, +{ "-07:09", 1010 }, +{ "-07:08", 1011 }, +{ "-07:07", 1012 }, +{ "-07:06", 1013 }, +{ "-07:05", 1014 }, +{ "-07:04", 1015 }, +{ "-07:03", 1016 }, +{ "-07:02", 1017 }, +{ "-07:01", 1018 }, +{ "-07:00", 1019 }, +{ "-06:59", 1020 }, +{ "-06:58", 1021 }, +{ "-06:57", 1022 }, +{ "-06:56", 1023 }, +{ "-06:55", 1024 }, +{ "-06:54", 1025 }, +{ "-06:53", 1026 }, +{ "-06:52", 1027 }, +{ "-06:51", 1028 }, +{ "-06:50", 1029 }, +{ "-06:49", 1030 }, +{ "-06:48", 1031 }, +{ "-06:47", 1032 }, +{ "-06:46", 1033 }, +{ "-06:45", 1034 }, +{ "-06:44", 1035 }, +{ "-06:43", 1036 }, +{ "-06:42", 1037 }, +{ "-06:41", 1038 }, +{ "-06:40", 1039 }, +{ "-06:39", 1040 }, +{ "-06:38", 1041 }, +{ "-06:37", 1042 }, +{ "-06:36", 1043 }, +{ "-06:35", 1044 }, +{ "-06:34", 1045 }, +{ "-06:33", 1046 }, +{ "-06:32", 1047 }, +{ "-06:31", 1048 }, +{ "-06:30", 1049 }, +{ "-06:29", 1050 }, +{ "-06:28", 1051 }, +{ "-06:27", 1052 }, +{ "-06:26", 1053 }, +{ "-06:25", 1054 }, +{ "-06:24", 1055 }, +{ "-06:23", 1056 }, +{ "-06:22", 1057 }, +{ "-06:21", 1058 }, +{ "-06:20", 1059 }, +{ "-06:19", 1060 }, +{ "-06:18", 1061 }, +{ "-06:17", 1062 }, +{ "-06:16", 1063 }, +{ "-06:15", 1064 }, +{ "-06:14", 1065 }, +{ "-06:13", 1066 }, +{ "-06:12", 1067 }, +{ "-06:11", 1068 }, +{ "-06:10", 1069 }, +{ "-06:09", 1070 }, +{ "-06:08", 1071 }, +{ "-06:07", 1072 }, +{ "-06:06", 1073 }, +{ "-06:05", 1074 }, +{ "-06:04", 1075 }, +{ "-06:03", 1076 }, +{ "-06:02", 1077 }, +{ "-06:01", 1078 }, +{ "-06:00", 1079 }, +{ "-05:59", 1080 }, +{ "-05:58", 1081 }, +{ "-05:57", 1082 }, +{ "-05:56", 1083 }, +{ "-05:55", 1084 }, +{ "-05:54", 1085 }, +{ "-05:53", 1086 }, +{ "-05:52", 1087 }, +{ "-05:51", 1088 }, +{ "-05:50", 1089 }, +{ "-05:49", 1090 }, +{ "-05:48", 1091 }, +{ "-05:47", 1092 }, +{ "-05:46", 1093 }, +{ "-05:45", 1094 }, +{ "-05:44", 1095 }, +{ "-05:43", 1096 }, +{ "-05:42", 1097 }, +{ "-05:41", 1098 }, +{ "-05:40", 1099 }, +{ "-05:39", 1100 }, +{ "-05:38", 1101 }, +{ "-05:37", 1102 }, +{ "-05:36", 1103 }, +{ "-05:35", 1104 }, +{ "-05:34", 1105 }, +{ "-05:33", 1106 }, +{ "-05:32", 1107 }, +{ "-05:31", 1108 }, +{ "-05:30", 1109 }, +{ "-05:29", 1110 }, +{ "-05:28", 1111 }, +{ "-05:27", 1112 }, +{ "-05:26", 1113 }, +{ "-05:25", 1114 }, +{ "-05:24", 1115 }, +{ "-05:23", 1116 }, +{ "-05:22", 1117 }, +{ "-05:21", 1118 }, +{ "-05:20", 1119 }, +{ "-05:19", 1120 }, +{ "-05:18", 1121 }, +{ "-05:17", 1122 }, +{ "-05:16", 1123 }, +{ "-05:15", 1124 }, +{ "-05:14", 1125 }, +{ "-05:13", 1126 }, +{ "-05:12", 1127 }, +{ "-05:11", 1128 }, +{ "-05:10", 1129 }, +{ "-05:09", 1130 }, +{ "-05:08", 1131 }, +{ "-05:07", 1132 }, +{ "-05:06", 1133 }, +{ "-05:05", 1134 }, +{ "-05:04", 1135 }, +{ "-05:03", 1136 }, +{ "-05:02", 1137 }, +{ "-05:01", 1138 }, +{ "-05:00", 1139 }, +{ "-04:59", 1140 }, +{ "-04:58", 1141 }, +{ "-04:57", 1142 }, +{ "-04:56", 1143 }, +{ "-04:55", 1144 }, +{ "-04:54", 1145 }, +{ "-04:53", 1146 }, +{ "-04:52", 1147 }, +{ "-04:51", 1148 }, +{ "-04:50", 1149 }, +{ "-04:49", 1150 }, +{ "-04:48", 1151 }, +{ "-04:47", 1152 }, +{ "-04:46", 1153 }, +{ "-04:45", 1154 }, +{ "-04:44", 1155 }, +{ "-04:43", 1156 }, +{ "-04:42", 1157 }, +{ "-04:41", 1158 }, +{ "-04:40", 1159 }, +{ "-04:39", 1160 }, +{ "-04:38", 1161 }, +{ "-04:37", 1162 }, +{ "-04:36", 1163 }, +{ "-04:35", 1164 }, +{ "-04:34", 1165 }, +{ "-04:33", 1166 }, +{ "-04:32", 1167 }, +{ "-04:31", 1168 }, +{ "-04:30", 1169 }, +{ "-04:29", 1170 }, +{ "-04:28", 1171 }, +{ "-04:27", 1172 }, +{ "-04:26", 1173 }, +{ "-04:25", 1174 }, +{ "-04:24", 1175 }, +{ "-04:23", 1176 }, +{ "-04:22", 1177 }, +{ "-04:21", 1178 }, +{ "-04:20", 1179 }, +{ "-04:19", 1180 }, +{ "-04:18", 1181 }, +{ "-04:17", 1182 }, +{ "-04:16", 1183 }, +{ "-04:15", 1184 }, +{ "-04:14", 1185 }, +{ "-04:13", 1186 }, +{ "-04:12", 1187 }, +{ "-04:11", 1188 }, +{ "-04:10", 1189 }, +{ "-04:09", 1190 }, +{ "-04:08", 1191 }, +{ "-04:07", 1192 }, +{ "-04:06", 1193 }, +{ "-04:05", 1194 }, +{ "-04:04", 1195 }, +{ "-04:03", 1196 }, +{ "-04:02", 1197 }, +{ "-04:01", 1198 }, +{ "-04:00", 1199 }, +{ "-03:59", 1200 }, +{ "-03:58", 1201 }, +{ "-03:57", 1202 }, +{ "-03:56", 1203 }, +{ "-03:55", 1204 }, +{ "-03:54", 1205 }, +{ "-03:53", 1206 }, +{ "-03:52", 1207 }, +{ "-03:51", 1208 }, +{ "-03:50", 1209 }, +{ "-03:49", 1210 }, +{ "-03:48", 1211 }, +{ "-03:47", 1212 }, +{ "-03:46", 1213 }, +{ "-03:45", 1214 }, +{ "-03:44", 1215 }, +{ "-03:43", 1216 }, +{ "-03:42", 1217 }, +{ "-03:41", 1218 }, +{ "-03:40", 1219 }, +{ "-03:39", 1220 }, +{ "-03:38", 1221 }, +{ "-03:37", 1222 }, +{ "-03:36", 1223 }, +{ "-03:35", 1224 }, +{ "-03:34", 1225 }, +{ "-03:33", 1226 }, +{ "-03:32", 1227 }, +{ "-03:31", 1228 }, +{ "-03:30", 1229 }, +{ "-03:29", 1230 }, +{ "-03:28", 1231 }, +{ "-03:27", 1232 }, +{ "-03:26", 1233 }, +{ "-03:25", 1234 }, +{ "-03:24", 1235 }, +{ "-03:23", 1236 }, +{ "-03:22", 1237 }, +{ "-03:21", 1238 }, +{ "-03:20", 1239 }, +{ "-03:19", 1240 }, +{ "-03:18", 1241 }, +{ "-03:17", 1242 }, +{ "-03:16", 1243 }, +{ "-03:15", 1244 }, +{ "-03:14", 1245 }, +{ "-03:13", 1246 }, +{ "-03:12", 1247 }, +{ "-03:11", 1248 }, +{ "-03:10", 1249 }, +{ "-03:09", 1250 }, +{ "-03:08", 1251 }, +{ "-03:07", 1252 }, +{ "-03:06", 1253 }, +{ "-03:05", 1254 }, +{ "-03:04", 1255 }, +{ "-03:03", 1256 }, +{ "-03:02", 1257 }, +{ "-03:01", 1258 }, +{ "-03:00", 1259 }, +{ "-02:59", 1260 }, +{ "-02:58", 1261 }, +{ "-02:57", 1262 }, +{ "-02:56", 1263 }, +{ "-02:55", 1264 }, +{ "-02:54", 1265 }, +{ "-02:53", 1266 }, +{ "-02:52", 1267 }, +{ "-02:51", 1268 }, +{ "-02:50", 1269 }, +{ "-02:49", 1270 }, +{ "-02:48", 1271 }, +{ "-02:47", 1272 }, +{ "-02:46", 1273 }, +{ "-02:45", 1274 }, +{ "-02:44", 1275 }, +{ "-02:43", 1276 }, +{ "-02:42", 1277 }, +{ "-02:41", 1278 }, +{ "-02:40", 1279 }, +{ "-02:39", 1280 }, +{ "-02:38", 1281 }, +{ "-02:37", 1282 }, +{ "-02:36", 1283 }, +{ "-02:35", 1284 }, +{ "-02:34", 1285 }, +{ "-02:33", 1286 }, +{ "-02:32", 1287 }, +{ "-02:31", 1288 }, +{ "-02:30", 1289 }, +{ "-02:29", 1290 }, +{ "-02:28", 1291 }, +{ "-02:27", 1292 }, +{ "-02:26", 1293 }, +{ "-02:25", 1294 }, +{ "-02:24", 1295 }, +{ "-02:23", 1296 }, +{ "-02:22", 1297 }, +{ "-02:21", 1298 }, +{ "-02:20", 1299 }, +{ "-02:19", 1300 }, +{ "-02:18", 1301 }, +{ "-02:17", 1302 }, +{ "-02:16", 1303 }, +{ "-02:15", 1304 }, +{ "-02:14", 1305 }, +{ "-02:13", 1306 }, +{ "-02:12", 1307 }, +{ "-02:11", 1308 }, +{ "-02:10", 1309 }, +{ "-02:09", 1310 }, +{ "-02:08", 1311 }, +{ "-02:07", 1312 }, +{ "-02:06", 1313 }, +{ "-02:05", 1314 }, +{ "-02:04", 1315 }, +{ "-02:03", 1316 }, +{ "-02:02", 1317 }, +{ "-02:01", 1318 }, +{ "-02:00", 1319 }, +{ "-01:59", 1320 }, +{ "-01:58", 1321 }, +{ "-01:57", 1322 }, +{ "-01:56", 1323 }, +{ "-01:55", 1324 }, +{ "-01:54", 1325 }, +{ "-01:53", 1326 }, +{ "-01:52", 1327 }, +{ "-01:51", 1328 }, +{ "-01:50", 1329 }, +{ "-01:49", 1330 }, +{ "-01:48", 1331 }, +{ "-01:47", 1332 }, +{ "-01:46", 1333 }, +{ "-01:45", 1334 }, +{ "-01:44", 1335 }, +{ "-01:43", 1336 }, +{ "-01:42", 1337 }, +{ "-01:41", 1338 }, +{ "-01:40", 1339 }, +{ "-01:39", 1340 }, +{ "-01:38", 1341 }, +{ "-01:37", 1342 }, +{ "-01:36", 1343 }, +{ "-01:35", 1344 }, +{ "-01:34", 1345 }, +{ "-01:33", 1346 }, +{ "-01:32", 1347 }, +{ "-01:31", 1348 }, +{ "-01:30", 1349 }, +{ "-01:29", 1350 }, +{ "-01:28", 1351 }, +{ "-01:27", 1352 }, +{ "-01:26", 1353 }, +{ "-01:25", 1354 }, +{ "-01:24", 1355 }, +{ "-01:23", 1356 }, +{ "-01:22", 1357 }, +{ "-01:21", 1358 }, +{ "-01:20", 1359 }, +{ "-01:19", 1360 }, +{ "-01:18", 1361 }, +{ "-01:17", 1362 }, +{ "-01:16", 1363 }, +{ "-01:15", 1364 }, +{ "-01:14", 1365 }, +{ "-01:13", 1366 }, +{ "-01:12", 1367 }, +{ "-01:11", 1368 }, +{ "-01:10", 1369 }, +{ "-01:09", 1370 }, +{ "-01:08", 1371 }, +{ "-01:07", 1372 }, +{ "-01:06", 1373 }, +{ "-01:05", 1374 }, +{ "-01:04", 1375 }, +{ "-01:03", 1376 }, +{ "-01:02", 1377 }, +{ "-01:01", 1378 }, +{ "-01:00", 1379 }, +{ "-00:59", 1380 }, +{ "-00:58", 1381 }, +{ "-00:57", 1382 }, +{ "-00:56", 1383 }, +{ "-00:55", 1384 }, +{ "-00:54", 1385 }, +{ "-00:53", 1386 }, +{ "-00:52", 1387 }, +{ "-00:51", 1388 }, +{ "-00:50", 1389 }, +{ "-00:49", 1390 }, +{ "-00:48", 1391 }, +{ "-00:47", 1392 }, +{ "-00:46", 1393 }, +{ "-00:45", 1394 }, +{ "-00:44", 1395 }, +{ "-00:43", 1396 }, +{ "-00:42", 1397 }, +{ "-00:41", 1398 }, +{ "-00:40", 1399 }, +{ "-00:39", 1400 }, +{ "-00:38", 1401 }, +{ "-00:37", 1402 }, +{ "-00:36", 1403 }, +{ "-00:35", 1404 }, +{ "-00:34", 1405 }, +{ "-00:33", 1406 }, +{ "-00:32", 1407 }, +{ "-00:31", 1408 }, +{ "-00:30", 1409 }, +{ "-00:29", 1410 }, +{ "-00:28", 1411 }, +{ "-00:27", 1412 }, +{ "-00:26", 1413 }, +{ "-00:25", 1414 }, +{ "-00:24", 1415 }, +{ "-00:23", 1416 }, +{ "-00:22", 1417 }, +{ "-00:21", 1418 }, +{ "-00:20", 1419 }, +{ "-00:19", 1420 }, +{ "-00:18", 1421 }, +{ "-00:17", 1422 }, +{ "-00:16", 1423 }, +{ "-00:15", 1424 }, +{ "-00:14", 1425 }, +{ "-00:13", 1426 }, +{ "-00:12", 1427 }, +{ "-00:11", 1428 }, +{ "-00:10", 1429 }, +{ "-00:09", 1430 }, +{ "-00:08", 1431 }, +{ "-00:07", 1432 }, +{ "-00:06", 1433 }, +{ "-00:05", 1434 }, +{ "-00:04", 1435 }, +{ "-00:03", 1436 }, +{ "-00:02", 1437 }, +{ "-00:01", 1438 }, +{ "+00:00", 1439 }, +{ "+00:01", 1440 }, +{ "+00:02", 1441 }, +{ "+00:03", 1442 }, +{ "+00:04", 1443 }, +{ "+00:05", 1444 }, +{ "+00:06", 1445 }, +{ "+00:07", 1446 }, +{ "+00:08", 1447 }, +{ "+00:09", 1448 }, +{ "+00:10", 1449 }, +{ "+00:11", 1450 }, +{ "+00:12", 1451 }, +{ "+00:13", 1452 }, +{ "+00:14", 1453 }, +{ "+00:15", 1454 }, +{ "+00:16", 1455 }, +{ "+00:17", 1456 }, +{ "+00:18", 1457 }, +{ "+00:19", 1458 }, +{ "+00:20", 1459 }, +{ "+00:21", 1460 }, +{ "+00:22", 1461 }, +{ "+00:23", 1462 }, +{ "+00:24", 1463 }, +{ "+00:25", 1464 }, +{ "+00:26", 1465 }, +{ "+00:27", 1466 }, +{ "+00:28", 1467 }, +{ "+00:29", 1468 }, +{ "+00:30", 1469 }, +{ "+00:31", 1470 }, +{ "+00:32", 1471 }, +{ "+00:33", 1472 }, +{ "+00:34", 1473 }, +{ "+00:35", 1474 }, +{ "+00:36", 1475 }, +{ "+00:37", 1476 }, +{ "+00:38", 1477 }, +{ "+00:39", 1478 }, +{ "+00:40", 1479 }, +{ "+00:41", 1480 }, +{ "+00:42", 1481 }, +{ "+00:43", 1482 }, +{ "+00:44", 1483 }, +{ "+00:45", 1484 }, +{ "+00:46", 1485 }, +{ "+00:47", 1486 }, +{ "+00:48", 1487 }, +{ "+00:49", 1488 }, +{ "+00:50", 1489 }, +{ "+00:51", 1490 }, +{ "+00:52", 1491 }, +{ "+00:53", 1492 }, +{ "+00:54", 1493 }, +{ "+00:55", 1494 }, +{ "+00:56", 1495 }, +{ "+00:57", 1496 }, +{ "+00:58", 1497 }, +{ "+00:59", 1498 }, +{ "+01:00", 1499 }, +{ "+01:01", 1500 }, +{ "+01:02", 1501 }, +{ "+01:03", 1502 }, +{ "+01:04", 1503 }, +{ "+01:05", 1504 }, +{ "+01:06", 1505 }, +{ "+01:07", 1506 }, +{ "+01:08", 1507 }, +{ "+01:09", 1508 }, +{ "+01:10", 1509 }, +{ "+01:11", 1510 }, +{ "+01:12", 1511 }, +{ "+01:13", 1512 }, +{ "+01:14", 1513 }, +{ "+01:15", 1514 }, +{ "+01:16", 1515 }, +{ "+01:17", 1516 }, +{ "+01:18", 1517 }, +{ "+01:19", 1518 }, +{ "+01:20", 1519 }, +{ "+01:21", 1520 }, +{ "+01:22", 1521 }, +{ "+01:23", 1522 }, +{ "+01:24", 1523 }, +{ "+01:25", 1524 }, +{ "+01:26", 1525 }, +{ "+01:27", 1526 }, +{ "+01:28", 1527 }, +{ "+01:29", 1528 }, +{ "+01:30", 1529 }, +{ "+01:31", 1530 }, +{ "+01:32", 1531 }, +{ "+01:33", 1532 }, +{ "+01:34", 1533 }, +{ "+01:35", 1534 }, +{ "+01:36", 1535 }, +{ "+01:37", 1536 }, +{ "+01:38", 1537 }, +{ "+01:39", 1538 }, +{ "+01:40", 1539 }, +{ "+01:41", 1540 }, +{ "+01:42", 1541 }, +{ "+01:43", 1542 }, +{ "+01:44", 1543 }, +{ "+01:45", 1544 }, +{ "+01:46", 1545 }, +{ "+01:47", 1546 }, +{ "+01:48", 1547 }, +{ "+01:49", 1548 }, +{ "+01:50", 1549 }, +{ "+01:51", 1550 }, +{ "+01:52", 1551 }, +{ "+01:53", 1552 }, +{ "+01:54", 1553 }, +{ "+01:55", 1554 }, +{ "+01:56", 1555 }, +{ "+01:57", 1556 }, +{ "+01:58", 1557 }, +{ "+01:59", 1558 }, +{ "+02:00", 1559 }, +{ "+02:01", 1560 }, +{ "+02:02", 1561 }, +{ "+02:03", 1562 }, +{ "+02:04", 1563 }, +{ "+02:05", 1564 }, +{ "+02:06", 1565 }, +{ "+02:07", 1566 }, +{ "+02:08", 1567 }, +{ "+02:09", 1568 }, +{ "+02:10", 1569 }, +{ "+02:11", 1570 }, +{ "+02:12", 1571 }, +{ "+02:13", 1572 }, +{ "+02:14", 1573 }, +{ "+02:15", 1574 }, +{ "+02:16", 1575 }, +{ "+02:17", 1576 }, +{ "+02:18", 1577 }, +{ "+02:19", 1578 }, +{ "+02:20", 1579 }, +{ "+02:21", 1580 }, +{ "+02:22", 1581 }, +{ "+02:23", 1582 }, +{ "+02:24", 1583 }, +{ "+02:25", 1584 }, +{ "+02:26", 1585 }, +{ "+02:27", 1586 }, +{ "+02:28", 1587 }, +{ "+02:29", 1588 }, +{ "+02:30", 1589 }, +{ "+02:31", 1590 }, +{ "+02:32", 1591 }, +{ "+02:33", 1592 }, +{ "+02:34", 1593 }, +{ "+02:35", 1594 }, +{ "+02:36", 1595 }, +{ "+02:37", 1596 }, +{ "+02:38", 1597 }, +{ "+02:39", 1598 }, +{ "+02:40", 1599 }, +{ "+02:41", 1600 }, +{ "+02:42", 1601 }, +{ "+02:43", 1602 }, +{ "+02:44", 1603 }, +{ "+02:45", 1604 }, +{ "+02:46", 1605 }, +{ "+02:47", 1606 }, +{ "+02:48", 1607 }, +{ "+02:49", 1608 }, +{ "+02:50", 1609 }, +{ "+02:51", 1610 }, +{ "+02:52", 1611 }, +{ "+02:53", 1612 }, +{ "+02:54", 1613 }, +{ "+02:55", 1614 }, +{ "+02:56", 1615 }, +{ "+02:57", 1616 }, +{ "+02:58", 1617 }, +{ "+02:59", 1618 }, +{ "+03:00", 1619 }, +{ "+03:01", 1620 }, +{ "+03:02", 1621 }, +{ "+03:03", 1622 }, +{ "+03:04", 1623 }, +{ "+03:05", 1624 }, +{ "+03:06", 1625 }, +{ "+03:07", 1626 }, +{ "+03:08", 1627 }, +{ "+03:09", 1628 }, +{ "+03:10", 1629 }, +{ "+03:11", 1630 }, +{ "+03:12", 1631 }, +{ "+03:13", 1632 }, +{ "+03:14", 1633 }, +{ "+03:15", 1634 }, +{ "+03:16", 1635 }, +{ "+03:17", 1636 }, +{ "+03:18", 1637 }, +{ "+03:19", 1638 }, +{ "+03:20", 1639 }, +{ "+03:21", 1640 }, +{ "+03:22", 1641 }, +{ "+03:23", 1642 }, +{ "+03:24", 1643 }, +{ "+03:25", 1644 }, +{ "+03:26", 1645 }, +{ "+03:27", 1646 }, +{ "+03:28", 1647 }, +{ "+03:29", 1648 }, +{ "+03:30", 1649 }, +{ "+03:31", 1650 }, +{ "+03:32", 1651 }, +{ "+03:33", 1652 }, +{ "+03:34", 1653 }, +{ "+03:35", 1654 }, +{ "+03:36", 1655 }, +{ "+03:37", 1656 }, +{ "+03:38", 1657 }, +{ "+03:39", 1658 }, +{ "+03:40", 1659 }, +{ "+03:41", 1660 }, +{ "+03:42", 1661 }, +{ "+03:43", 1662 }, +{ "+03:44", 1663 }, +{ "+03:45", 1664 }, +{ "+03:46", 1665 }, +{ "+03:47", 1666 }, +{ "+03:48", 1667 }, +{ "+03:49", 1668 }, +{ "+03:50", 1669 }, +{ "+03:51", 1670 }, +{ "+03:52", 1671 }, +{ "+03:53", 1672 }, +{ "+03:54", 1673 }, +{ "+03:55", 1674 }, +{ "+03:56", 1675 }, +{ "+03:57", 1676 }, +{ "+03:58", 1677 }, +{ "+03:59", 1678 }, +{ "+04:00", 1679 }, +{ "+04:01", 1680 }, +{ "+04:02", 1681 }, +{ "+04:03", 1682 }, +{ "+04:04", 1683 }, +{ "+04:05", 1684 }, +{ "+04:06", 1685 }, +{ "+04:07", 1686 }, +{ "+04:08", 1687 }, +{ "+04:09", 1688 }, +{ "+04:10", 1689 }, +{ "+04:11", 1690 }, +{ "+04:12", 1691 }, +{ "+04:13", 1692 }, +{ "+04:14", 1693 }, +{ "+04:15", 1694 }, +{ "+04:16", 1695 }, +{ "+04:17", 1696 }, +{ "+04:18", 1697 }, +{ "+04:19", 1698 }, +{ "+04:20", 1699 }, +{ "+04:21", 1700 }, +{ "+04:22", 1701 }, +{ "+04:23", 1702 }, +{ "+04:24", 1703 }, +{ "+04:25", 1704 }, +{ "+04:26", 1705 }, +{ "+04:27", 1706 }, +{ "+04:28", 1707 }, +{ "+04:29", 1708 }, +{ "+04:30", 1709 }, +{ "+04:31", 1710 }, +{ "+04:32", 1711 }, +{ "+04:33", 1712 }, +{ "+04:34", 1713 }, +{ "+04:35", 1714 }, +{ "+04:36", 1715 }, +{ "+04:37", 1716 }, +{ "+04:38", 1717 }, +{ "+04:39", 1718 }, +{ "+04:40", 1719 }, +{ "+04:41", 1720 }, +{ "+04:42", 1721 }, +{ "+04:43", 1722 }, +{ "+04:44", 1723 }, +{ "+04:45", 1724 }, +{ "+04:46", 1725 }, +{ "+04:47", 1726 }, +{ "+04:48", 1727 }, +{ "+04:49", 1728 }, +{ "+04:50", 1729 }, +{ "+04:51", 1730 }, +{ "+04:52", 1731 }, +{ "+04:53", 1732 }, +{ "+04:54", 1733 }, +{ "+04:55", 1734 }, +{ "+04:56", 1735 }, +{ "+04:57", 1736 }, +{ "+04:58", 1737 }, +{ "+04:59", 1738 }, +{ "+05:00", 1739 }, +{ "+05:01", 1740 }, +{ "+05:02", 1741 }, +{ "+05:03", 1742 }, +{ "+05:04", 1743 }, +{ "+05:05", 1744 }, +{ "+05:06", 1745 }, +{ "+05:07", 1746 }, +{ "+05:08", 1747 }, +{ "+05:09", 1748 }, +{ "+05:10", 1749 }, +{ "+05:11", 1750 }, +{ "+05:12", 1751 }, +{ "+05:13", 1752 }, +{ "+05:14", 1753 }, +{ "+05:15", 1754 }, +{ "+05:16", 1755 }, +{ "+05:17", 1756 }, +{ "+05:18", 1757 }, +{ "+05:19", 1758 }, +{ "+05:20", 1759 }, +{ "+05:21", 1760 }, +{ "+05:22", 1761 }, +{ "+05:23", 1762 }, +{ "+05:24", 1763 }, +{ "+05:25", 1764 }, +{ "+05:26", 1765 }, +{ "+05:27", 1766 }, +{ "+05:28", 1767 }, +{ "+05:29", 1768 }, +{ "+05:30", 1769 }, +{ "+05:31", 1770 }, +{ "+05:32", 1771 }, +{ "+05:33", 1772 }, +{ "+05:34", 1773 }, +{ "+05:35", 1774 }, +{ "+05:36", 1775 }, +{ "+05:37", 1776 }, +{ "+05:38", 1777 }, +{ "+05:39", 1778 }, +{ "+05:40", 1779 }, +{ "+05:41", 1780 }, +{ "+05:42", 1781 }, +{ "+05:43", 1782 }, +{ "+05:44", 1783 }, +{ "+05:45", 1784 }, +{ "+05:46", 1785 }, +{ "+05:47", 1786 }, +{ "+05:48", 1787 }, +{ "+05:49", 1788 }, +{ "+05:50", 1789 }, +{ "+05:51", 1790 }, +{ "+05:52", 1791 }, +{ "+05:53", 1792 }, +{ "+05:54", 1793 }, +{ "+05:55", 1794 }, +{ "+05:56", 1795 }, +{ "+05:57", 1796 }, +{ "+05:58", 1797 }, +{ "+05:59", 1798 }, +{ "+06:00", 1799 }, +{ "+06:01", 1800 }, +{ "+06:02", 1801 }, +{ "+06:03", 1802 }, +{ "+06:04", 1803 }, +{ "+06:05", 1804 }, +{ "+06:06", 1805 }, +{ "+06:07", 1806 }, +{ "+06:08", 1807 }, +{ "+06:09", 1808 }, +{ "+06:10", 1809 }, +{ "+06:11", 1810 }, +{ "+06:12", 1811 }, +{ "+06:13", 1812 }, +{ "+06:14", 1813 }, +{ "+06:15", 1814 }, +{ "+06:16", 1815 }, +{ "+06:17", 1816 }, +{ "+06:18", 1817 }, +{ "+06:19", 1818 }, +{ "+06:20", 1819 }, +{ "+06:21", 1820 }, +{ "+06:22", 1821 }, +{ "+06:23", 1822 }, +{ "+06:24", 1823 }, +{ "+06:25", 1824 }, +{ "+06:26", 1825 }, +{ "+06:27", 1826 }, +{ "+06:28", 1827 }, +{ "+06:29", 1828 }, +{ "+06:30", 1829 }, +{ "+06:31", 1830 }, +{ "+06:32", 1831 }, +{ "+06:33", 1832 }, +{ "+06:34", 1833 }, +{ "+06:35", 1834 }, +{ "+06:36", 1835 }, +{ "+06:37", 1836 }, +{ "+06:38", 1837 }, +{ "+06:39", 1838 }, +{ "+06:40", 1839 }, +{ "+06:41", 1840 }, +{ "+06:42", 1841 }, +{ "+06:43", 1842 }, +{ "+06:44", 1843 }, +{ "+06:45", 1844 }, +{ "+06:46", 1845 }, +{ "+06:47", 1846 }, +{ "+06:48", 1847 }, +{ "+06:49", 1848 }, +{ "+06:50", 1849 }, +{ "+06:51", 1850 }, +{ "+06:52", 1851 }, +{ "+06:53", 1852 }, +{ "+06:54", 1853 }, +{ "+06:55", 1854 }, +{ "+06:56", 1855 }, +{ "+06:57", 1856 }, +{ "+06:58", 1857 }, +{ "+06:59", 1858 }, +{ "+07:00", 1859 }, +{ "+07:01", 1860 }, +{ "+07:02", 1861 }, +{ "+07:03", 1862 }, +{ "+07:04", 1863 }, +{ "+07:05", 1864 }, +{ "+07:06", 1865 }, +{ "+07:07", 1866 }, +{ "+07:08", 1867 }, +{ "+07:09", 1868 }, +{ "+07:10", 1869 }, +{ "+07:11", 1870 }, +{ "+07:12", 1871 }, +{ "+07:13", 1872 }, +{ "+07:14", 1873 }, +{ "+07:15", 1874 }, +{ "+07:16", 1875 }, +{ "+07:17", 1876 }, +{ "+07:18", 1877 }, +{ "+07:19", 1878 }, +{ "+07:20", 1879 }, +{ "+07:21", 1880 }, +{ "+07:22", 1881 }, +{ "+07:23", 1882 }, +{ "+07:24", 1883 }, +{ "+07:25", 1884 }, +{ "+07:26", 1885 }, +{ "+07:27", 1886 }, +{ "+07:28", 1887 }, +{ "+07:29", 1888 }, +{ "+07:30", 1889 }, +{ "+07:31", 1890 }, +{ "+07:32", 1891 }, +{ "+07:33", 1892 }, +{ "+07:34", 1893 }, +{ "+07:35", 1894 }, +{ "+07:36", 1895 }, +{ "+07:37", 1896 }, +{ "+07:38", 1897 }, +{ "+07:39", 1898 }, +{ "+07:40", 1899 }, +{ "+07:41", 1900 }, +{ "+07:42", 1901 }, +{ "+07:43", 1902 }, +{ "+07:44", 1903 }, +{ "+07:45", 1904 }, +{ "+07:46", 1905 }, +{ "+07:47", 1906 }, +{ "+07:48", 1907 }, +{ "+07:49", 1908 }, +{ "+07:50", 1909 }, +{ "+07:51", 1910 }, +{ "+07:52", 1911 }, +{ "+07:53", 1912 }, +{ "+07:54", 1913 }, +{ "+07:55", 1914 }, +{ "+07:56", 1915 }, +{ "+07:57", 1916 }, +{ "+07:58", 1917 }, +{ "+07:59", 1918 }, +{ "+08:00", 1919 }, +{ "+08:01", 1920 }, +{ "+08:02", 1921 }, +{ "+08:03", 1922 }, +{ "+08:04", 1923 }, +{ "+08:05", 1924 }, +{ "+08:06", 1925 }, +{ "+08:07", 1926 }, +{ "+08:08", 1927 }, +{ "+08:09", 1928 }, +{ "+08:10", 1929 }, +{ "+08:11", 1930 }, +{ "+08:12", 1931 }, +{ "+08:13", 1932 }, +{ "+08:14", 1933 }, +{ "+08:15", 1934 }, +{ "+08:16", 1935 }, +{ "+08:17", 1936 }, +{ "+08:18", 1937 }, +{ "+08:19", 1938 }, +{ "+08:20", 1939 }, +{ "+08:21", 1940 }, +{ "+08:22", 1941 }, +{ "+08:23", 1942 }, +{ "+08:24", 1943 }, +{ "+08:25", 1944 }, +{ "+08:26", 1945 }, +{ "+08:27", 1946 }, +{ "+08:28", 1947 }, +{ "+08:29", 1948 }, +{ "+08:30", 1949 }, +{ "+08:31", 1950 }, +{ "+08:32", 1951 }, +{ "+08:33", 1952 }, +{ "+08:34", 1953 }, +{ "+08:35", 1954 }, +{ "+08:36", 1955 }, +{ "+08:37", 1956 }, +{ "+08:38", 1957 }, +{ "+08:39", 1958 }, +{ "+08:40", 1959 }, +{ "+08:41", 1960 }, +{ "+08:42", 1961 }, +{ "+08:43", 1962 }, +{ "+08:44", 1963 }, +{ "+08:45", 1964 }, +{ "+08:46", 1965 }, +{ "+08:47", 1966 }, +{ "+08:48", 1967 }, +{ "+08:49", 1968 }, +{ "+08:50", 1969 }, +{ "+08:51", 1970 }, +{ "+08:52", 1971 }, +{ "+08:53", 1972 }, +{ "+08:54", 1973 }, +{ "+08:55", 1974 }, +{ "+08:56", 1975 }, +{ "+08:57", 1976 }, +{ "+08:58", 1977 }, +{ "+08:59", 1978 }, +{ "+09:00", 1979 }, +{ "+09:01", 1980 }, +{ "+09:02", 1981 }, +{ "+09:03", 1982 }, +{ "+09:04", 1983 }, +{ "+09:05", 1984 }, +{ "+09:06", 1985 }, +{ "+09:07", 1986 }, +{ "+09:08", 1987 }, +{ "+09:09", 1988 }, +{ "+09:10", 1989 }, +{ "+09:11", 1990 }, +{ "+09:12", 1991 }, +{ "+09:13", 1992 }, +{ "+09:14", 1993 }, +{ "+09:15", 1994 }, +{ "+09:16", 1995 }, +{ "+09:17", 1996 }, +{ "+09:18", 1997 }, +{ "+09:19", 1998 }, +{ "+09:20", 1999 }, +{ "+09:21", 2000 }, +{ "+09:22", 2001 }, +{ "+09:23", 2002 }, +{ "+09:24", 2003 }, +{ "+09:25", 2004 }, +{ "+09:26", 2005 }, +{ "+09:27", 2006 }, +{ "+09:28", 2007 }, +{ "+09:29", 2008 }, +{ "+09:30", 2009 }, +{ "+09:31", 2010 }, +{ "+09:32", 2011 }, +{ "+09:33", 2012 }, +{ "+09:34", 2013 }, +{ "+09:35", 2014 }, +{ "+09:36", 2015 }, +{ "+09:37", 2016 }, +{ "+09:38", 2017 }, +{ "+09:39", 2018 }, +{ "+09:40", 2019 }, +{ "+09:41", 2020 }, +{ "+09:42", 2021 }, +{ "+09:43", 2022 }, +{ "+09:44", 2023 }, +{ "+09:45", 2024 }, +{ "+09:46", 2025 }, +{ "+09:47", 2026 }, +{ "+09:48", 2027 }, +{ "+09:49", 2028 }, +{ "+09:50", 2029 }, +{ "+09:51", 2030 }, +{ "+09:52", 2031 }, +{ "+09:53", 2032 }, +{ "+09:54", 2033 }, +{ "+09:55", 2034 }, +{ "+09:56", 2035 }, +{ "+09:57", 2036 }, +{ "+09:58", 2037 }, +{ "+09:59", 2038 }, +{ "+10:00", 2039 }, +{ "+10:01", 2040 }, +{ "+10:02", 2041 }, +{ "+10:03", 2042 }, +{ "+10:04", 2043 }, +{ "+10:05", 2044 }, +{ "+10:06", 2045 }, +{ "+10:07", 2046 }, +{ "+10:08", 2047 }, +{ "+10:09", 2048 }, +{ "+10:10", 2049 }, +{ "+10:11", 2050 }, +{ "+10:12", 2051 }, +{ "+10:13", 2052 }, +{ "+10:14", 2053 }, +{ "+10:15", 2054 }, +{ "+10:16", 2055 }, +{ "+10:17", 2056 }, +{ "+10:18", 2057 }, +{ "+10:19", 2058 }, +{ "+10:20", 2059 }, +{ "+10:21", 2060 }, +{ "+10:22", 2061 }, +{ "+10:23", 2062 }, +{ "+10:24", 2063 }, +{ "+10:25", 2064 }, +{ "+10:26", 2065 }, +{ "+10:27", 2066 }, +{ "+10:28", 2067 }, +{ "+10:29", 2068 }, +{ "+10:30", 2069 }, +{ "+10:31", 2070 }, +{ "+10:32", 2071 }, +{ "+10:33", 2072 }, +{ "+10:34", 2073 }, +{ "+10:35", 2074 }, +{ "+10:36", 2075 }, +{ "+10:37", 2076 }, +{ "+10:38", 2077 }, +{ "+10:39", 2078 }, +{ "+10:40", 2079 }, +{ "+10:41", 2080 }, +{ "+10:42", 2081 }, +{ "+10:43", 2082 }, +{ "+10:44", 2083 }, +{ "+10:45", 2084 }, +{ "+10:46", 2085 }, +{ "+10:47", 2086 }, +{ "+10:48", 2087 }, +{ "+10:49", 2088 }, +{ "+10:50", 2089 }, +{ "+10:51", 2090 }, +{ "+10:52", 2091 }, +{ "+10:53", 2092 }, +{ "+10:54", 2093 }, +{ "+10:55", 2094 }, +{ "+10:56", 2095 }, +{ "+10:57", 2096 }, +{ "+10:58", 2097 }, +{ "+10:59", 2098 }, +{ "+11:00", 2099 }, +{ "+11:01", 2100 }, +{ "+11:02", 2101 }, +{ "+11:03", 2102 }, +{ "+11:04", 2103 }, +{ "+11:05", 2104 }, +{ "+11:06", 2105 }, +{ "+11:07", 2106 }, +{ "+11:08", 2107 }, +{ "+11:09", 2108 }, +{ "+11:10", 2109 }, +{ "+11:11", 2110 }, +{ "+11:12", 2111 }, +{ "+11:13", 2112 }, +{ "+11:14", 2113 }, +{ "+11:15", 2114 }, +{ "+11:16", 2115 }, +{ "+11:17", 2116 }, +{ "+11:18", 2117 }, +{ "+11:19", 2118 }, +{ "+11:20", 2119 }, +{ "+11:21", 2120 }, +{ "+11:22", 2121 }, +{ "+11:23", 2122 }, +{ "+11:24", 2123 }, +{ "+11:25", 2124 }, +{ "+11:26", 2125 }, +{ "+11:27", 2126 }, +{ "+11:28", 2127 }, +{ "+11:29", 2128 }, +{ "+11:30", 2129 }, +{ "+11:31", 2130 }, +{ "+11:32", 2131 }, +{ "+11:33", 2132 }, +{ "+11:34", 2133 }, +{ "+11:35", 2134 }, +{ "+11:36", 2135 }, +{ "+11:37", 2136 }, +{ "+11:38", 2137 }, +{ "+11:39", 2138 }, +{ "+11:40", 2139 }, +{ "+11:41", 2140 }, +{ "+11:42", 2141 }, +{ "+11:43", 2142 }, +{ "+11:44", 2143 }, +{ "+11:45", 2144 }, +{ "+11:46", 2145 }, +{ "+11:47", 2146 }, +{ "+11:48", 2147 }, +{ "+11:49", 2148 }, +{ "+11:50", 2149 }, +{ "+11:51", 2150 }, +{ "+11:52", 2151 }, +{ "+11:53", 2152 }, +{ "+11:54", 2153 }, +{ "+11:55", 2154 }, +{ "+11:56", 2155 }, +{ "+11:57", 2156 }, +{ "+11:58", 2157 }, +{ "+11:59", 2158 }, +{ "+12:00", 2159 }, +{ "+12:01", 2160 }, +{ "+12:02", 2161 }, +{ "+12:03", 2162 }, +{ "+12:04", 2163 }, +{ "+12:05", 2164 }, +{ "+12:06", 2165 }, +{ "+12:07", 2166 }, +{ "+12:08", 2167 }, +{ "+12:09", 2168 }, +{ "+12:10", 2169 }, +{ "+12:11", 2170 }, +{ "+12:12", 2171 }, +{ "+12:13", 2172 }, +{ "+12:14", 2173 }, +{ "+12:15", 2174 }, +{ "+12:16", 2175 }, +{ "+12:17", 2176 }, +{ "+12:18", 2177 }, +{ "+12:19", 2178 }, +{ "+12:20", 2179 }, +{ "+12:21", 2180 }, +{ "+12:22", 2181 }, +{ "+12:23", 2182 }, +{ "+12:24", 2183 }, +{ "+12:25", 2184 }, +{ "+12:26", 2185 }, +{ "+12:27", 2186 }, +{ "+12:28", 2187 }, +{ "+12:29", 2188 }, +{ "+12:30", 2189 }, +{ "+12:31", 2190 }, +{ "+12:32", 2191 }, +{ "+12:33", 2192 }, +{ "+12:34", 2193 }, +{ "+12:35", 2194 }, +{ "+12:36", 2195 }, +{ "+12:37", 2196 }, +{ "+12:38", 2197 }, +{ "+12:39", 2198 }, +{ "+12:40", 2199 }, +{ "+12:41", 2200 }, +{ "+12:42", 2201 }, +{ "+12:43", 2202 }, +{ "+12:44", 2203 }, +{ "+12:45", 2204 }, +{ "+12:46", 2205 }, +{ "+12:47", 2206 }, +{ "+12:48", 2207 }, +{ "+12:49", 2208 }, +{ "+12:50", 2209 }, +{ "+12:51", 2210 }, +{ "+12:52", 2211 }, +{ "+12:53", 2212 }, +{ "+12:54", 2213 }, +{ "+12:55", 2214 }, +{ "+12:56", 2215 }, +{ "+12:57", 2216 }, +{ "+12:58", 2217 }, +{ "+12:59", 2218 }, +{ "+13:00", 2219 }, +{ "+13:01", 2220 }, +{ "+13:02", 2221 }, +{ "+13:03", 2222 }, +{ "+13:04", 2223 }, +{ "+13:05", 2224 }, +{ "+13:06", 2225 }, +{ "+13:07", 2226 }, +{ "+13:08", 2227 }, +{ "+13:09", 2228 }, +{ "+13:10", 2229 }, +{ "+13:11", 2230 }, +{ "+13:12", 2231 }, +{ "+13:13", 2232 }, +{ "+13:14", 2233 }, +{ "+13:15", 2234 }, +{ "+13:16", 2235 }, +{ "+13:17", 2236 }, +{ "+13:18", 2237 }, +{ "+13:19", 2238 }, +{ "+13:20", 2239 }, +{ "+13:21", 2240 }, +{ "+13:22", 2241 }, +{ "+13:23", 2242 }, +{ "+13:24", 2243 }, +{ "+13:25", 2244 }, +{ "+13:26", 2245 }, +{ "+13:27", 2246 }, +{ "+13:28", 2247 }, +{ "+13:29", 2248 }, +{ "+13:30", 2249 }, +{ "+13:31", 2250 }, +{ "+13:32", 2251 }, +{ "+13:33", 2252 }, +{ "+13:34", 2253 }, +{ "+13:35", 2254 }, +{ "+13:36", 2255 }, +{ "+13:37", 2256 }, +{ "+13:38", 2257 }, +{ "+13:39", 2258 }, +{ "+13:40", 2259 }, +{ "+13:41", 2260 }, +{ "+13:42", 2261 }, +{ "+13:43", 2262 }, +{ "+13:44", 2263 }, +{ "+13:45", 2264 }, +{ "+13:46", 2265 }, +{ "+13:47", 2266 }, +{ "+13:48", 2267 }, +{ "+13:49", 2268 }, +{ "+13:50", 2269 }, +{ "+13:51", 2270 }, +{ "+13:52", 2271 }, +{ "+13:53", 2272 }, +{ "+13:54", 2273 }, +{ "+13:55", 2274 }, +{ "+13:56", 2275 }, +{ "+13:57", 2276 }, +{ "+13:58", 2277 }, +{ "+13:59", 2278 }, +{ "+14:00", 2279 }, }; public static readonly string DefaultTimeZoneName = "GMT"; - public static bool TryGetByName(string name, out ushort id) => _nameToId.TryGetValue(name, out id); + const int OffsetBase = 24 * 60 - 1; + + public static bool TryGetByName(string name, out ushort id) => NameToId.TryGetValue(name, out id); + + public static bool TryGetById(ushort id, out string name) => IdToName.TryGetValue(id, out name); + + public static string Normalize(string name) + { + if (string.IsNullOrWhiteSpace(name)) + return name; + if (NameToId.TryGetValue(name, out var id)) + return IdToName[id]; + if (TryParseOffset(name, out var offset)) + return IdToName[(ushort)(OffsetBase + offset)]; + return name; + } + + [GeneratedRegex(@"^\s*(?[+-])\s*(?[0-9]+)\s*(?::\s*(?[0-9]+)\s*)?\z", RegexOptions.CultureInvariant)] + private static partial Regex OffsetRegex(); - public static bool TryGetById(ushort id, out string name) => _idToName.TryGetValue(id, out name); + static bool TryParseOffset(string name, out int offset) + { + offset = 0; + var m = OffsetRegex().Match(name); + if (!m.Success) + return false; + if (!int.TryParse(m.Groups["hours"].ValueSpan, NumberStyles.None, CultureInfo.InvariantCulture, out var hours)) + return false; + var minutes = 0; + if (m.Groups["minutes"].Success && !int.TryParse(m.Groups["minutes"].ValueSpan, NumberStyles.None, CultureInfo.InvariantCulture, out minutes)) + return false; + if (minutes > 59 || hours > 14 || (hours == 14 && minutes != 0)) + return false; + offset = m.Groups["sign"].ValueSpan[0] == '-' ? -(hours * 60 + minutes) : hours * 60 + minutes; + return true; + } } diff --git a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs index 6b5abb9dc..ae194c202 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedDateTime.cs @@ -17,6 +17,7 @@ using System; using System.Runtime.InteropServices; +using FirebirdSql.Data.Common; namespace FirebirdSql.Data.Types; @@ -42,7 +43,7 @@ internal FbZonedDateTime(DateTime dateTime, string timeZone, TimeSpan? offset) } public FbZonedDateTime(DateTime dateTime, string timeZone) - : this(dateTime, timeZone, null) + : this(dateTime, TimeZoneMapping.Normalize(timeZone), null) { } public override string ToString() diff --git a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs index 49992d1f2..2c73b564e 100644 --- a/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs +++ b/src/FirebirdSql.Data.FirebirdClient/Types/FbZonedTime.cs @@ -17,6 +17,7 @@ using System; using System.Runtime.InteropServices; +using FirebirdSql.Data.Common; namespace FirebirdSql.Data.Types; @@ -40,7 +41,7 @@ internal FbZonedTime(TimeSpan time, string timeZone, TimeSpan? offset) } public FbZonedTime(TimeSpan time, string timeZone) - : this(time, timeZone, null) + : this(time, TimeZoneMapping.Normalize(timeZone), null) { } public override string ToString() From b12039adacb1f33bfe241c421b06b93fd9d21293 Mon Sep 17 00:00:00 2001 From: Camel-RD Date: Fri, 9 Oct 2026 13:21:02 +0300 Subject: [PATCH 31/39] Added AppendStoredProcedureCall (#1185) --- .../EndToEndUsingSP/DeleteTestsUsingSP.cs | 153 +++++++ .../EndToEndUsingSP/InsertTestsUsingSP.cs | 373 ++++++++++++++++++ .../EndToEndUsingSP/UpdateTestsUsingSP.cs | 363 +++++++++++++++++ .../Update/Internal/FbUpdateSqlGenerator.cs | 100 +++++ 4 files changed, 989 insertions(+) create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/DeleteTestsUsingSP.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/InsertTestsUsingSP.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/UpdateTestsUsingSP.cs diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/DeleteTestsUsingSP.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/DeleteTestsUsingSP.cs new file mode 100644 index 000000000..27f98b07a --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/DeleteTestsUsingSP.cs @@ -0,0 +1,153 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Jiri Cincura (jiri@cincura.net) + +using System; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using NUnit.Framework; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.Tests.EndToEnd; + +public class DeleteTestsUsingSP : EntityFrameworkCoreTestsBase +{ + class DeleteContext : FbTestDbContext + { + public DeleteContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID"); + insertEntityConf.Property(x => x.Name).HasColumnName("NAME"); + insertEntityConf.ToTable("TEST_DELETE_USP"); + modelBuilder.Entity().DeleteUsingStoredProcedure("SP_TEST_DELETE", + storedProcedureBuilder => + { + storedProcedureBuilder.HasOriginalValueParameter(x => x.Id); + storedProcedureBuilder.HasRowsAffectedResultColumn(); + }); + } + } + class DeleteEntity + { + public int Id { get; set; } + public string Name { get; set; } + } + [Test] + public async Task Delete() + { + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_delete_usp (id int primary key, name varchar(20))"); + await db.Database.ExecuteSqlRawAsync("insert into test_delete_usp values (65, 'test')"); + await db.Database.ExecuteSqlRawAsync("insert into test_delete_usp values (66, 'test')"); + await db.Database.ExecuteSqlRawAsync("insert into test_delete_usp values (67, 'test')"); + var sp = """ + create procedure sp_test_delete ( + pid integer) + returns (rowcount integer) + as + begin + delete from test_delete_usp + where id = :pid; + rowcount = row_count; + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new DeleteEntity() { Id = 66 }; + var entry = db.Attach(entity); + entry.State = EntityState.Deleted; + await db.SaveChangesAsync(); + var values = await db.Set() + .FromSqlRaw("select * from test_delete_usp") + .AsNoTracking() + .OrderBy(x => x.Id) + .ToListAsync(); + Assert.AreEqual(2, values.Count()); + Assert.AreEqual(65, values[0].Id); + Assert.AreEqual(67, values[1].Id); + } + } + + class ConcurrencyDeleteContext : FbTestDbContext + { + public ConcurrencyDeleteContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID"); + insertEntityConf.Property(x => x.Name).HasColumnName("NAME"); + insertEntityConf.Property(x => x.Stamp).HasColumnName("STAMP") + .IsRowVersion(); + insertEntityConf.ToTable("TEST_DELETE_CONCURRENCY_USP"); + modelBuilder.Entity().DeleteUsingStoredProcedure("SP_TEST_DELETE_CONCURRENCY", + storedProcedureBuilder => + { + storedProcedureBuilder.HasOriginalValueParameter(x => x.Id); + storedProcedureBuilder.HasOriginalValueParameter(x => x.Stamp); + storedProcedureBuilder.HasRowsAffectedResultColumn(); + }); + } + } + class ConcurrencyDeleteEntity + { + public int Id { get; set; } + public string Name { get; set; } + public DateTime Stamp { get; set; } + } + [Test] + public async Task ConcurrencyDelete() + { + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_delete_concurrency_usp (id int primary key, name varchar(20), stamp timestamp)"); + await db.Database.ExecuteSqlRawAsync("insert into test_delete_concurrency_usp values (65, 'test', current_timestamp)"); + await db.Database.ExecuteSqlRawAsync("insert into test_delete_concurrency_usp values (66, 'test', current_timestamp)"); + await db.Database.ExecuteSqlRawAsync("insert into test_delete_concurrency_usp values (67, 'test', current_timestamp)"); + var sp = """ + create procedure sp_test_delete_concurrency ( + pid integer, + pstamp timestamp) + returns (rowcount integer) + as + begin + delete from test_delete_concurrency_usp + where id = :pid and stamp = :pstamp; + rowcount = row_count; + if (rowcount > 0) then + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new ConcurrencyDeleteEntity() { Id = 66, Stamp = new DateTime(1970, 1, 1) }; + var entry = db.Attach(entity); + entry.State = EntityState.Deleted; + Assert.ThrowsAsync(() => db.SaveChangesAsync()); + } + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/InsertTestsUsingSP.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/InsertTestsUsingSP.cs new file mode 100644 index 000000000..7817d659a --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/InsertTestsUsingSP.cs @@ -0,0 +1,373 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Jiri Cincura (jiri@cincura.net) + +using System; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using NUnit.Framework; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.Tests.EndToEnd; + +public class InsertTestsUsingSP : EntityFrameworkCoreTestsBase +{ + class InsertContext : FbTestDbContext + { + public InsertContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID"); + insertEntityConf.Property(x => x.Name).HasColumnName("NAME"); + insertEntityConf.ToTable("TEST_INSERT_USP"); + modelBuilder.Entity().InsertUsingStoredProcedure("SP_TEST_INSERT", + storedProcedureBuilder => + { + storedProcedureBuilder.HasParameter(x => x.Id); + storedProcedureBuilder.HasParameter(x => x.Name); + storedProcedureBuilder.HasResultColumn(x => x.Id); + }); + } + } + class InsertEntity + { + public int Id { get; set; } + public string Name { get; set; } + } + [Test] + public async Task Insert() + { + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_insert_usp (id int primary key, name varchar(20))"); + var sp = """ + create procedure sp_test_insert ( + pid integer, + pname varchar(20)) + returns (id integer) + as + begin + insert into test_insert_usp (id, name) + values (:pid, :pname) + returning id into :id; + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new InsertEntity() { Id = -6, Name = "foobar" }; + await db.AddAsync(entity); + await db.SaveChangesAsync(); + Assert.AreEqual(-6, entity.Id); + } + } + + class InsertContextWithoutReturns : FbTestDbContext + { + public InsertContextWithoutReturns(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID").ValueGeneratedNever(); + insertEntityConf.Property(x => x.Name).HasColumnName("NAME"); + insertEntityConf.ToTable("TEST_INSERT_NORETURNS_USP"); + modelBuilder.Entity().InsertUsingStoredProcedure("SP_TEST_INSERT_NORETURNS", + storedProcedureBuilder => + { + storedProcedureBuilder.HasParameter(x => x.Id); + storedProcedureBuilder.HasParameter(x => x.Name); + }); + } + } + + [Test] + public async Task InsertWithoutReturns() + { + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_insert_noreturns_usp (id int primary key, name varchar(20))"); + var sp = """ + create procedure sp_test_insert_noreturns ( + pid integer, + pname varchar(20)) + as + begin + insert into test_insert_noreturns_usp (id, name) + values (:pid, :pname); + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new InsertEntity() { Id = -6, Name = "foobar" }; + await db.AddAsync(entity); + await db.SaveChangesAsync(); + Assert.AreEqual(-6, entity.Id); + } + } + + class IdentityInsertContext : FbTestDbContext + { + public IdentityInsertContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID") + .UseIdentityColumn(); + insertEntityConf.Property(x => x.Name).HasColumnName("NAME"); + insertEntityConf.ToTable("TEST_INSERT_IDENTITY_USP"); + modelBuilder.Entity().InsertUsingStoredProcedure("SP_TEST_INSERT_IDENTITY", + storedProcedureBuilder => + { + storedProcedureBuilder.HasParameter(x => x.Name); + storedProcedureBuilder.HasResultColumn(x => x.Id); + }); + } + } + class IdentityInsertEntity + { + public int Id { get; set; } + public string Name { get; set; } + } + [Test] + public async Task IdentityInsert() + { + if (!EnsureServerVersionAtLeast(new Version(3, 0, 0, 0))) + return; + + var id = ServerVersion >= new Version(4, 0, 0, 0) ? 26 : 27; + + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_insert_identity_usp (id int generated by default as identity (start with 26) primary key, name varchar(20))"); + var sp = """ + create procedure sp_test_insert_identity ( + pname varchar(20)) + returns (id integer) + as + begin + insert into test_insert_identity_usp (name) + values (:pname) + returning id into :id; + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new IdentityInsertEntity() { Name = "foobar" }; + await db.AddAsync(entity); + await db.SaveChangesAsync(); + Assert.AreEqual(id, entity.Id); + } + } + + class SequenceInsertContext : FbTestDbContext + { + public SequenceInsertContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID") + .UseSequenceTrigger(); + insertEntityConf.Property(x => x.Name).HasColumnName("NAME"); + insertEntityConf.ToTable("TEST_INSERT_SEQUENCE_USP"); + modelBuilder.Entity().InsertUsingStoredProcedure("SP_TEST_INSERT_SEQUENCE", + storedProcedureBuilder => + { + storedProcedureBuilder.HasParameter(x => x.Name); + storedProcedureBuilder.HasResultColumn(x => x.Id); + }); + } + } + class SequenceInsertEntity + { + public int Id { get; set; } + public string Name { get; set; } + } + [Test] + public async Task SequenceInsert() + { + var id = ServerVersion >= new Version(4, 0, 0, 0) ? 30 : 31; + + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_insert_sequence_usp (id int primary key, name varchar(20))"); + await db.Database.ExecuteSqlRawAsync("create sequence seq_test_insert_sequence_usp"); + await db.Database.ExecuteSqlRawAsync("alter sequence seq_test_insert_sequence_usp restart with 30"); + await db.Database.ExecuteSqlRawAsync("create trigger test_insert_sequence_id_usp before insert on test_insert_sequence_usp as begin if (new.id is null) then begin new.id = next value for seq_test_insert_sequence_usp; end end"); + var sp = """ + create procedure sp_test_insert_sequence ( + pname varchar(20)) + returns (id integer) + as + begin + insert into test_insert_sequence_usp (name) + values (:pname) + returning id into :id; + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new SequenceInsertEntity() { Name = "foobar" }; + await db.AddAsync(entity); + await db.SaveChangesAsync(); + Assert.AreEqual(id, entity.Id); + } + } + + class DefaultValuesInsertContext : FbTestDbContext + { + public DefaultValuesInsertContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID") + .ValueGeneratedOnAdd(); + insertEntityConf.Property(x => x.Name).HasColumnName("NAME") + .ValueGeneratedOnAdd(); + insertEntityConf.ToTable("TEST_INSERT_DEVAULTVALUES_USP"); + modelBuilder.Entity().InsertUsingStoredProcedure("SP_TEST_INSERT_DEFAULTVALUES", + storedProcedureBuilder => + { + storedProcedureBuilder.HasResultColumn(x => x.Id); + storedProcedureBuilder.HasResultColumn(x => x.Name); + }); + } + } + class DefaultValuesInsertEntity + { + public int Id { get; set; } + public string Name { get; set; } + } + [Test] + public async Task DefaultValuesInsert() + { + if (!EnsureServerVersionAtLeast(new Version(3, 0, 0, 0))) + return; + + var id = ServerVersion >= new Version(4, 0, 0, 0) ? 26 : 27; + + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_insert_devaultvalues_usp (id int generated by default as identity (start with 26) primary key, name generated always as (id || 'foobar'))"); + var sp = """ + create procedure sp_test_insert_defaultvalues + returns (id integer, name varchar(20)) + as + begin + insert into test_insert_devaultvalues_usp default values + returning id, name + into :id, :name; + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new DefaultValuesInsertEntity() { }; + await db.AddAsync(entity); + await db.SaveChangesAsync(); + Assert.AreEqual(id, entity.Id); + Assert.AreEqual($"{id}foobar", entity.Name); + } + } + + class TwoComputedInsertContext : FbTestDbContext + { + public TwoComputedInsertContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID") + .UseIdentityColumn(); + insertEntityConf.Property(x => x.Name).HasColumnName("NAME"); + insertEntityConf.Property(x => x.Computed1).HasColumnName("COMPUTED1") + .ValueGeneratedOnAddOrUpdate(); + insertEntityConf.Property(x => x.Computed2).HasColumnName("COMPUTED2") + .ValueGeneratedOnAddOrUpdate(); + insertEntityConf.ToTable("TEST_INSERT_2COMPUTED_USP"); + modelBuilder.Entity().InsertUsingStoredProcedure("SP_TEST_INSERT_2COMPUTED", + storedProcedureBuilder => + { + storedProcedureBuilder.HasParameter(x => x.Name); + storedProcedureBuilder.HasResultColumn(x => x.Id); + storedProcedureBuilder.HasResultColumn(x => x.Computed1); + storedProcedureBuilder.HasResultColumn(x => x.Computed2); + }); + } + } + class TwoComputedInsertEntity + { + public int Id { get; set; } + public string Name { get; set; } + public string Computed1 { get; set; } + public string Computed2 { get; set; } + } + [Test] + public async Task TwoComputedInsert() + { + if (!EnsureServerVersionAtLeast(new Version(3, 0, 0, 0))) + return; + + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_insert_2computed_usp (id int generated by default as identity (start with 26) primary key, name varchar(20), computed1 generated always as ('1' || name), computed2 generated always as ('2' || name))"); + var sp = """ + create procedure sp_test_insert_2computed ( + pname varchar(20)) + returns (id integer, computed1 varchar(25), computed2 varchar(25)) + as + begin + insert into test_insert_2computed_usp (name) + values (:pname) + returning id, computed1, computed2 + into :id, :computed1, :computed2; + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new TwoComputedInsertEntity() { Name = "foobar" }; + await db.AddAsync(entity); + await db.SaveChangesAsync(); + Assert.AreEqual("1foobar", entity.Computed1); + Assert.AreEqual("2foobar", entity.Computed2); + } + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/UpdateTestsUsingSP.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/UpdateTestsUsingSP.cs new file mode 100644 index 000000000..2abd853df --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/EndToEndUsingSP/UpdateTestsUsingSP.cs @@ -0,0 +1,363 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Jiri Cincura (jiri@cincura.net) + +using System; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using NUnit.Framework; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.Tests.EndToEnd; + +public class UpdateTestsUsingSP : EntityFrameworkCoreTestsBase +{ + class UpdateContext : FbTestDbContext + { + public UpdateContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID"); + insertEntityConf.Property(x => x.Foo).HasColumnName("FOO"); + insertEntityConf.Property(x => x.Bar).HasColumnName("BAR"); + insertEntityConf.ToTable("TEST_UPDATE_USP"); + modelBuilder.Entity().UpdateUsingStoredProcedure("SP_TEST_UPDATE", + storedProcedureBuilder => + { + storedProcedureBuilder.HasOriginalValueParameter(x => x.Id); + storedProcedureBuilder.HasParameter(x => x.Foo); + storedProcedureBuilder.HasParameter(x => x.Bar); + storedProcedureBuilder.HasRowsAffectedResultColumn(); + }); + } + } + class UpdateEntity + { + public int Id { get; set; } + public string Foo { get; set; } + public string Bar { get; set; } + } + [Test] + public async Task Update() + { + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_update_usp (id int primary key, foo varchar(20), bar varchar(20))"); + await db.Database.ExecuteSqlRawAsync("update or insert into test_update_usp values (66, 'foo', 'bar')"); + var sp = """ + create procedure sp_test_update ( + pid integer, + pfoo varchar(20), + pbar varchar(20)) + returns (rowcount integer) + as + begin + update test_update_usp + set foo = :pfoo, bar = :pbar + where id = :pid; + rowcount = row_count; + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new UpdateEntity() { Id = 66, Foo = "test", Bar = "test" }; + var entry = db.Attach(entity); + entry.Property(x => x.Foo).IsModified = true; + await db.SaveChangesAsync(); + var value = await db.Set() + .FromSqlRaw("select * from test_update_usp where id = 66") + .AsNoTracking() + .FirstAsync(); + Assert.AreEqual("test", value.Foo); + Assert.AreEqual("test", value.Bar); + } + } + + class ComputedUpdateContext : FbTestDbContext + { + public ComputedUpdateContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID"); + insertEntityConf.Property(x => x.Foo).HasColumnName("FOO"); + insertEntityConf.Property(x => x.Bar).HasColumnName("BAR"); + insertEntityConf.Property(x => x.Computed).HasColumnName("COMPUTED") + .ValueGeneratedOnAddOrUpdate(); + insertEntityConf.ToTable("TEST_UPDATE_COMPUTED_USP"); + modelBuilder.Entity().UpdateUsingStoredProcedure("SP_TEST_UPDATE_COMPUTED", + storedProcedureBuilder => + { + storedProcedureBuilder.HasOriginalValueParameter(x => x.Id); + storedProcedureBuilder.HasParameter(x => x.Foo); + storedProcedureBuilder.HasParameter(x => x.Bar); + storedProcedureBuilder.HasResultColumn(x => x.Computed); + }); + } + } + class ComputedUpdateEntity + { + public int Id { get; set; } + public string Foo { get; set; } + public string Bar { get; set; } + public string Computed { get; set; } + } + [Test] + public async Task ComputedUpdate() + { + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_update_computed_usp (id int primary key, foo varchar(20), bar varchar(20), computed generated always as (foo || bar))"); + await db.Database.ExecuteSqlRawAsync("update or insert into test_update_computed_usp values (66, 'foo', 'bar')"); + var sp = """ + create procedure sp_test_update_computed ( + pid integer, + pfoo varchar(20), + pbar varchar(20)) + returns (computed varchar(50)) + as + begin + update test_update_computed_usp + set foo = :pfoo, bar = :pbar + where id = :pid + returning computed + into :computed; + if (row_count > 0) then + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new ComputedUpdateEntity() { Id = 66, Foo = "test", Bar = "bar" }; + var entry = db.Attach(entity); + entry.Property(x => x.Foo).IsModified = true; + await db.SaveChangesAsync(); + Assert.AreEqual("testbar", entity.Computed); + } + } + + class ConcurrencyUpdateContext : FbTestDbContext + { + public ConcurrencyUpdateContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID"); + insertEntityConf.Property(x => x.Foo).HasColumnName("FOO"); + insertEntityConf.Property(x => x.Stamp).HasColumnName("STAMP") + .IsRowVersion(); + insertEntityConf.ToTable("TEST_UPDATE_CONCURRENCY_USP"); + modelBuilder.Entity().UpdateUsingStoredProcedure("SP_TEST_UPDATE_CONCURRENCY", + storedProcedureBuilder => + { + storedProcedureBuilder.HasOriginalValueParameter(x => x.Id); + storedProcedureBuilder.HasParameter(x => x.Foo); + storedProcedureBuilder.HasOriginalValueParameter(x => x.Stamp); + storedProcedureBuilder.HasResultColumn(x => x.Stamp); + }); + } + } + class ConcurrencyUpdateEntity + { + public int Id { get; set; } + public string Foo { get; set; } + public DateTime Stamp { get; set; } + } + [Test] + public async Task ConcurrencyUpdate() + { + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_update_concurrency_usp (id int primary key, foo varchar(20), stamp timestamp)"); + await db.Database.ExecuteSqlRawAsync("update or insert into test_update_concurrency_usp values (66, 'foo', current_timestamp)"); + var sp = """ + create procedure sp_test_update_concurrency ( + pid integer, + pfoo varchar(20), + pstamp timestamp) + returns (stamp timestamp) + as + begin + update test_update_concurrency_usp + set foo = :pfoo, stamp = current_timestamp + where id = :pid and stamp = :pstamp + returning stamp + into :stamp; + if (row_count > 0) then + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new ConcurrencyUpdateEntity() { Id = 66, Foo = "test", Stamp = new DateTime(1970, 1, 1) }; + var entry = db.Attach(entity); + entry.Property(x => x.Foo).IsModified = true; + Assert.ThrowsAsync(() => db.SaveChangesAsync()); + } + } + + class ConcurrencyUpdateNoGeneratedContext : FbTestDbContext + { + public ConcurrencyUpdateNoGeneratedContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID"); + insertEntityConf.Property(x => x.Foo).HasColumnName("FOO"); + insertEntityConf.Property(x => x.Stamp).HasColumnName("STAMP") + .IsConcurrencyToken(); + insertEntityConf.ToTable("TEST_UPDATE_CONCURRENCY_NG_USP"); + modelBuilder.Entity().UpdateUsingStoredProcedure("SP_TEST_UPDATE_CONCURRENCY_NG", + storedProcedureBuilder => + { + storedProcedureBuilder.HasOriginalValueParameter(x => x.Id); + storedProcedureBuilder.HasParameter(x => x.Foo); + storedProcedureBuilder.HasOriginalValueParameter(x => x.Stamp); + storedProcedureBuilder.HasRowsAffectedResultColumn(); + }); + } + } + class ConcurrencyUpdateNoGeneratedEntity + { + public int Id { get; set; } + public string Foo { get; set; } + public DateTime Stamp { get; set; } + } + [Test] + public async Task ConcurrencyUpdateNoGenerated() + { + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_update_concurrency_ng_usp (id int primary key, foo varchar(20), stamp timestamp)"); + await db.Database.ExecuteSqlRawAsync("update or insert into test_update_concurrency_ng_usp values (66, 'foo', current_timestamp)"); + var sp = """ + create procedure sp_test_update_concurrency_ng ( + pid integer, + pfoo varchar(20), + pstamp timestamp) + returns (rowcount integer) + as + begin + update test_update_concurrency_ng_usp + set foo = :pfoo, stamp = current_timestamp + where id = :pid and stamp = :pstamp; + rowcount = row_count; + if (rowcount > 0) then + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new ConcurrencyUpdateNoGeneratedEntity() { Id = 66, Foo = "test", Stamp = new DateTime(1970, 1, 1) }; + var entry = db.Attach(entity); + entry.Property(x => x.Foo).IsModified = true; + entry.Property(x => x.Stamp).IsModified = true; + Assert.ThrowsAsync(() => db.SaveChangesAsync()); + } + } + + class TwoComputedUpdateContext : FbTestDbContext + { + public TwoComputedUpdateContext(string connectionString) + : base(connectionString) + { } + + protected override void OnTestModelCreating(ModelBuilder modelBuilder) + { + base.OnTestModelCreating(modelBuilder); + + var insertEntityConf = modelBuilder.Entity(); + insertEntityConf.Property(x => x.Id).HasColumnName("ID"); + insertEntityConf.Property(x => x.Foo).HasColumnName("FOO"); + insertEntityConf.Property(x => x.Bar).HasColumnName("BAR"); + insertEntityConf.Property(x => x.Computed1).HasColumnName("COMPUTED1") + .ValueGeneratedOnAddOrUpdate(); + insertEntityConf.Property(x => x.Computed2).HasColumnName("COMPUTED2") + .ValueGeneratedOnAddOrUpdate(); + insertEntityConf.ToTable("TEST_UPDATE_2COMPUTED_USP"); + modelBuilder.Entity().UpdateUsingStoredProcedure("SP_TEST_UPDATE_2COMPUTED", + storedProcedureBuilder => + { + storedProcedureBuilder.HasOriginalValueParameter(x => x.Id); + storedProcedureBuilder.HasParameter(x => x.Foo); + storedProcedureBuilder.HasParameter(x => x.Bar); + storedProcedureBuilder.HasResultColumn(x => x.Computed1); + storedProcedureBuilder.HasResultColumn(x => x.Computed2); + }); + } + } + class TwoComputedUpdateEntity + { + public int Id { get; set; } + public string Foo { get; set; } + public string Bar { get; set; } + public string Computed1 { get; set; } + public string Computed2 { get; set; } + } + [Test] + public async Task TwoComputedUpdate() + { + await using (var db = await GetDbContext()) + { + await db.Database.ExecuteSqlRawAsync("create table test_update_2computed_usp (id int primary key, foo varchar(20), bar varchar(20), computed1 generated always as (foo || bar), computed2 generated always as (bar || bar))"); + await db.Database.ExecuteSqlRawAsync("update or insert into test_update_2computed_usp values (66, 'foo', 'bar')"); + var sp = """ + create procedure sp_test_update_2computed ( + pid integer, + pfoo varchar(20), + pbar varchar(20)) + returns ( + computed1 varchar(50), + computed2 varchar(50)) + as + begin + update test_update_2computed_usp + set foo = :pfoo, bar = :pbar + where id = :pid + returning computed1, computed2 + into :computed1, :computed2; + if (row_count > 0) then + suspend; + end + """; + await db.Database.ExecuteSqlRawAsync(sp); + var entity = new TwoComputedUpdateEntity() { Id = 66, Foo = "test", Bar = "bar" }; + var entry = db.Attach(entity); + entry.Property(x => x.Foo).IsModified = true; + await db.SaveChangesAsync(); + Assert.AreEqual("testbar", entity.Computed1); + Assert.AreEqual("barbar", entity.Computed2); + } + } +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Update/Internal/FbUpdateSqlGenerator.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Update/Internal/FbUpdateSqlGenerator.cs index d3b36d050..edcc5046a 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Update/Internal/FbUpdateSqlGenerator.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Update/Internal/FbUpdateSqlGenerator.cs @@ -17,6 +17,7 @@ using System; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Text; using FirebirdSql.EntityFrameworkCore.Firebird.Storage.Internal; @@ -252,4 +253,103 @@ void AppendSqlLiteral(StringBuilder commandStringBuilder, object value, IPropert mapping ??= Dependencies.TypeMappingSource.GetMappingForValue(value); commandStringBuilder.Append(mapping.GenerateProviderValueSqlLiteral(value)); } + + public override ResultSetMapping AppendStoredProcedureCall( + StringBuilder commandStringBuilder, + IReadOnlyModificationCommand command, + int commandPosition, + out bool requiresTransaction) + { + var storedProcedure = command.StoreStoredProcedure; + var resultSetMapping = ResultSetMapping.NoResults; + + foreach (var resultColumn in storedProcedure.ResultColumns) + { + resultSetMapping = ResultSetMapping.LastInResultSet; + if (resultColumn == command.RowsAffectedColumn) + { + resultSetMapping |= ResultSetMapping.ResultSetWithRowsAffectedOnly; + } + else + { + resultSetMapping = ResultSetMapping.LastInResultSet; + break; + } + } + + if (resultSetMapping == ResultSetMapping.NoResults) + { + commandStringBuilder.Append("EXECUTE PROCEDURE "); + } + else + { + commandStringBuilder.Append("SELECT "); + + var first = true; + + foreach (var resultColumn in storedProcedure.ResultColumns) + { + if (first) + { + first = false; + } + else + { + commandStringBuilder.Append(", "); + } + + if (resultColumn == command.RowsAffectedColumn || resultColumn.Name == "RowsAffected") + { + SqlGenerationHelper.DelimitIdentifier(commandStringBuilder, "ROWCOUNT"); + } + else + { + SqlGenerationHelper.DelimitIdentifier(commandStringBuilder, resultColumn.Name); + } + } + commandStringBuilder.Append(" FROM "); + } + + SqlGenerationHelper.DelimitIdentifier(commandStringBuilder, storedProcedure.Name); + + if (storedProcedure.Parameters.Any()) + { + commandStringBuilder.Append("("); + + var first = true; + + for (var i = 0; i < command.ColumnModifications.Count; i++) + { + var columnModification = command.ColumnModifications[i]; + if (columnModification.Column is not IStoreStoredProcedureParameter parameter) + { + continue; + } + + if (parameter.Direction.HasFlag(ParameterDirection.Output)) + { + throw new InvalidOperationException("Output parameters are not supported in stored procedures"); + } + + if (first) + { + first = false; + } + else + { + commandStringBuilder.Append(", "); + } + SqlGenerationHelper.GenerateParameterNamePlaceholder( + commandStringBuilder, columnModification.UseOriginalValueParameter + ? columnModification.OriginalParameterName! + : columnModification.ParameterName!); + } + + commandStringBuilder.Append(")"); + } + + commandStringBuilder.AppendLine(SqlGenerationHelper.StatementTerminator); + requiresTransaction = true; + return resultSetMapping; + } } From f345249bdb5e745a336367bc837a6d974c92d6c9 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Tue, 3 Nov 2026 11:41:13 +0100 Subject: [PATCH 32/39] Add ServerLessThan6. --- .../TestUtilities/FbTestStore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs index c8bccb74d..9d1e30270 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs @@ -42,8 +42,8 @@ public FbTestStore(string name, bool shared) public Version ServerVersion { get; private set; } public bool ServerLessThan4() => ServerVersion < new Version(4, 0, 0, 0); - public bool ServerLessThan5() => ServerVersion < new Version(5, 0, 0, 0); + public bool ServerLessThan6() => ServerVersion < new Version(6, 0, 0, 0); protected override async Task InitializeAsync(Func createContext, Func seed, Func clean) { From eab1583055a3c42796086fa29286d7761cd8d252 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Tue, 3 Nov 2026 11:41:34 +0100 Subject: [PATCH 33/39] Fix assigning ServerVersion in OpenConnectionAsync. --- .../TestUtilities/FbTestStore.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs index 9d1e30270..6de592d5a 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/TestUtilities/FbTestStore.cs @@ -96,7 +96,8 @@ public override void OpenConnection() public override async Task OpenConnectionAsync() { await base.OpenConnectionAsync(); - if (FbServerProperties.ParseServerVersion(Connection.ServerVersion) >= new Version(4, 0, 0, 0)) + ServerVersion = FbServerProperties.ParseServerVersion(Connection.ServerVersion); + if (ServerVersion >= new Version(4, 0, 0, 0)) { await using (var cmd = Connection.CreateCommand()) { From 9f78da81fc80c1334d11860ffb55328ba7ce1926 Mon Sep 17 00:00:00 2001 From: Alexander Zabluda Date: Tue, 3 Nov 2026 13:26:22 +0100 Subject: [PATCH 34/39] Emit a table-valued function without LATERAL. Fix #1277 (#1279) --- .../Query/UdfDbFunctionFbTests.cs | 138 ++++++++---------- .../Query/Internal/FbQuerySqlGenerator.cs | 46 +++--- 2 files changed, 85 insertions(+), 99 deletions(-) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs index c524c8b30..bc4c0cc2b 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs @@ -33,96 +33,32 @@ public UdfDbFunctionFbTests(Fb fixture) : base(fixture) { } - [NotSupportedOnFirebirdFact] - public override void QF_CrossApply_Correlated_Select_Anonymous() - { - base.QF_CrossApply_Correlated_Select_Anonymous(); - } - - [NotSupportedOnFirebirdFact] - public override void QF_OuterApply_Correlated_Select_QF() - { - base.QF_OuterApply_Correlated_Select_QF(); - } - - [NotSupportedOnFirebirdFact] - public override void Udf_with_argument_being_comparison_of_nullable_columns() - { - base.Udf_with_argument_being_comparison_of_nullable_columns(); - } - [Fact] public override void QF_Select_Correlated_Subquery_In_Anonymous_MultipleCollections() { base.QF_Select_Correlated_Subquery_In_Anonymous_MultipleCollections(); } - [NotSupportedOnFirebirdFact] - public override void QF_CrossApply_Correlated_Select_Result() - { - base.QF_CrossApply_Correlated_Select_Result(); - } - - [NotSupportedOnFirebirdFact] + [Fact] public override void QF_Select_Correlated_Subquery_In_Anonymous() { + // that needs LATERAL which is Firebird 4+ + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return; base.QF_Select_Correlated_Subquery_In_Anonymous(); } - [NotSupportedOnFirebirdFact] + [Fact] public override void QF_Correlated_Func_Call_With_Navigation() { + // that needs LATERAL which is Firebird 4+ + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return; base.QF_Correlated_Func_Call_With_Navigation(); } - [NotSupportedOnFirebirdFact] - public override void QF_Select_Correlated_Direct_With_Function_Query_Parameter_Correlated_In_Anonymous() - { - base.QF_Select_Correlated_Direct_With_Function_Query_Parameter_Correlated_In_Anonymous(); - } - - [NotSupportedOnFirebirdFact] - public override void QF_OuterApply_Correlated_Select_Entity() - { - base.QF_OuterApply_Correlated_Select_Entity(); - } - - [NotSupportedOnFirebirdFact] - public override void QF_Correlated_Nested_Func_Call() - { - base.QF_Correlated_Nested_Func_Call(); - } - - [NotSupportedOnFirebirdFact] - public override void QF_OuterApply_Correlated_Select_Anonymous() - { - base.QF_OuterApply_Correlated_Select_Anonymous(); - } - - [NotSupportedOnFirebirdFact] - public override void QF_Select_Correlated_Subquery_In_Anonymous_Nested_With_QF() - { - base.QF_Select_Correlated_Subquery_In_Anonymous_Nested_With_QF(); - } - - [NotSupportedOnFirebirdFact] - public override void QF_Correlated_Select_In_Anonymous() - { - base.QF_Correlated_Select_In_Anonymous(); - } - - [NotSupportedOnFirebirdFact] - public override void QF_CrossApply_Correlated_Select_QF_Type() - { - base.QF_CrossApply_Correlated_Select_QF_Type(); - } - - [NotSupportedOnFirebirdFact] - public override void Udf_with_argument_being_comparison_to_null_parameter() - { - base.Udf_with_argument_being_comparison_to_null_parameter(); - } - [DoesNotHaveTheDataFact] public override void QF_CrossJoin_Not_Correlated() { @@ -208,6 +144,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasName("GetCustWithMostOrdersAfterDate"); modelBuilder.HasDbFunction(typeof(UDFSqlContext).GetMethod(nameof(GetCustomerWithMostOrdersAfterDateInstance))) .HasName("GetCustWithMostOrdersAfterDate"); + modelBuilder.HasDbFunction(typeof(UDFSqlContext).GetMethod(nameof(GetCustomerOrderCountByYearOnlyFrom2000))) + .HasName("GetCustOrderCountByYearFrom2000"); modelBuilder.HasDbFunction(typeof(UDFSqlContext).GetMethod(nameof(IdentityString))) .HasSchema(null); @@ -349,6 +287,58 @@ having count(""ProductId"") > 1 end end"); + await context.Database.ExecuteSqlRawAsync( + @"create function ""AddValues"" (a int, b int) + returns int + as + begin + return :a + :b; + end"); + + await context.Database.ExecuteSqlRawAsync( + @"create procedure ""GetCustomerOrderCountByYear"" (customerId int) + returns + ( + ""CustomerId"" int not null, + ""Count"" int not null, + ""Year"" int not null + ) + as + begin + for select :customerId, count(""Id""), extract(year from ""OrderDate"") + from ""Orders"" + where ""CustomerId"" = :customerId + group by ""CustomerId"", extract(year from ""OrderDate"") + order by extract(year from ""OrderDate"") + into :""CustomerId"", :""Count"", :""Year"" do + begin + suspend; + end + end"); + + await context.Database.ExecuteSqlRawAsync( + @"create procedure ""GetCustOrderCountByYearFrom2000"" (customerId int, onlyFrom2000 boolean) + returns + ( + ""CustomerId"" int not null, + ""Count"" int not null, + ""Year"" int not null + ) + as + begin + for select :customerId, count(""Id""), extract(year from ""OrderDate"") + from ""Orders"" + where ""CustomerId"" = 1 + and (:onlyFrom2000 = false or :onlyFrom2000 is null + or (:onlyFrom2000 = true and extract(year from ""OrderDate"") = 2000)) + group by ""CustomerId"", extract(year from ""OrderDate"") + order by extract(year from ""OrderDate"") + into :""CustomerId"", :""Count"", :""Year"" do + begin + suspend; + end + end"); + await context.SaveChangesAsync(); } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs index 2e899cea6..bb2f29f17 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs @@ -285,24 +285,8 @@ protected override void GenerateOrderings(SelectExpression selectExpression) // Copyright (c) 2002-2021, Npgsql protected override Expression VisitCrossApply(CrossApplyExpression crossApplyExpression) { - Sql.Append("JOIN LATERAL "); - - if (crossApplyExpression.Table is TableExpression table) - { - // Firebird doesn't support LATERAL JOIN over table, and it doesn't really make sense to do it - but EF Core - // will sometimes generate that. - Sql - .Append("(SELECT * FROM ") - .Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(table.Name, table.Schema)) - .Append(")") - .Append(AliasSeparator) - .Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(table.Alias)); - } - else - { - Visit(crossApplyExpression.Table); - } - + Sql.Append("JOIN "); + GenerateApplySource(crossApplyExpression.Table); Sql.Append(" ON TRUE"); return crossApplyExpression; } @@ -312,14 +296,28 @@ protected override Expression VisitCrossApply(CrossApplyExpression crossApplyExp // Copyright (c) 2002-2021, Npgsql protected override Expression VisitOuterApply(OuterApplyExpression outerApplyExpression) { - Sql.Append("LEFT JOIN LATERAL "); + Sql.Append("LEFT JOIN "); + GenerateApplySource(outerApplyExpression.Table); + Sql.Append(" ON TRUE"); + return outerApplyExpression; + } - if (outerApplyExpression.Table is TableExpression table) + // LATERAL is only allowed in front of a derived table, so anything that is not one has to + // become one - except a selectable procedure, which is implicitly lateral already. + void GenerateApplySource(TableExpressionBase source) + { + if (source is TableValuedFunctionExpression function) + { + // A selectable procedure takes its arguments from streams earlier in the FROM clause + // without LATERAL, so the call is emitted as it is anywhere else. + Visit(function); + } + else if (source is TableExpression table) { // Firebird doesn't support LATERAL JOIN over table, and it doesn't really make sense to do it - but EF Core // will sometimes generate that. Sql - .Append("(SELECT * FROM ") + .Append("LATERAL (SELECT * FROM ") .Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(table.Name, table.Schema)) .Append(")") .Append(AliasSeparator) @@ -327,11 +325,9 @@ protected override Expression VisitOuterApply(OuterApplyExpression outerApplyExp } else { - Visit(outerApplyExpression.Table); + Sql.Append("LATERAL "); + Visit(source); } - - Sql.Append(" ON TRUE"); - return outerApplyExpression; } protected override void GeneratePseudoFromClause() From fef2e3a656a238f34a98dbed5dfe0f2a116de7e7 Mon Sep 17 00:00:00 2001 From: Alaric Dailey Date: Tue, 3 Nov 2026 08:20:02 -0600 Subject: [PATCH 35/39] Make RemoveAt follow the IList contract (#1291) --- .../FbParameterCollectionTests.cs | 23 +++++++++++++++++++ .../FirebirdClient/FbParameterCollection.cs | 13 ++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/FbParameterCollectionTests.cs b/src/FirebirdSql.Data.FirebirdClient.Tests/FbParameterCollectionTests.cs index 9fa3617e7..9efd0ad1b 100644 --- a/src/FirebirdSql.Data.FirebirdClient.Tests/FbParameterCollectionTests.cs +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/FbParameterCollectionTests.cs @@ -26,6 +26,29 @@ namespace FirebirdSql.Data.FirebirdClient.Tests; [NoServerCategory] public class FbParameterCollectionTests { + [TestCase(-1)] + [TestCase(0)] + [TestCase(1)] + public void RemoveAtInvalidIndexThrowsArgumentOutOfRangeTest(int index) + { + var command = new FbCommand(); + if (index == 1) + { + command.Parameters.Add("@p1", 1); + } + + var ex = Assert.Throws(() => command.Parameters.RemoveAt(index)); + Assert.AreEqual("index", ex.ParamName); + Assert.AreEqual(index == 1 ? 1 : 0, command.Parameters.Count); + } + + [Test] + public void RemoveAtUnknownNameThrowsIndexOutOfRangeTest() + { + var command = new FbCommand(); + Assert.Throws(() => command.Parameters.RemoveAt("@missing")); + } + [Test] public void AddTest() { diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbParameterCollection.cs b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbParameterCollection.cs index b159fa679..1499d95ca 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbParameterCollection.cs +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbParameterCollection.cs @@ -254,9 +254,10 @@ public override void Remove(object value) public override void RemoveAt(int index) { - if (index < 0 || index > Count) + // IList.RemoveAt: ArgumentOutOfRangeException when "index is not a valid index in the IList". + if (index < 0 || index >= Count) { - throw new IndexOutOfRangeException("The specified index does not exist."); + throw new ArgumentOutOfRangeException(nameof(index), index, "The specified index does not exist."); } var parameter = this[index]; @@ -266,7 +267,13 @@ public override void RemoveAt(int index) public override void RemoveAt(string parameterName) { - RemoveAt(IndexOf(parameterName)); + var index = IndexOf(parameterName); + if (index < 0) + { + throw new IndexOutOfRangeException("The specified index does not exist."); + } + + RemoveAt(index); } public void CopyTo(FbParameter[] array, int index) From 5cd48f6c9ac0edcfd306ba5d68620eb575c627ca Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Wed, 11 Nov 2026 08:54:42 +0100 Subject: [PATCH 36/39] Run CI on master only. --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34f49d975..6a0ea7c52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: env: CONFIGURATION: Release From 4385c0fdd6641877cf10bf9d3c81305428a743ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Cincura=20=E2=86=B9?= Date: Wed, 11 Nov 2026 10:31:45 +0100 Subject: [PATCH 37/39] Update ADO.NET provider to .NET 11. (#134) --- .github/workflows/ci.yml | 4 ++-- build.ps1 | 2 +- src/Directory.Build.props | 2 +- .../EntityFramework.Firebird.Tests.csproj | 4 ++-- .../FirebirdSql.Data.FirebirdClient.Tests.csproj | 2 +- .../FirebirdSql.Data.FirebirdClient.csproj | 10 +++------- src/Perf/Perf.csproj | 2 +- src/Scratchpad/Scratchpad.csproj | 2 +- tests.ps1 | 4 ++-- 9 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a0ea7c52..05564a738 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,10 @@ jobs: - name: Checkout uses: actions/checkout@v5 - - name: .NET 10.0 + - name: .NET 11.0 uses: actions/setup-dotnet@v5 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Build run: | diff --git a/build.ps1 b/build.ps1 index 308363e27..8c362eeda 100644 --- a/build.ps1 +++ b/build.ps1 @@ -28,7 +28,7 @@ function Versions() { function v($file) { return (Get-Item $file).VersionInfo.ProductVersion -replace '(\d+)\.(\d+)\.(\d+)(-[a-z0-9]+)?.*','$1.$2.$3$4' } - $script:versionProvider = v $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\net10.0\FirebirdSql.Data.FirebirdClient.dll + $script:versionProvider = v $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\net11.0\FirebirdSql.Data.FirebirdClient.dll $script:versionEFCore = v $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\net10.0\FirebirdSql.EntityFrameworkCore.Firebird.dll $script:versionEF6 = v $baseDir\src\EntityFramework.Firebird\bin\$Configuration\net48\EntityFramework.Firebird.dll } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 27f7e6a29..5bfad44f0 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -29,7 +29,7 @@ true - + all runtime; build; native; contentfiles; analyzers diff --git a/src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj b/src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj index 01672b56e..eb7e6918a 100644 --- a/src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj +++ b/src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj @@ -1,6 +1,6 @@  - net10.0 + net11.0 false false true @@ -16,7 +16,7 @@ - + diff --git a/src/FirebirdSql.Data.FirebirdClient.Tests/FirebirdSql.Data.FirebirdClient.Tests.csproj b/src/FirebirdSql.Data.FirebirdClient.Tests/FirebirdSql.Data.FirebirdClient.Tests.csproj index ff0b4ae13..53c35f12b 100644 --- a/src/FirebirdSql.Data.FirebirdClient.Tests/FirebirdSql.Data.FirebirdClient.Tests.csproj +++ b/src/FirebirdSql.Data.FirebirdClient.Tests/FirebirdSql.Data.FirebirdClient.Tests.csproj @@ -1,6 +1,6 @@  - net10.0 + net11.0 false false true diff --git a/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj b/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj index a040e0613..d7eb44143 100644 --- a/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj +++ b/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj @@ -1,6 +1,6 @@  - net8.0;net9.0;net10.0 + net10.0;net11.0 FirebirdSql.Data.FirebirdClient FirebirdSql.Data true @@ -38,15 +38,11 @@ - - - - - - + + all diff --git a/src/Perf/Perf.csproj b/src/Perf/Perf.csproj index eca7e7c51..3ddc5b7d4 100644 --- a/src/Perf/Perf.csproj +++ b/src/Perf/Perf.csproj @@ -1,7 +1,7 @@  Exe - net10.0 + net11.0 true diff --git a/src/Scratchpad/Scratchpad.csproj b/src/Scratchpad/Scratchpad.csproj index 991197ec7..3e99e5073 100644 --- a/src/Scratchpad/Scratchpad.csproj +++ b/src/Scratchpad/Scratchpad.csproj @@ -1,7 +1,7 @@  Exe - net10.0 + net11.0 true true ..\FirebirdSql.Data.TestsBase\FirebirdSql.Data.TestsBase.snk diff --git a/tests.ps1 b/tests.ps1 index 6af9ac102..b3e840596 100644 --- a/tests.ps1 +++ b/tests.ps1 @@ -28,7 +28,7 @@ $FirebirdConfiguration = @{ } } -$frameworkVersion = 'net10.0' +$frameworkVersion = 'net11.0' $testsBaseDir = "$baseDir\src\FirebirdSql.Data.FirebirdClient.Tests" $testsProviderDir = "$testsBaseDir\bin\$Configuration\$frameworkVersion" @@ -142,7 +142,7 @@ function Tests-EF6() { } function Tests-EFCore() { - pushd "$baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird.Tests\bin\$Configuration\$frameworkVersion" + pushd "$baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird.Tests\bin\$Configuration\net10.0" try { .\FirebirdSql.EntityFrameworkCore.Firebird.Tests.exe --labels=All Check-ExitCode From 991c70dff22fcccc0aef3ab37f266f930bc757cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Cincura=20=E2=86=B9?= Date: Thu, 12 Nov 2026 14:12:24 +0100 Subject: [PATCH 38/39] EF Core 11 (#135) --- build.ps1 | 2 +- .../ComplianceFbTest.cs | 31 +- ...meworkCore.Firebird.FunctionalTests.csproj | 7 +- .../SkipReasons.cs} | 18 +- .../Helpers/SkippingAttributes.cs | 110 ------- .../Helpers/Xunit.cs | 5 +- .../MigrationsFbTest.cs | 4 + .../Query/AdHocAdvancedMappingsQueryFbTest.cs | 2 +- .../Query/AdHocComplexTypeQueryFbTest.cs | 37 --- .../Query/AdHocMiscellaneousQueryFbTest.cs | 67 ++++- .../Query/AdHocNavigationsQueryFbTest.cs | 10 +- .../Query/AdHocQueryFiltersQueryFbTest.cs | 2 +- .../Query/AdHocQuerySplittingQueryFbTest.cs | 18 +- .../ComplexTableSplittingBulkUpdateFbTest.cs | 4 +- ...omplexTableSplittingMiscellaneousFbTest.cs | 10 +- .../ComplexTableSplittingProjectionFbTest.cs | 16 +- ...xTableSplittingStructuralEqualityFbTest.cs | 2 +- .../NavigationsCollectionFbTest.cs | 1 - .../Navigations/NavigationsIncludeFbTest.cs | 2 +- .../NavigationsMiscellaneousFbTest.cs | 2 +- .../NavigationsPrimitiveCollectionFbTest.cs | 14 +- .../NavigationsProjectionFbTest.cs | 11 +- .../NavigationsSetOperationsFbTest.cs | 2 +- .../NavigationsStructuralEqualityFbTest.cs | 2 +- .../OwnedNavigationsCollectionFbTest.cs | 1 - .../OwnedNavigationsMiscellaneousFbTest.cs | 2 +- .../OwnedNavigationsProjectionFbTest.cs | 11 +- .../OwnedNavigationsSetOperationsFbTest.cs | 3 +- ...wnedNavigationsStructuralEqualityFbTest.cs | 2 +- .../OwnedTableSplittingMiscellaneousFbTest.cs | 2 +- .../OwnedTableSplittingProjectionFbTest.cs | 11 +- ...dTableSplittingStructuralEqualityFbTest.cs | 2 +- ...omplexNavigationsCollectionsQueryFbTest.cs | 48 +-- ...gationsCollectionsSharedTypeQueryFbTest.cs | 42 +-- ...xNavigationsCollectionsSplitQueryFbTest.cs | 48 +-- ...nsCollectionsSplitSharedTypeQueryFbTest.cs | 34 +-- .../Query/ComplexNavigationsQueryFbTest.cs | 218 +++++++------- ...ComplexNavigationsSharedTypeQueryFbTest.cs | 16 +- .../Query/ComplexTypeQueryFbTest.cs | 30 +- .../Query/Ef6GroupByFbTest.cs | 2 +- .../Query/EntitySplittingQueryFbTest.cs | 2 +- .../Query/FromSqlSprocQueryFbTest.cs | 48 +-- .../Query/GearsOfWarQueryFbTest.cs | 56 ++-- ...IncompleteMappingInheritanceQueryFbTest.cs | 12 +- .../InheritanceRelationshipsQueryFbTest.cs | 96 +++--- .../Query/ManyToManyNoTrackingQueryFbTest.cs | 6 +- .../Query/ManyToManyQueryFbTest.cs | 6 +- .../Query/MappingQueryFbTest.cs | 9 +- ...onSharedPrimitiveCollectionsQueryFbTest.cs | 240 --------------- .../NorthwindAggregateOperatorsQueryFbTest.cs | 18 +- .../Query/NorthwindCompiledQueryFbTest.cs | 5 +- .../NorthwindEFPropertyIncludeQueryFbTest.cs | 14 +- .../Query/NorthwindGroupByQueryFbTest.cs | 24 +- .../NorthwindIncludeNoTrackingQueryFbTest.cs | 14 +- .../Query/NorthwindIncludeQueryFbTest.cs | 14 +- .../Query/NorthwindJoinQueryFbTest.cs | 23 +- .../NorthwindKeylessEntitiesQueryFbTest.cs | 4 +- .../NorthwindMiscellaneousQueryFbTest.cs | 20 +- .../Query/NorthwindSelectQueryFbTest.cs | 57 ++-- .../NorthwindSetOperationsQueryFbTest.cs | 26 +- ...thwindSplitIncludeNoTrackingQueryFbTest.cs | 14 +- .../Query/NorthwindSplitIncludeQueryFbTest.cs | 14 +- .../NorthwindStringIncludeQueryFbTest.cs | 12 +- .../Query/OperatorsProceduralFbTest.cs | 2 +- .../Query/OperatorsQueryFbTest.cs | 4 +- .../Query/OptionalDependentQueryFbTest.cs | 20 +- .../Query/OwnedEntityQueryFbTest.cs | 45 ++- .../Query/OwnedQueryFbTest.cs | 178 +++++------ .../Query/PrimitiveCollectionsQueryFbTest.cs | 284 +++++++++++++----- .../Query/SharedTypeQueryFbTest.cs | 2 +- .../Query/SqlExecutorFbTest.cs | 6 +- .../Query/SqlQueryFbTest.cs | 22 +- .../Query/TPCFiltersInheritanceQueryFbTest.cs | 1 + .../Query/TPCGearsOfWarQueryFbFixture.cs | 1 + .../Query/TPCGearsOfWarQueryFbTest.cs | 64 ++-- .../Query/TPCInheritanceQueryFbFixtureBase.cs | 16 + .../Query/TPCInheritanceQueryFbTest.cs | 2 +- .../Query/TPCInheritanceQueryFbTestBase.cs | 12 +- .../Query/TPCInheritanceQueryHiLoFbFixture.cs | 2 + .../Query/TPCInheritanceQueryHiLoFbTest.cs | 2 +- .../TPCManyToManyNoTrackingQueryFbTest.cs | 7 +- .../Query/TPCManyToManyQueryFbFixture.cs | 1 + .../Query/TPCManyToManyQueryFbTest.cs | 7 +- .../Query/TPCRelationshipsQueryFbTest.cs | 1 + .../Query/TPHFiltersInheritanceQueryFbTest.cs | 1 + .../Query/TPHInheritanceQueryFbFixture.cs | 9 + .../Query/TPHInheritanceQueryFbTest.cs | 12 +- .../Query/TPTFiltersInheritanceQueryFbTest.cs | 1 + .../Query/TPTGearsOfWarQueryFbFixture.cs | 1 + .../Query/TPTGearsOfWarQueryFbTest.cs | 55 ++-- .../Query/TPTInheritanceQueryFbFixture.cs | 9 + .../Query/TPTInheritanceQueryFbTest.cs | 12 +- .../TPTManyToManyNoTrackingQueryFbTest.cs | 7 +- .../Query/TPTManyToManyQueryFbFixture.cs | 1 + .../Query/TPTManyToManyQueryFbTest.cs | 7 +- .../Query/TPTRelationshipsQueryFbTest.cs | 1 + .../Query/ToSqlQueryFbTest.cs | 6 +- .../ByteArrayTranslationsFbTest.cs | 12 +- .../Translations/EnumTranslationsFbTest.cs | 1 - .../Translations/GuidTranslationsFbTest.cs | 2 +- .../Translations/MathTranslationsFbTest.cs | 63 ++-- .../MiscellaneousTranslationsFbTest.cs | 53 +++- .../ArithmeticOperatorTranslationsFbTest.cs | 2 +- .../BitwiseOperatorTranslationsFbTest.cs | 6 +- .../ComparisonOperatorTranslationsFbTest.cs | 2 +- .../LogicalOperatorTranslationsFbTest.cs | 2 +- ...MiscellaneousOperatorTranslationsFbTest.cs | 2 +- .../Translations/StringTranslationsFbTest.cs | 53 ++-- .../Temporal/DateOnlyTranslationsFbTest.cs | 15 +- .../DateTimeOffsetTranslationsFbTest.cs | 71 +++-- .../Temporal/DateTimeTranslationsFbTest.cs | 7 +- .../Temporal/TimeOnlyTranslationsFbTest.cs | 11 +- .../Temporal/TimeSpanTranslationsFbTest.cs | 5 +- .../Query/UdfDbFunctionFbTests.cs | 18 +- .../UpdatesFbTest.cs | 2 +- ....EntityFrameworkCore.Firebird.Tests.csproj | 2 +- .../Migrations/MigrationsTests.cs | 17 ++ ...irdSql.EntityFrameworkCore.Firebird.csproj | 2 +- .../Internal/FbModelValidator.cs | 3 +- .../Query/Internal/FbQuerySqlGenerator.cs | 17 ++ .../Storage/Internal/FbDecimalTypeMapping.cs | 42 +++ .../Storage/Internal/FbTypeMappingSource.cs | 2 +- .../Internal/FbValueGeneratorSelector.cs | 13 - src/Versions.props | 4 +- tests.ps1 | 7 +- 125 files changed, 1505 insertions(+), 1317 deletions(-) rename src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/{Query/AdHocManyToManyQueryFbTest.cs => Helpers/SkipReasons.cs} (50%) delete mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/SkippingAttributes.cs delete mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs delete mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs create mode 100644 src/FirebirdSql.EntityFrameworkCore.Firebird/Storage/Internal/FbDecimalTypeMapping.cs diff --git a/build.ps1 b/build.ps1 index 8c362eeda..107e31086 100644 --- a/build.ps1 +++ b/build.ps1 @@ -29,7 +29,7 @@ function Versions() { return (Get-Item $file).VersionInfo.ProductVersion -replace '(\d+)\.(\d+)\.(\d+)(-[a-z0-9]+)?.*','$1.$2.$3$4' } $script:versionProvider = v $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\net11.0\FirebirdSql.Data.FirebirdClient.dll - $script:versionEFCore = v $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\net10.0\FirebirdSql.EntityFrameworkCore.Firebird.dll + $script:versionEFCore = v $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\net11.0\FirebirdSql.EntityFrameworkCore.Firebird.dll $script:versionEF6 = v $baseDir\src\EntityFramework.Firebird\bin\$Configuration\net48\EntityFramework.Firebird.dll } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs index 314348d3d..5e0140dff 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/ComplianceFbTest.cs @@ -65,7 +65,6 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.PropertyValuesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.PropertyValuesTestBase<>), typeof(Microsoft.EntityFrameworkCore.QueryExpressionInterceptionTestBase), - typeof(Microsoft.EntityFrameworkCore.AdHocManyToManyQueryTestBase), typeof(Microsoft.EntityFrameworkCore.SaveChangesInterceptionTestBase), typeof(Microsoft.EntityFrameworkCore.SeedingTestBase), typeof(Microsoft.EntityFrameworkCore.SerializationTestBase<>), @@ -94,6 +93,11 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.TransactionInterceptionTestBase), typeof(Microsoft.EntityFrameworkCore.TransactionTestBase<>), typeof(Microsoft.EntityFrameworkCore.TwoDatabasesTestBase), + typeof(Microsoft.EntityFrameworkCore.RuntimeMigrationTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Inheritance.TPCInheritanceTableSplittingQueryRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Inheritance.TPHInheritanceTableSplittingQueryRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Inheritance.TPTInheritanceTableSplittingQueryRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Associations.Navigations.NavigationsBulkUpdateRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.ComplexCollectionTestBase), typeof(Microsoft.EntityFrameworkCore.ModelBuilding.ModelBuilderTest.ComplexTypeTestBase), @@ -116,19 +120,19 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.ModelBuilding.RelationalModelBuilderTest.RelationalOwnedTypesTestBase), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.BulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.FiltersInheritanceBulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.InheritanceBulkUpdatesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.BulkUpdates.Inheritance.FiltersInheritanceBulkUpdatesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.BulkUpdates.Inheritance.InheritanceBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NonSharedModelBulkUpdatesTestBase), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NorthwindBulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.FiltersInheritanceBulkUpdatesRelationalTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.InheritanceBulkUpdatesRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.BulkUpdates.Inheritance.FiltersInheritanceBulkUpdatesRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.BulkUpdates.Inheritance.InheritanceBulkUpdatesRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NonSharedModelBulkUpdatesRelationalTestBase), typeof(Microsoft.EntityFrameworkCore.BulkUpdates.NorthwindBulkUpdatesRelationalTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.TPCFiltersInheritanceBulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.TPCInheritanceBulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.TPHInheritanceBulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.TPTFiltersInheritanceBulkUpdatesTestBase<>), - typeof(Microsoft.EntityFrameworkCore.BulkUpdates.TPTInheritanceBulkUpdatesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.BulkUpdates.Inheritance.TPCFiltersInheritanceBulkUpdatesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.BulkUpdates.Inheritance.TPCInheritanceBulkUpdatesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.BulkUpdates.Inheritance.TPHInheritanceBulkUpdatesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.BulkUpdates.Inheritance.TPTFiltersInheritanceBulkUpdatesTestBase<>), + typeof(Microsoft.EntityFrameworkCore.BulkUpdates.Inheritance.TPTInheritanceBulkUpdatesTestBase<>), typeof(Microsoft.EntityFrameworkCore.Update.ComplexCollectionJsonUpdateTestBase<>), typeof(Microsoft.EntityFrameworkCore.Update.JsonUpdateTestBase<>), @@ -146,8 +150,6 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian // JSON not supported on FB typeof(Microsoft.EntityFrameworkCore.Query.JsonQueryTestBase<>), typeof(Microsoft.EntityFrameworkCore.Query.JsonQueryRelationalTestBase<>), - typeof(Microsoft.EntityFrameworkCore.Query.AdHocJsonQueryRelationalTestBase), - typeof(Microsoft.EntityFrameworkCore.Query.AdHocJsonQueryTestBase), typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonBulkUpdateRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonCollectionRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.Query.Associations.ComplexJson.ComplexJsonMiscellaneousRelationalTestBase<>), @@ -161,6 +163,11 @@ public class ComplianceFbTest : Microsoft.EntityFrameworkCore.RelationalComplian typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonPrimitiveCollectionRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonProjectionRelationalTestBase<>), typeof(Microsoft.EntityFrameworkCore.Query.Associations.OwnedJson.OwnedJsonStructuralEqualityRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Translations.JsonTranslationsRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Inheritance.TPCInheritanceJsonQueryRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Inheritance.TPHInheritanceJsonQueryRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Inheritance.TPTInheritanceJsonQueryRelationalTestBase<>), + typeof(Microsoft.EntityFrameworkCore.Query.Inheritance.InheritanceComplexTypesQueryTestBase<>), // Spatial not supported on FB typeof(Microsoft.EntityFrameworkCore.Query.SpatialQueryTestBase<>), diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj index 076c11266..92a7a1755 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj @@ -1,6 +1,6 @@  - net10.0 + net11.0 false false true @@ -9,11 +9,14 @@ true ..\FirebirdSql.Data.TestsBase\FirebirdSql.Data.TestsBase.snk true + Exe + $(NoWarn);xUnit1051 + false - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/SkipReasons.cs similarity index 50% rename from src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs rename to src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/SkipReasons.cs index 14c72269f..bf2ec2e23 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocManyToManyQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/SkipReasons.cs @@ -15,14 +15,16 @@ //$Authors = Jiri Cincura (jiri@cincura.net) -using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Query; -using Microsoft.EntityFrameworkCore.TestUtilities; +namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; -namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; - -public class AdHocManyToManyQueryFbTest(NonSharedFixture fixture) : AdHocManyToManyQueryRelationalTestBase(fixture) +// xUnit v3 reads [Fact]/[Theory] attributes including the inherited ones, hence overrides +// have to use the same attribute type (to replace the base one) with these reasons. +public static class SkipReasons { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + public const string HasDataInTheSameTransactionAsDDL = "HasData is called in the same transaction as DDL commands."; + public const string GeneratedNameTooLong = "Generated name in the query is too long."; + public const string NotSupportedOnFirebird = "Not supported on Firebird."; + public const string DoesNotHaveTheData = "Does not have the data."; + public const string LongExecution = "Long execution."; + public const string NotSupportedByProvider = "Not supported by provider."; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/SkippingAttributes.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/SkippingAttributes.cs deleted file mode 100644 index a1d32b14b..000000000 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/SkippingAttributes.cs +++ /dev/null @@ -1,110 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -using Xunit; - -namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; - -public class HasDataInTheSameTransactionAsDDLFactAttribute : FactAttribute -{ - public HasDataInTheSameTransactionAsDDLFactAttribute() - { - Skip = "HasData is called in the same transaction as DDL commands."; - } -} -public class HasDataInTheSameTransactionAsDDLTheoryAttribute : TheoryAttribute -{ - public HasDataInTheSameTransactionAsDDLTheoryAttribute() - { - Skip = "HasData is called in the same transaction as DDL commands."; - } -} - -public class GeneratedNameTooLongFactAttribute : FactAttribute -{ - public GeneratedNameTooLongFactAttribute() - { - Skip = "Generated name in the query is too long."; - } -} -public class GeneratedNameTooLongTheoryAttribute : TheoryAttribute -{ - public GeneratedNameTooLongTheoryAttribute() - { - Skip = "Generated name in the query is too long."; - } -} - -public class NotSupportedOnFirebirdFactAttribute : FactAttribute -{ - public NotSupportedOnFirebirdFactAttribute() - { - Skip = "Not supported on Firebird."; - } -} -public class NotSupportedOnFirebirdTheoryAttribute : TheoryAttribute -{ - public NotSupportedOnFirebirdTheoryAttribute() - { - Skip = "Not supported on Firebird."; - } -} - -public class DoesNotHaveTheDataFactAttribute : FactAttribute -{ - public DoesNotHaveTheDataFactAttribute() - { - Skip = "Does not have the data."; - } -} -public class DoesNotHaveTheDataTheoryAttribute : TheoryAttribute -{ - public DoesNotHaveTheDataTheoryAttribute() - { - Skip = "Does not have the data."; - } -} - -public class LongExecutionFactAttribute : FactAttribute -{ - public LongExecutionFactAttribute() - { - Skip = "Long execution."; - } -} -public class LongExecutionTheoryAttribute : TheoryAttribute -{ - public LongExecutionTheoryAttribute() - { - Skip = "Long execution."; - } -} - -public class NotSupportedByProviderFactAttribute : FactAttribute -{ - public NotSupportedByProviderFactAttribute() - { - Skip = "Not supported by provider."; - } -} -public class NotSupportedByProviderTheoryAttribute : TheoryAttribute -{ - public NotSupportedByProviderTheoryAttribute() - { - Skip = "Not supported by provider."; - } -} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/Xunit.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/Xunit.cs index 66091155d..d6949a898 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/Xunit.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Helpers/Xunit.cs @@ -15,6 +15,7 @@ //$Authors = Jiri Cincura (jiri@cincura.net) -using Xunit; +using Xunit.Sdk; +using Xunit.v3; -[assembly: CollectionBehavior(DisableTestParallelization = true)] +[assembly: Parallelization(Mode = ParallelMode.None)] diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs index d1d059939..975712349 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/MigrationsFbTest.cs @@ -16,6 +16,7 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using FirebirdSql.EntityFrameworkCore.Firebird.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Migrations; @@ -39,6 +40,9 @@ public MigrationsFbTest(MigrationsFbFixture fixture) [Fact(Skip = SkipReason)] public override Task Create_table() => base.Create_table(); + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Convert_owned_entity_with_no_schema_to_regular_entity() => base.Convert_owned_entity_with_no_schema_to_regular_entity(); + [Fact(Skip = SkipReason)] public override Task Create_table_all_settings() => base.Create_table_all_settings(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs index a0d735c56..4bdeace10 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocAdvancedMappingsQueryFbTest.cs @@ -24,5 +24,5 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class AdHocAdvancedMappingsQueryFbTest(NonSharedFixture fixture) : AdHocAdvancedMappingsQueryRelationalTestBase(fixture) { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs deleted file mode 100644 index fd4837ac8..000000000 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocComplexTypeQueryFbTest.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -using System.Threading.Tasks; -using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; -using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Query; -using Microsoft.EntityFrameworkCore.TestUtilities; - -namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; - -public class AdHocComplexTypeQueryFbTest(NonSharedFixture fixture) : AdHocComplexTypeQueryTestBase(fixture) -{ - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; - - // Uses a custom type mapping DateTime to "datetime" which doesn't exist in Firebird. - [NotSupportedByProviderFact] - public override Task Complex_type_equality_with_non_default_type_mapping() - { - return base.Complex_type_equality_with_non_default_type_mapping(); - } -} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs index 5ee227890..b18d19264 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocMiscellaneousQueryFbTest.cs @@ -30,7 +30,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class AdHocMiscellaneousQueryFbTest(NonSharedFixture fixture) : AdHocMiscellaneousQueryRelationalTestBase(fixture) { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; protected override DbContextOptionsBuilder SetParameterizedCollectionMode(DbContextOptionsBuilder optionsBuilder, ParameterTranslationMode parameterizedCollectionMode) @@ -39,7 +39,7 @@ protected override DbContextOptionsBuilder SetParameterizedCollectionMode(DbCont return optionsBuilder; } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task StoreType_for_UDF_used(bool async) { @@ -53,41 +53,41 @@ public override Task Multiple_different_entity_type_from_different_namespaces(bo return base.Multiple_different_entity_type_from_different_namespaces(async); } - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Comparing_byte_column_to_enum_in_vb_creating_double_cast(bool async) { return base.Comparing_byte_column_to_enum_in_vb_creating_double_cast(async); } - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Comparing_enum_casted_to_byte_with_int_constant(bool async) { return base.Comparing_enum_casted_to_byte_with_int_constant(async); } - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Comparing_enum_casted_to_byte_with_int_parameter(bool async) { return base.Comparing_enum_casted_to_byte_with_int_parameter(async); } - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Null_check_removal_in_ternary_maintain_appropriate_cast(bool async) { return base.Null_check_removal_in_ternary_maintain_appropriate_cast(async); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Operators_combine_nullability_of_entity_shapers() { return base.Operators_combine_nullability_of_entity_shapers(); } - [NotSupportedByProviderTheory] + [Theory(Skip = SkipReasons.NotSupportedByProvider)] [MemberData(nameof(InlinedRedactingData))] public override Task Check_inlined_constants_redacting(bool async, bool enableSensitiveDataLogging) { @@ -99,4 +99,55 @@ protected override async Task Seed2951(Context2951 context) await context.Database.ExecuteSqlRawAsync("""CREATE TABLE "ZeroKey" ("Id" INT)"""); await context.Database.ExecuteSqlRawAsync("""INSERT INTO "ZeroKey" VALUES (NULL)"""); } + + // Firebird supports LATERAL, hence the query is translated (base test expects it to throw). + public override async Task Correlated_SelectMany_DefaultIfEmpty_whole_object() + { + var contextFactory = await InitializeNonSharedTest(seed: Seed30915); + // LATERAL is Firebird 4+ + var fbTestStore = (FbTestStore)NonSharedTestStore; + if (fbTestStore.ServerLessThan4()) + return; + using var context = contextFactory.CreateDbContext(); + + var query = from s in context.Statuses + from countInfo in context.Requests + .Where(r => r.PickupStatusId == s.PickupStatusId) + .GroupBy(r => r.PickupStatusId, (k, els) => new { pickupStatusId = k, Count = els.Count() }) + .DefaultIfEmpty() + orderby s.PickupStatusId + select new { s.PickupStatusId, countInfo }; + + var result = await query.ToListAsync(); + + Assert.Equal(3, result.Count); + + Assert.Equal(1, result[0].PickupStatusId); + Assert.NotNull(result[0].countInfo); + Assert.Equal(1, result[0].countInfo.pickupStatusId); + Assert.Equal(2, result[0].countInfo.Count); + + Assert.Equal(2, result[1].PickupStatusId); + Assert.Null(result[1].countInfo); + + Assert.Equal(3, result[2].PickupStatusId); + Assert.NotNull(result[2].countInfo); + Assert.Equal(3, result[2].countInfo.pickupStatusId); + Assert.Equal(1, result[2].countInfo.Count); + } + + protected override async Task Seed30915(Context30915 context) + { + context.Statuses.AddRange( + new Context30915.PickupStatus30915 { PickupStatusId = 1, Name = "Active" }, + new Context30915.PickupStatus30915 { PickupStatusId = 2, Name = "NoRequests" }, + new Context30915.PickupStatus30915 { PickupStatusId = 3, Name = "Busy" }); + + context.Requests.AddRange( + new Context30915.PickupRequest30915 { PickupStatusId = 1, Priority = 5 }, + new Context30915.PickupRequest30915 { PickupStatusId = 1, Priority = null }, + new Context30915.PickupRequest30915 { PickupStatusId = 3, Priority = 7 }); + + await context.SaveChangesAsync(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs index baee85ccf..18a1fbfe7 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocNavigationsQueryFbTest.cs @@ -28,27 +28,27 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class AdHocNavigationsQueryFbTest(NonSharedFixture fixture) : AdHocNavigationsQueryRelationalTestBase(fixture) { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Let_multiple_references_with_reference_to_outer() { return base.Let_multiple_references_with_reference_to_outer(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Projection_with_multiple_includes_and_subquery_with_set_operation() { return base.Projection_with_multiple_includes_and_subquery_with_set_operation(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task SelectMany_and_collection_in_projection_in_FirstOrDefault() { return base.SelectMany_and_collection_in_projection_in_FirstOrDefault(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Correlated_collection_correctly_associates_entities_with_byte_array_keys() { return base.Correlated_collection_correctly_associates_entities_with_byte_array_keys(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs index c354e5a82..1d2c2f48a 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQueryFiltersQueryFbTest.cs @@ -26,7 +26,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class AdHocQueryFiltersQueryFbTest(NonSharedFixture fixture) : AdHocQueryFiltersQueryRelationalTestBase(fixture) { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; [Fact(Skip = "PK name collision and not easy way to override model.")] public override Task Self_reference_in_query_filter_works() diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs index 53a6213e5..0c23b7286 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/AdHocQuerySplittingQueryFbTest.cs @@ -30,7 +30,7 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class AdHocQuerySplittingQueryFbTest(NonSharedFixture fixture) : AdHocQuerySplittingQueryTestBase(fixture) { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; static readonly FieldInfo _querySplittingBehaviorFieldInfo = typeof(RelationalOptionsExtension).GetField("_querySplittingBehavior", BindingFlags.NonPublic | BindingFlags.Instance); @@ -68,5 +68,21 @@ public override Task Can_query_with_nav_collection_in_projection_with_split_quer { return base.Can_query_with_nav_collection_in_projection_with_split_query_in_parallel_sync(); } + + [Theory(Skip = "Not supported because of current test initialization setup.")] + [InlineData(true)] + [InlineData(false)] + public override Task Split_include_collection_throws_for_orphan_child_rows_after_concurrent_insert(bool async) + { + return base.Split_include_collection_throws_for_orphan_child_rows_after_concurrent_insert(async); + } + + [Theory(Skip = "Not supported because of current test initialization setup.")] + [InlineData(true)] + [InlineData(false)] + public override Task Split_include_collection_not_dropped_when_other_parent_made_childless_concurrently(bool async) + { + return base.Split_include_collection_not_dropped_when_other_parent_made_childless_concurrently(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs index 2fa121910..16d9565fe 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateFbTest.cs @@ -18,13 +18,13 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; public class ComplexTableSplittingBulkUpdateFbTest(ComplexTableSplittingFbFixture fixture, ITestOutputHelper testOutputHelper) : ComplexTableSplittingBulkUpdateRelationalTestBase(fixture, testOutputHelper) { - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Update_inside_primitive_collection() { return base.Update_inside_primitive_collection(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs index 5f71c34f3..ecf86c497 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousFbTest.cs @@ -15,8 +15,10 @@ //$Authors = Niek Schoemaker (@niekschoemaker) +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; @@ -27,4 +29,10 @@ public ComplexTableSplittingMiscellaneousFbTest(ComplexTableSplittingFbFixture f Fixture.TestSqlLoggerFactory.Clear(); Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } + + [Fact(Skip = SkipReasons.GeneratedNameTooLong)] + public override Task FromSql_on_root() + { + return base.FromSql_on_root(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs index ddc8fbfdc..33d61074e 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingProjectionFbTest.cs @@ -17,10 +17,10 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; @@ -33,7 +33,7 @@ public ComplexTableSplittingProjectionFbTest(ComplexTableSplittingFbFixture fixt } // Users OUTER join - [NotSupportedByProviderTheory] + [Theory(Skip = SkipReasons.NotSupportedByProvider)] [MemberData(nameof(TrackingData))] public override Task Select_subquery_optional_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) { @@ -41,10 +41,20 @@ public override Task Select_subquery_optional_related_FirstOrDefault(QueryTracki } // Users OUTER join - [NotSupportedByProviderTheory] + [Theory(Skip = SkipReasons.NotSupportedByProvider)] [MemberData(nameof(TrackingData))] public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior) { return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_FirstOrDefault_complex_collection(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_FirstOrDefault_complex_collection(queryTrackingBehavior); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs index 6638c2660..ec6b7b05a 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingStructuralEqualityFbTest.cs @@ -16,7 +16,7 @@ //$Authors = Niek Schoemaker (@niekschoemaker) using Microsoft.EntityFrameworkCore.Query.Associations.ComplexTableSplitting; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.ComplexTableSplitting; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs index 513ddcd84..7ac0bb7ca 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionFbTest.cs @@ -21,7 +21,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs index df99d7d47..ca3bed37e 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsIncludeFbTest.cs @@ -16,7 +16,7 @@ //$Authors = Niek Schoemaker (@niekschoemaker) using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs index c2321831e..f1ea87dc0 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousFbTest.cs @@ -16,7 +16,7 @@ //$Authors = Niek Schoemaker (@niekschoemaker) using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs index ffad14298..0eb1ea6ce 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionFbTest.cs @@ -18,7 +18,7 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; @@ -30,37 +30,37 @@ public NavigationsPrimitiveCollectionFbTest(NavigationsFbFixture fixture, ITestO Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Any_predicate() { return base.Any_predicate(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Contains() { return base.Contains(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Count() { return base.Count(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Index() { return base.Index(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Nested_Count() { return base.Nested_Count(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Select_Sum() { return base.Select_Sum(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs index 1ecdb44a5..0129c6623 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsProjectionFbTest.cs @@ -21,7 +21,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; @@ -52,4 +51,14 @@ public override Task Select_subquery_required_related_FirstOrDefault(QueryTracki return Task.CompletedTask; return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_FirstOrDefault_complex_collection(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_FirstOrDefault_complex_collection(queryTrackingBehavior); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs index b5af67b79..5c9e5ffe3 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsFbTest.cs @@ -16,7 +16,7 @@ //$Authors = Niek Schoemaker (@niekschoemaker) using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs index a3bb5a67d..655e9fe46 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/Navigations/NavigationsStructuralEqualityFbTest.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore.Query.Associations.Navigations; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.Navigations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs index ff3511184..94329fcf9 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionFbTest.cs @@ -21,7 +21,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs index 93fc2e362..aa982df50 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousFbTest.cs @@ -16,7 +16,7 @@ //$Authors = Niek Schoemaker (@niekschoemaker) using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs index 4b08fbbd9..d9b2c23d5 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsProjectionFbTest.cs @@ -21,7 +21,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; @@ -52,4 +51,14 @@ public override Task Select_subquery_required_related_FirstOrDefault(QueryTracki return Task.CompletedTask; return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_FirstOrDefault_complex_collection(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_FirstOrDefault_complex_collection(queryTrackingBehavior); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs index 26df67b9d..579d5d8c8 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsFbTest.cs @@ -20,7 +20,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; @@ -32,7 +31,7 @@ public OwnedNavigationsSetOperationsFbTest(OwnedNavigationsFbFixture fixture, IT Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } - [NotSupportedByProviderTheory] + [Theory(Skip = SkipReasons.NotSupportedByProvider)] [MemberData(nameof(TrackingData))] public override Task Over_associate_collection_projected(QueryTrackingBehavior queryTrackingBehavior) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs index b7ef84a80..b209adc9b 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsStructuralEqualityFbTest.cs @@ -16,7 +16,7 @@ //$Authors = Niek Schoemaker (@niekschoemaker) using Microsoft.EntityFrameworkCore.Query.Associations.OwnedNavigations; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedNavigations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs index 63f127a76..ec21b92a6 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousFbTest.cs @@ -16,7 +16,7 @@ //$Authors = Niek Schoemaker (@niekschoemaker) using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs index 7985b5600..eebae043a 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingProjectionFbTest.cs @@ -21,7 +21,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; @@ -52,4 +51,14 @@ public override Task Select_subquery_required_related_FirstOrDefault(QueryTracki return Task.CompletedTask; return base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior); } + + [Theory] + [MemberData(nameof(TrackingData))] + public override Task Select_subquery_FirstOrDefault_complex_collection(QueryTrackingBehavior queryTrackingBehavior) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Select_subquery_FirstOrDefault_complex_collection(queryTrackingBehavior); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs index bfe826a2c..a3f1ef3b8 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingStructuralEqualityFbTest.cs @@ -16,7 +16,7 @@ //$Authors = Niek Schoemaker (@niekschoemaker) using Microsoft.EntityFrameworkCore.Query.Associations.OwnedTableSplitting; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Associations.OwnedTableSplitting; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsQueryFbTest.cs index 4988b39d8..60c6ee659 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsQueryFbTest.cs @@ -28,168 +28,168 @@ public ComplexNavigationsCollectionsQueryFbTest(ComplexNavigationsQueryFbFixture : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_issue_21665(bool async) { return base.Complex_query_issue_21665(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_let_collection_projection_FirstOrDefault(bool async) { return base.Complex_query_with_let_collection_projection_FirstOrDefault(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_let_collection_projection_FirstOrDefault_with_ToList_on_inner_and_outer(bool async) { return base.Complex_query_with_let_collection_projection_FirstOrDefault_with_ToList_on_inner_and_outer(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_after_different_filtered_include_different_level(bool async) { return base.Filtered_include_after_different_filtered_include_different_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation(bool async) { return base.Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_complex_three_level_with_middle_having_filter1(bool async) { return base.Filtered_include_complex_three_level_with_middle_having_filter1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_complex_three_level_with_middle_having_filter2(bool async) { return base.Filtered_include_complex_three_level_with_middle_having_filter2(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(bool async) { return base.Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_outer_parameter_used_inside_filter(bool async) { return base.Filtered_include_outer_parameter_used_inside_filter(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes(bool async) { return base.Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_Skip_Take_with_another_Skip_Take_on_top_level(bool async) { return base.Filtered_include_Skip_Take_with_another_Skip_Take_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(bool async) { return base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_inside_subquery(bool async) { return base.Include_inside_subquery(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_collection_after_optional_reference_correlated_with_parent(bool async) { return base.Projecting_collection_after_optional_reference_correlated_with_parent(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_collection_with_group_by_after_optional_reference_correlated_with_parent(bool async) { return base.Projecting_collection_with_group_by_after_optional_reference_correlated_with_parent(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(bool async) { return base.SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_Distinct_on_grouping_element(bool async) { return base.Skip_Take_Distinct_on_grouping_element(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_inside_collection_projection(bool async) { return base.Skip_Take_on_grouping_element_inside_collection_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_with_collection_include(bool async) { return base.Skip_Take_on_grouping_element_with_collection_include(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_with_reference_include(bool async) { return base.Skip_Take_on_grouping_element_with_reference_include(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_Select_collection_Skip_Take(bool async) { return base.Skip_Take_Select_collection_Skip_Take(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Take_Select_collection_Take(bool async) { return base.Take_Select_collection_Take(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(bool async) { return base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_Take_with_another_Take_on_top_level(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQueryFbTest.cs index 35db72ca7..b52dd9df9 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQueryFbTest.cs @@ -35,147 +35,147 @@ public override Task SelectMany_with_navigation_and_Distinct_projecting_columns_ return base.SelectMany_with_navigation_and_Distinct_projecting_columns_including_join_key(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_let_collection_projection_FirstOrDefault(bool async) { return base.Complex_query_with_let_collection_projection_FirstOrDefault(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_let_collection_projection_FirstOrDefault_with_ToList_on_inner_and_outer(bool async) { return base.Complex_query_with_let_collection_projection_FirstOrDefault_with_ToList_on_inner_and_outer(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_after_different_filtered_include_different_level(bool async) { return base.Filtered_include_after_different_filtered_include_different_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation(bool async) { return base.Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_complex_three_level_with_middle_having_filter1(bool async) { return base.Filtered_include_complex_three_level_with_middle_having_filter1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_complex_three_level_with_middle_having_filter2(bool async) { return base.Filtered_include_complex_three_level_with_middle_having_filter2(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(bool async) { return base.Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes(bool async) { return base.Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_Skip_Take_with_another_Skip_Take_on_top_level(bool async) { return base.Filtered_include_Skip_Take_with_another_Skip_Take_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_Take_with_another_Take_on_top_level(bool async) { return base.Filtered_include_Take_with_another_Take_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(bool async) { return base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(bool async) { return base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_collection_after_optional_reference_correlated_with_parent(bool async) { return base.Projecting_collection_after_optional_reference_correlated_with_parent(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_collection_with_group_by_after_optional_reference_correlated_with_parent(bool async) { return base.Projecting_collection_with_group_by_after_optional_reference_correlated_with_parent(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(bool async) { return base.SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_Distinct_on_grouping_element(bool async) { return base.Skip_Take_Distinct_on_grouping_element(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_inside_collection_projection(bool async) { return base.Skip_Take_on_grouping_element_inside_collection_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_with_collection_include(bool async) { return base.Skip_Take_on_grouping_element_with_collection_include(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_with_reference_include(bool async) { return base.Skip_Take_on_grouping_element_with_reference_include(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_Select_collection_Skip_Take(bool async) { return base.Skip_Take_Select_collection_Skip_Take(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Take_Select_collection_Take(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQueryFbTest.cs index eb090f0c9..7371775c9 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQueryFbTest.cs @@ -28,168 +28,168 @@ public ComplexNavigationsCollectionsSplitQueryFbTest(ComplexNavigationsQueryFbFi : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_issue_21665(bool async) { return base.Complex_query_issue_21665(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_let_collection_projection_FirstOrDefault(bool async) { return base.Complex_query_with_let_collection_projection_FirstOrDefault(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_let_collection_projection_FirstOrDefault_with_ToList_on_inner_and_outer(bool async) { return base.Complex_query_with_let_collection_projection_FirstOrDefault_with_ToList_on_inner_and_outer(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_after_different_filtered_include_different_level(bool async) { return base.Filtered_include_after_different_filtered_include_different_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation(bool async) { return base.Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_complex_three_level_with_middle_having_filter1(bool async) { return base.Filtered_include_complex_three_level_with_middle_having_filter1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_complex_three_level_with_middle_having_filter2(bool async) { return base.Filtered_include_complex_three_level_with_middle_having_filter2(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(bool async) { return base.Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_outer_parameter_used_inside_filter(bool async) { return base.Filtered_include_outer_parameter_used_inside_filter(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes(bool async) { return base.Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_Skip_Take_with_another_Skip_Take_on_top_level(bool async) { return base.Filtered_include_Skip_Take_with_another_Skip_Take_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(bool async) { return base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_inside_subquery(bool async) { return base.Include_inside_subquery(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_collection_after_optional_reference_correlated_with_parent(bool async) { return base.Projecting_collection_after_optional_reference_correlated_with_parent(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_collection_with_group_by_after_optional_reference_correlated_with_parent(bool async) { return base.Projecting_collection_with_group_by_after_optional_reference_correlated_with_parent(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(bool async) { return base.SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_Distinct_on_grouping_element(bool async) { return base.Skip_Take_Distinct_on_grouping_element(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_inside_collection_projection(bool async) { return base.Skip_Take_on_grouping_element_inside_collection_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_with_collection_include(bool async) { return base.Skip_Take_on_grouping_element_with_collection_include(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_with_reference_include(bool async) { return base.Skip_Take_on_grouping_element_with_reference_include(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_Select_collection_Skip_Take(bool async) { return base.Skip_Take_Select_collection_Skip_Take(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Take_Select_collection_Take(bool async) { return base.Take_Select_collection_Take(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(bool async) { return base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_Take_with_another_Take_on_top_level(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSplitSharedTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSplitSharedTypeQueryFbTest.cs index 0f470b08b..c5d470904 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSplitSharedTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsCollectionsSplitSharedTypeQueryFbTest.cs @@ -35,119 +35,119 @@ public override Task SelectMany_with_navigation_and_Distinct_projecting_columns_ return base.SelectMany_with_navigation_and_Distinct_projecting_columns_including_join_key(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_let_collection_projection_FirstOrDefault(bool async) { return base.Complex_query_with_let_collection_projection_FirstOrDefault(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_let_collection_projection_FirstOrDefault_with_ToList_on_inner_and_outer(bool async) { return base.Complex_query_with_let_collection_projection_FirstOrDefault_with_ToList_on_inner_and_outer(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation(bool async) { return base.Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(bool async) { return base.Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes(bool async) { return base.Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_Take_with_another_Take_on_top_level(bool async) { return base.Filtered_include_Take_with_another_Take_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(bool async) { return base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_FirstOrDefault_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(bool async) { return base.Filtered_include_with_Take_without_order_by_followed_by_ThenInclude_and_unordered_Take_on_top_level(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_collection_after_optional_reference_correlated_with_parent(bool async) { return base.Projecting_collection_after_optional_reference_correlated_with_parent(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_collection_with_group_by_after_optional_reference_correlated_with_parent(bool async) { return base.Projecting_collection_with_group_by_after_optional_reference_correlated_with_parent(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(bool async) { return base.SelectMany_with_predicate_and_DefaultIfEmpty_projecting_root_collection_element_and_another_collection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_Distinct_on_grouping_element(bool async) { return base.Skip_Take_Distinct_on_grouping_element(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_inside_collection_projection(bool async) { return base.Skip_Take_on_grouping_element_inside_collection_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_on_grouping_element_with_reference_include(bool async) { return base.Skip_Take_on_grouping_element_with_reference_include(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_Take_Select_collection_Skip_Take(bool async) { return base.Skip_Take_Select_collection_Skip_Take(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Take_Select_collection_Take(bool async) { return base.Take_Select_collection_Take(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_Skip_Take_with_another_Skip_Take_on_top_level(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsQueryFbTest.cs index 8f4b3ed9d..dc34b1f4a 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsQueryFbTest.cs @@ -29,763 +29,763 @@ public ComplexNavigationsQueryFbTest(ComplexNavigationsQueryFbFixture fixture) : base(fixture) { } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Complex_navigations_with_predicate_projected_into_anonymous_type(bool isAsync) { return base.Complex_navigations_with_predicate_projected_into_anonymous_type(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Complex_navigations_with_predicate_projected_into_anonymous_type2(bool isAsync) { return base.Complex_navigations_with_predicate_projected_into_anonymous_type2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_optional_navigations_and_client_side_evaluation(bool isAsync) { return base.Complex_query_with_optional_navigations_and_client_side_evaluation(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_in_outer_selector_translated_to_extra_join_nested(bool isAsync) { return base.Join_navigation_in_outer_selector_translated_to_extra_join_nested(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_in_outer_selector_translated_to_extra_join_nested2(bool isAsync) { return base.Join_navigation_in_outer_selector_translated_to_extra_join_nested2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Level4_Include(bool isAsync) { return base.Level4_Include(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Manually_created_left_join_propagates_nullability_to_navigations(bool isAsync) { return base.Manually_created_left_join_propagates_nullability_to_navigations(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_required_navigations_with_Include(bool isAsync) { return base.Multiple_required_navigations_with_Include(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_required_navigation_using_multiple_selects_with_Include(bool isAsync) { return base.Multiple_required_navigation_using_multiple_selects_with_Include(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_required_navigation_using_multiple_selects_with_string_based_Include(bool isAsync) { return base.Multiple_required_navigation_using_multiple_selects_with_string_based_Include(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_required_navigation_with_string_based_Include(bool isAsync) { return base.Multiple_required_navigation_with_string_based_Include(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_SelectMany_calls(bool isAsync) { return base.Multiple_SelectMany_calls(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_SelectMany_with_navigation_and_explicit_DefaultIfEmpty(bool isAsync) { return base.Multiple_SelectMany_with_navigation_and_explicit_DefaultIfEmpty(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_SelectMany_with_nested_navigations_and_explicit_DefaultIfEmpty_joined_together(bool isAsync) { return base.Multiple_SelectMany_with_nested_navigations_and_explicit_DefaultIfEmpty_joined_together(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_SelectMany_with_string_based_Include(bool isAsync) { return base.Multiple_SelectMany_with_string_based_Include(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multi_include_with_groupby_in_subquery(bool isAsync) { return base.Multi_include_with_groupby_in_subquery(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Multi_level_navigation_with_same_navigation_compared_to_null(bool isAsync) { return base.Multi_level_navigation_with_same_navigation_compared_to_null(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_inside_method_call_translated_to_join2(bool isAsync) { return base.Navigation_inside_method_call_translated_to_join2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Optional_navigation_take_optional_navigation(bool isAsync) { return base.Optional_navigation_take_optional_navigation(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Optional_navigation_with_Include(bool isAsync) { return base.Optional_navigation_with_Include(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Order_by_key_of_anonymous_type_projected_navigation_doesnt_get_optimized_into_FK_access_subquery(bool isAsync) { return base.Order_by_key_of_anonymous_type_projected_navigation_doesnt_get_optimized_into_FK_access_subquery(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Order_by_key_of_navigation_similar_to_projected_gets_optimized_into_FK_access(bool isAsync) { return base.Order_by_key_of_navigation_similar_to_projected_gets_optimized_into_FK_access(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Order_by_key_of_projected_navigation_doesnt_get_optimized_into_FK_access1(bool isAsync) { return base.Order_by_key_of_projected_navigation_doesnt_get_optimized_into_FK_access1(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Order_by_key_of_projected_navigation_doesnt_get_optimized_into_FK_access2(bool isAsync) { return base.Order_by_key_of_projected_navigation_doesnt_get_optimized_into_FK_access2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Order_by_key_of_projected_navigation_doesnt_get_optimized_into_FK_access3(bool isAsync) { return base.Order_by_key_of_projected_navigation_doesnt_get_optimized_into_FK_access3(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Order_by_key_of_projected_navigation_doesnt_get_optimized_into_FK_access_subquery(bool isAsync) { return base.Order_by_key_of_projected_navigation_doesnt_get_optimized_into_FK_access_subquery(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Projection_select_correct_table_from_subquery_when_materialization_is_not_required(bool isAsync) { return base.Projection_select_correct_table_from_subquery_when_materialization_is_not_required(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Required_navigation_on_a_subquery_with_complex_projection_and_First(bool isAsync) { return base.Required_navigation_on_a_subquery_with_complex_projection_and_First(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Required_navigation_on_a_subquery_with_First_in_predicate(bool isAsync) { return base.Required_navigation_on_a_subquery_with_First_in_predicate(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Required_navigation_on_a_subquery_with_First_in_projection(bool isAsync) { return base.Required_navigation_on_a_subquery_with_First_in_projection(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_nested_navigation_property_optional_and_projection(bool isAsync) { return base.SelectMany_nested_navigation_property_optional_and_projection(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_nested_navigation_property_required(bool isAsync) { return base.SelectMany_nested_navigation_property_required(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_navigations_and_additional_joins_outside_of_SelectMany(bool isAsync) { return base.SelectMany_with_nested_navigations_and_additional_joins_outside_of_SelectMany(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_navigations_and_explicit_DefaultIfEmpty_followed_by_Select_required_navigation_using_different_navs(bool isAsync) { return base.SelectMany_with_nested_navigations_and_explicit_DefaultIfEmpty_followed_by_Select_required_navigation_using_different_navs(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_navigations_and_explicit_DefaultIfEmpty_followed_by_Select_required_navigation_using_same_navs(bool isAsync) { return base.SelectMany_with_nested_navigations_and_explicit_DefaultIfEmpty_followed_by_Select_required_navigation_using_same_navs(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_navigations_explicit_DefaultIfEmpty_and_additional_joins_outside_of_SelectMany(bool isAsync) { return base.SelectMany_with_nested_navigations_explicit_DefaultIfEmpty_and_additional_joins_outside_of_SelectMany(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_navigations_explicit_DefaultIfEmpty_and_additional_joins_outside_of_SelectMany2(bool isAsync) { return base.SelectMany_with_nested_navigations_explicit_DefaultIfEmpty_and_additional_joins_outside_of_SelectMany2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_navigations_explicit_DefaultIfEmpty_and_additional_joins_outside_of_SelectMany3(bool isAsync) { return base.SelectMany_with_nested_navigations_explicit_DefaultIfEmpty_and_additional_joins_outside_of_SelectMany3(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_navigations_explicit_DefaultIfEmpty_and_additional_joins_outside_of_SelectMany4(bool isAsync) { return base.SelectMany_with_nested_navigations_explicit_DefaultIfEmpty_and_additional_joins_outside_of_SelectMany4(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_navigation_and_explicit_DefaultIfEmpty(bool isAsync) { return base.SelectMany_with_nested_navigation_and_explicit_DefaultIfEmpty(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_navigation_filter_and_explicit_DefaultIfEmpty(bool isAsync) { return base.SelectMany_with_nested_navigation_filter_and_explicit_DefaultIfEmpty(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_nested_required_navigation_filter_and_explicit_DefaultIfEmpty(bool isAsync) { return base.SelectMany_with_nested_required_navigation_filter_and_explicit_DefaultIfEmpty(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_string_based_Include1(bool isAsync) { return base.SelectMany_with_string_based_Include1(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_string_based_Include2(bool isAsync) { return base.SelectMany_with_string_based_Include2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Select_multiple_nav_prop_optional_required(bool isAsync) { return base.Select_multiple_nav_prop_optional_required(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Select_multiple_nav_prop_reference_optional(bool isAsync) { return base.Select_multiple_nav_prop_reference_optional(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Select_multiple_nav_prop_reference_required(bool isAsync) { return base.Select_multiple_nav_prop_reference_required(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Select_multiple_nav_prop_reference_required2(bool isAsync) { return base.Select_multiple_nav_prop_reference_required2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Select_subquery_with_client_eval_and_navigation1(bool isAsync) { return base.Select_subquery_with_client_eval_and_navigation1(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Select_subquery_with_client_eval_and_navigation2(bool isAsync) { return base.Select_subquery_with_client_eval_and_navigation2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Simple_level1_level2_GroupBy_Count(bool isAsync) { return base.Simple_level1_level2_GroupBy_Count(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Simple_level1_level2_GroupBy_Having_Count(bool isAsync) { return base.Simple_level1_level2_GroupBy_Having_Count(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Simple_level1_level2_include(bool isAsync) { return base.Simple_level1_level2_include(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Simple_level1_level2_level3_include(bool isAsync) { return base.Simple_level1_level2_level3_include(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task String_include_multiple_derived_collection_navigation_with_same_name_and_different_type_nested_also_includes_partially_matching_navigation_chains(bool isAsync) { return base.String_include_multiple_derived_collection_navigation_with_same_name_and_different_type_nested_also_includes_partially_matching_navigation_chains(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task String_include_multiple_derived_navigations_complex(bool isAsync) { return base.String_include_multiple_derived_navigations_complex(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task String_include_multiple_derived_navigation_with_same_name_and_different_type_nested_also_includes_partially_matching_navigation_chains(bool isAsync) { return base.String_include_multiple_derived_navigation_with_same_name_and_different_type_nested_also_includes_partially_matching_navigation_chains(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_complex_predicate_with_with_nav_prop_and_OrElse1(bool isAsync) { return base.Where_complex_predicate_with_with_nav_prop_and_OrElse1(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_complex_predicate_with_with_nav_prop_and_OrElse2(bool isAsync) { return base.Where_complex_predicate_with_with_nav_prop_and_OrElse2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_complex_predicate_with_with_nav_prop_and_OrElse3(bool isAsync) { return base.Where_complex_predicate_with_with_nav_prop_and_OrElse3(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_complex_predicate_with_with_nav_prop_and_OrElse4(bool isAsync) { return base.Where_complex_predicate_with_with_nav_prop_and_OrElse4(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_multiple_nav_prop_optional_required(bool isAsync) { return base.Where_multiple_nav_prop_optional_required(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_multiple_nav_prop_reference_optional_compared_to_null1(bool isAsync) { return base.Where_multiple_nav_prop_reference_optional_compared_to_null1(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_multiple_nav_prop_reference_optional_compared_to_null2(bool isAsync) { return base.Where_multiple_nav_prop_reference_optional_compared_to_null2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_multiple_nav_prop_reference_optional_compared_to_null3(bool isAsync) { return base.Where_multiple_nav_prop_reference_optional_compared_to_null3(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_multiple_nav_prop_reference_optional_compared_to_null4(bool isAsync) { return base.Where_multiple_nav_prop_reference_optional_compared_to_null4(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_multiple_nav_prop_reference_optional_compared_to_null5(bool isAsync) { return base.Where_multiple_nav_prop_reference_optional_compared_to_null5(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_multiple_nav_prop_reference_optional_member_compared_to_null(bool isAsync) { return base.Where_multiple_nav_prop_reference_optional_member_compared_to_null(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_multiple_nav_prop_reference_optional_member_compared_to_value(bool isAsync) { return base.Where_multiple_nav_prop_reference_optional_member_compared_to_value(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_navigation_property_to_collection2(bool isAsync) { return base.Where_navigation_property_to_collection2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Where_on_multilevel_reference_in_subquery_with_outer_projection(bool isAsync) { return base.Where_on_multilevel_reference_in_subquery_with_outer_projection(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_subquery_doesnt_project_unnecessary_columns_in_top_level_join(bool isAsync) { return base.Correlated_subquery_doesnt_project_unnecessary_columns_in_top_level_join(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_with_complex_subquery_with_joins_does_not_get_flattened(bool isAsync) { return base.GroupJoin_with_complex_subquery_with_joins_does_not_get_flattened(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_with_complex_subquery_with_joins_does_not_get_flattened2(bool isAsync) { return base.GroupJoin_with_complex_subquery_with_joins_does_not_get_flattened2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_with_complex_subquery_with_joins_does_not_get_flattened3(bool isAsync) { return base.GroupJoin_with_complex_subquery_with_joins_does_not_get_flattened3(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include18_1_1(bool isAsync) { return base.Include18_1_1(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include19(bool isAsync) { return base.Include19(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_deeply_nested_non_key_join(bool isAsync) { return base.Join_navigation_deeply_nested_non_key_join(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_deeply_nested_required(bool isAsync) { return base.Join_navigation_deeply_nested_required(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_in_inner_selector(bool isAsync) { return base.Join_navigation_in_inner_selector(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_key_access_optional(bool isAsync) { return base.Join_navigation_key_access_optional(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_key_access_required(bool isAsync) { return base.Join_navigation_key_access_required(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_nested(bool isAsync) { return base.Join_navigation_nested(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_nested2(bool isAsync) { return base.Join_navigation_nested2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_non_key_join(bool isAsync) { return base.Join_navigation_non_key_join(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigation_self_ref(bool isAsync) { return base.Join_navigation_self_ref(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_navigations_in_inner_selector_translated_without_collision(bool isAsync) { return base.Join_navigations_in_inner_selector_translated_without_collision(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Join_with_orderby_on_inner_sequence_navigation_non_key_join(bool isAsync) { return base.Join_with_orderby_on_inner_sequence_navigation_non_key_join(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Null_reference_protection_complex(bool isAsync) { return base.Null_reference_protection_complex(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Null_reference_protection_complex_client_eval(bool isAsync) { return base.Null_reference_protection_complex_client_eval(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Null_reference_protection_complex_materialization(bool isAsync) { return base.Null_reference_protection_complex_materialization(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Optional_navigation_propagates_nullability_to_manually_created_left_join2(bool isAsync) { return base.Optional_navigation_propagates_nullability_to_manually_created_left_join2(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Union_over_entities_with_different_nullability(bool isAsync) { return base.Union_over_entities_with_different_nullability(isAsync); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_groupby_in_subquery(bool async) { return base.Include_reference_with_groupby_in_subquery(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Project_shadow_properties1(bool async) { return base.Project_shadow_properties1(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Project_shadow_properties2(bool async) { return base.Project_shadow_properties2(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Project_shadow_properties3(bool async) { return base.Project_shadow_properties3(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Project_shadow_properties4(bool async) { return base.Project_shadow_properties4(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Project_shadow_properties9(bool async) { return base.Project_shadow_properties9(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Project_shadow_properties10(bool async) { return base.Project_shadow_properties10(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_outside_reference_to_joined_table_correctly_translated_to_apply(bool isAsync) { return base.SelectMany_with_outside_reference_to_joined_table_correctly_translated_to_apply(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Let_let_contains_from_outer_let(bool async) { return base.Let_let_contains_from_outer_let(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Prune_does_not_throw_null_ref(bool async) { return base.Prune_does_not_throw_null_ref(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_with_subquery_on_inner(bool async) { return base.GroupJoin_with_subquery_on_inner(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_with_subquery_on_inner_and_no_DefaultIfEmpty(bool async) { return base.GroupJoin_with_subquery_on_inner_and_no_DefaultIfEmpty(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Nested_SelectMany_correlated_with_join_table_correctly_translated_to_apply(bool async) { return base.Nested_SelectMany_correlated_with_join_table_correctly_translated_to_apply(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_projection_with_first(bool async) { return base.Correlated_projection_with_first(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_select_many_in_projection(bool async) { return base.Multiple_select_many_in_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Single_select_many_in_projection_with_take(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsSharedTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsSharedTypeQueryFbTest.cs index d7dabbcca..b90c12a80 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsSharedTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexNavigationsSharedTypeQueryFbTest.cs @@ -44,56 +44,56 @@ public override Task GroupJoin_client_method_in_OrderBy(bool async) return AssertTranslationFailed(() => base.GroupJoin_client_method_in_OrderBy(async)); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_with_subquery_on_inner(bool async) { return base.GroupJoin_with_subquery_on_inner(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task GroupJoin_with_subquery_on_inner_and_no_DefaultIfEmpty(bool async) { return base.GroupJoin_with_subquery_on_inner_and_no_DefaultIfEmpty(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Let_let_contains_from_outer_let(bool async) { return base.Let_let_contains_from_outer_let(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Nested_SelectMany_correlated_with_join_table_correctly_translated_to_apply(bool async) { return base.Nested_SelectMany_correlated_with_join_table_correctly_translated_to_apply(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Prune_does_not_throw_null_ref(bool async) { return base.Prune_does_not_throw_null_ref(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_projection_with_first(bool async) { return base.Correlated_projection_with_first(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_select_many_in_projection(bool async) { return base.Multiple_select_many_in_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Single_select_many_in_projection_with_take(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs index d2799bb16..473961f0f 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ComplexTypeQueryFbTest.cs @@ -164,13 +164,23 @@ public override Task Union_of_same_nested_complex_type_projected_twice_with_push return base.Union_of_same_nested_complex_type_projected_twice_with_pushdown(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Same_entity_with_complex_type_projected_twice_with_pushdown_as_part_of_another_projection(bool async) { return base.Same_entity_with_complex_type_projected_twice_with_pushdown_as_part_of_another_projection(async); } + [Theory] + [MemberData(nameof(IsAsyncData))] + public override Task Same_complex_type_projected_twice_with_pushdown_as_part_of_another_projection(bool async) + { + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.Same_complex_type_projected_twice_with_pushdown_as_part_of_another_projection(async); + } + public class ComplexTypeQueryFbFixture : ComplexTypeQueryRelationalFixtureBase { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; @@ -181,4 +191,22 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con ModelHelpers.SetStringLengths(modelBuilder); } } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Complex_json_collection_inside_left_join_subquery() + { + return base.Complex_json_collection_inside_left_join_subquery(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Project_json_complex_collection_together_with_collection_navigation() + { + return base.Project_json_complex_collection_together_with_collection_navigation(); + } + + [Fact(Skip = SkipReasons.NotSupportedByProvider)] + public override Task Complex_property_on_split_entity() + { + return base.Complex_property_on_split_entity(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Ef6GroupByFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Ef6GroupByFbTest.cs index d0e8b5b9e..90b44fca4 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Ef6GroupByFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Ef6GroupByFbTest.cs @@ -31,7 +31,7 @@ public Ef6GroupByFbTest(Ef6GroupByFbFixture fixture) : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Group_Join_from_LINQ_101(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs index d5d617de9..2eef62bc7 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/EntitySplittingQueryFbTest.cs @@ -24,5 +24,5 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class EntitySplittingQueryFbTest(NonSharedFixture fixture) : EntitySplittingQueryTestBase(fixture) { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlSprocQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlSprocQueryFbTest.cs index 8e315efdf..52c3c8b5d 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlSprocQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/FromSqlSprocQueryFbTest.cs @@ -33,7 +33,7 @@ public FromSqlSprocQueryFbTest(NorthwindQueryFbFixture fixt protected override string TenMostExpensiveProductsSproc => throw new NotSupportedException(); protected override string CustomerOrderHistorySproc => throw new NotSupportedException(); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_select_and_stored_procedure(bool async) @@ -41,7 +41,7 @@ public override Task From_sql_queryable_select_and_stored_procedure(bool async) return base.From_sql_queryable_select_and_stored_procedure(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_select_and_stored_procedure_on_client(bool async) @@ -49,7 +49,7 @@ public override Task From_sql_queryable_select_and_stored_procedure_on_client(bo return base.From_sql_queryable_select_and_stored_procedure_on_client(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure(bool async) @@ -57,7 +57,7 @@ public override Task From_sql_queryable_stored_procedure(bool async) return base.From_sql_queryable_stored_procedure(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_and_select(bool async) @@ -65,7 +65,7 @@ public override Task From_sql_queryable_stored_procedure_and_select(bool async) return base.From_sql_queryable_stored_procedure_and_select(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_and_select_on_client(bool async) @@ -73,7 +73,7 @@ public override Task From_sql_queryable_stored_procedure_and_select_on_client(bo return base.From_sql_queryable_stored_procedure_and_select_on_client(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_composed(bool async) @@ -81,7 +81,7 @@ public override Task From_sql_queryable_stored_procedure_composed(bool async) return base.From_sql_queryable_stored_procedure_composed(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_composed_on_client(bool async) @@ -89,7 +89,7 @@ public override Task From_sql_queryable_stored_procedure_composed_on_client(bool return base.From_sql_queryable_stored_procedure_composed_on_client(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_min(bool async) @@ -97,7 +97,7 @@ public override Task From_sql_queryable_stored_procedure_min(bool async) return base.From_sql_queryable_stored_procedure_min(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_min_on_client(bool async) @@ -105,7 +105,7 @@ public override Task From_sql_queryable_stored_procedure_min_on_client(bool asyn return base.From_sql_queryable_stored_procedure_min_on_client(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_projection(bool async) @@ -113,7 +113,7 @@ public override Task From_sql_queryable_stored_procedure_projection(bool async) return base.From_sql_queryable_stored_procedure_projection(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_re_projection(bool async) @@ -121,7 +121,7 @@ public override Task From_sql_queryable_stored_procedure_re_projection(bool asyn return base.From_sql_queryable_stored_procedure_re_projection(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_re_projection_on_client(bool async) @@ -129,7 +129,7 @@ public override Task From_sql_queryable_stored_procedure_re_projection_on_client return base.From_sql_queryable_stored_procedure_re_projection_on_client(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_take(bool async) @@ -137,7 +137,7 @@ public override Task From_sql_queryable_stored_procedure_take(bool async) return base.From_sql_queryable_stored_procedure_take(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_take_on_client(bool async) @@ -145,7 +145,7 @@ public override Task From_sql_queryable_stored_procedure_take_on_client(bool asy return base.From_sql_queryable_stored_procedure_take_on_client(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_with_include_throws(bool async) @@ -153,7 +153,7 @@ public override Task From_sql_queryable_stored_procedure_with_include_throws(boo return base.From_sql_queryable_stored_procedure_with_include_throws(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_with_parameter(bool async) @@ -161,7 +161,7 @@ public override Task From_sql_queryable_stored_procedure_with_parameter(bool asy return base.From_sql_queryable_stored_procedure_with_parameter(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_with_parameter_composed(bool async) @@ -169,7 +169,7 @@ public override Task From_sql_queryable_stored_procedure_with_parameter_composed return base.From_sql_queryable_stored_procedure_with_parameter_composed(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_with_parameter_composed_on_client(bool async) @@ -177,7 +177,7 @@ public override Task From_sql_queryable_stored_procedure_with_parameter_composed return base.From_sql_queryable_stored_procedure_with_parameter_composed_on_client(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_with_tag(bool async) @@ -185,7 +185,7 @@ public override Task From_sql_queryable_stored_procedure_with_tag(bool async) return base.From_sql_queryable_stored_procedure_with_tag(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_with_multiple_stored_procedures(bool async) @@ -193,7 +193,7 @@ public override Task From_sql_queryable_with_multiple_stored_procedures(bool asy return base.From_sql_queryable_with_multiple_stored_procedures(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_with_multiple_stored_procedures_on_client(bool async) @@ -201,7 +201,7 @@ public override Task From_sql_queryable_with_multiple_stored_procedures_on_clien return base.From_sql_queryable_with_multiple_stored_procedures_on_client(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_with_caller_info_tag(bool async) @@ -209,7 +209,7 @@ public override Task From_sql_queryable_stored_procedure_with_caller_info_tag(bo return base.From_sql_queryable_stored_procedure_with_caller_info_tag(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_with_caller_info_tag_and_other_tags(bool async) @@ -217,7 +217,7 @@ public override Task From_sql_queryable_stored_procedure_with_caller_info_tag_an return base.From_sql_queryable_stored_procedure_with_caller_info_tag_and_other_tags(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task From_sql_queryable_stored_procedure_with_tags(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs index fde4e3cc5..a70c399be 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/GearsOfWarQueryFbTest.cs @@ -33,70 +33,70 @@ public GearsOfWarQueryFbTest(GearsOfWarQueryFbFixture fixture) : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task DateTimeOffsetNow_minus_timespan(bool async) { return base.DateTimeOffsetNow_minus_timespan(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_inner_subquery_predicate_references_outer_qsre(bool isAsync) { return base.Correlated_collections_inner_subquery_predicate_references_outer_qsre(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_inner_subquery_selector_references_outer_qsre(bool isAsync) { return base.Correlated_collections_inner_subquery_selector_references_outer_qsre(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_nested_inner_subquery_references_outer_qsre_one_level_up(bool isAsync) { return base.Correlated_collections_nested_inner_subquery_references_outer_qsre_one_level_up(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_nested_inner_subquery_references_outer_qsre_two_levels_up(bool isAsync) { return base.Correlated_collections_nested_inner_subquery_references_outer_qsre_two_levels_up(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task DateTimeOffset_Contains_Less_than_Greater_than(bool isAsync) { return base.DateTimeOffset_Contains_Less_than_Greater_than(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_group_join_with_DefaultIfEmpty(bool isAsync) { return base.Outer_parameter_in_group_join_with_DefaultIfEmpty(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_join_key(bool isAsync) { return base.Outer_parameter_in_join_key(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_join_key_inner_and_outer(bool isAsync) { return base.Outer_parameter_in_join_key_inner_and_outer(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Project_collection_navigation_nested_with_take_composite_key(bool isAsync) { @@ -117,56 +117,56 @@ public override Task Take_without_orderby_followed_by_orderBy_is_pushed_down2(bo return base.Take_without_orderby_followed_by_orderBy_is_pushed_down2(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task DateTimeOffset_Date_returns_datetime(bool isAsync) { return base.DateTimeOffset_Date_returns_datetime(isAsync); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_projecting_non_nullable_scalar_contains_non_nullable_value_doesnt_need_null_expansion(bool async) { return base.Subquery_projecting_non_nullable_scalar_contains_non_nullable_value_doesnt_need_null_expansion(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_projecting_non_nullable_scalar_contains_non_nullable_value_doesnt_need_null_expansion_negated(bool async) { return base.Subquery_projecting_non_nullable_scalar_contains_non_nullable_value_doesnt_need_null_expansion_negated(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion_negated(bool async) { return base.Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion_negated(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_predicate_with_non_equality_comparison_with_Take_doesnt_convert_to_join(bool async) { return base.SelectMany_predicate_with_non_equality_comparison_with_Take_doesnt_convert_to_join(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion(bool async) { return base.Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_3_levels(bool async) { return base.Correlated_collection_after_distinct_3_levels(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_via_SelectMany_with_Distinct_missing_indentifying_columns_in_projection(bool async) { @@ -187,70 +187,70 @@ public override Task ToString_boolean_property_nullable(bool async) return AssertQuery(async, ss => ss.Set().Select(lh => lh.Eradicated.ToString()), elementAsserter: (lhs, rhs) => { Assert.True(lhs.Equals(rhs, System.StringComparison.InvariantCultureIgnoreCase)); }); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_inner_collection_references_element_two_levels_up(bool async) { return base.Correlated_collection_with_inner_collection_references_element_two_levels_up(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_not_projecting_identifier_column_with_group_aggregate_in_final_projection_multiple_grouping_keys(bool async) { return base.Correlated_collection_with_groupby_not_projecting_identifier_column_with_group_aggregate_in_final_projection_multiple_grouping_keys(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) { return base.Correlated_collection_with_groupby_not_projecting_identifier_column_with_group_aggregate_in_final_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_not_projecting_identifier_column_but_only_grouping_key_in_final_projection(bool async) { return base.Correlated_collection_with_groupby_not_projecting_identifier_column_but_only_grouping_key_in_final_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_distinct_projecting_identifier_column(bool async) { return base.Correlated_collection_with_distinct_projecting_identifier_column(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_distinct_not_projecting_identifier_column(bool async) { return base.Correlated_collection_with_distinct_not_projecting_identifier_column(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_with_Distinct(bool async) { return base.Correlated_collections_with_Distinct(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) { return base.Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_inside_Take_argument(bool async) { return base.Subquery_inside_Take_argument(async); } - [NotSupportedByProviderTheory] + [Theory(Skip = SkipReasons.NotSupportedByProvider)] [MemberData(nameof(IsAsyncData))] public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/IncompleteMappingInheritanceQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/IncompleteMappingInheritanceQueryFbTest.cs index b3730b89a..b64c8f096 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/IncompleteMappingInheritanceQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/IncompleteMappingInheritanceQueryFbTest.cs @@ -15,8 +15,11 @@ //$Authors = Jiri Cincura (jiri@cincura.net) +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; -using Xunit.Abstractions; +using Microsoft.EntityFrameworkCore.Query.Inheritance; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -25,4 +28,11 @@ public class IncompleteMappingInheritanceQueryFbTest : TPHInheritanceQueryTestBa public IncompleteMappingInheritanceQueryFbTest(IncompleteMappingInheritanceQueryFbFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) { } + + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] + [MemberData(nameof(IsAsyncData))] + public override Task Primitive_collection_on_subtype(bool async) + { + return base.Primitive_collection_on_subtype(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/InheritanceRelationshipsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/InheritanceRelationshipsQueryFbTest.cs index e2fe8d34a..6e146c3e6 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/InheritanceRelationshipsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/InheritanceRelationshipsQueryFbTest.cs @@ -31,334 +31,334 @@ public InheritanceRelationshipsQueryFbTest(InheritanceRelationshipsQueryFbFixtur : base(fixture) { } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_without_inheritance_on_derived1(bool async) { return base.Include_reference_without_inheritance_on_derived1(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_without_inheritance_with_filter_reverse(bool async) { return base.Include_collection_without_inheritance_with_filter_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_reference_reference_reverse(bool async) { return base.Nested_include_with_inheritance_reference_reference_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_reference_collection(bool async) { return base.Nested_include_with_inheritance_reference_collection(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_with_filter(bool async) { return base.Include_reference_with_inheritance_with_filter(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_on_derived2(bool async) { return base.Include_reference_with_inheritance_on_derived2(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_without_inheritance_on_derived_reverse(bool async) { return base.Include_reference_without_inheritance_on_derived_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_on_derived_with_filter_reverse(bool async) { return base.Include_reference_with_inheritance_on_derived_with_filter_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_inheritance_reverse(bool async) { return base.Include_collection_with_inheritance_reverse(async); } - [GeneratedNameTooLongFact] + [Fact(Skip = SkipReasons.GeneratedNameTooLong)] public override void Entity_can_make_separate_relationships_with_base_type_and_derived_type_both() { base.Entity_can_make_separate_relationships_with_base_type_and_derived_type_both(); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_collection_reference(bool async) { return base.Nested_include_with_inheritance_collection_reference(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_without_inheritance_reverse(bool async) { return base.Include_reference_without_inheritance_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_reference_collection_on_base(bool async) { return base.Nested_include_with_inheritance_reference_collection_on_base(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_reverse(bool async) { return base.Include_reference_with_inheritance_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_inheritance_on_derived1(bool async) { return base.Include_collection_with_inheritance_on_derived1(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_self_reference_with_inheritance(bool async) { return base.Include_self_reference_with_inheritance(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_on_derived_with_filter1(bool async) { return base.Include_reference_with_inheritance_on_derived_with_filter1(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_collection_reference_reverse(bool async) { return base.Nested_include_with_inheritance_collection_reference_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_inheritance_on_derived3(bool async) { return base.Include_collection_with_inheritance_on_derived3(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_without_inheritance_reverse(bool async) { return base.Include_collection_without_inheritance_reverse(async); } - [GeneratedNameTooLongFact] + [Fact(Skip = SkipReasons.GeneratedNameTooLong)] public override void Changes_in_derived_related_entities_are_detected() { base.Changes_in_derived_related_entities_are_detected(); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_inheritance_with_filter(bool async) { return base.Include_collection_with_inheritance_with_filter(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_without_inheritance_on_derived2(bool async) { return base.Include_reference_without_inheritance_on_derived2(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_on_derived4(bool async) { return base.Include_reference_with_inheritance_on_derived4(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_reference_reference(bool async) { return base.Nested_include_with_inheritance_reference_reference(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_on_derived_with_filter2(bool async) { return base.Include_reference_with_inheritance_on_derived_with_filter2(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_with_filter_reverse(bool async) { return base.Include_reference_with_inheritance_with_filter_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_on_derived_reverse(bool async) { return base.Include_reference_with_inheritance_on_derived_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_self_reference_with_inheritance_reverse(bool async) { return base.Include_self_reference_with_inheritance_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_without_inheritance(bool async) { return base.Include_collection_without_inheritance(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_without_inheritance_with_filter(bool async) { return base.Include_reference_without_inheritance_with_filter(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_collection_collection(bool async) { return base.Nested_include_with_inheritance_collection_collection(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_reference_reference_on_base(bool async) { return base.Nested_include_with_inheritance_reference_reference_on_base(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_without_inheritance_with_filter_reverse(bool async) { return base.Include_reference_without_inheritance_with_filter_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_inheritance(bool async) { return base.Include_collection_with_inheritance(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_reference_collection_reverse(bool async) { return base.Nested_include_with_inheritance_reference_collection_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_inheritance_on_derived_reverse(bool async) { return base.Include_collection_with_inheritance_on_derived_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_inheritance_with_filter_reverse(bool async) { return base.Include_collection_with_inheritance_with_filter_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Collection_projection_on_base_type(bool async) { return base.Collection_projection_on_base_type(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_inheritance_on_derived2(bool async) { return base.Include_collection_with_inheritance_on_derived2(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_collection_reference_on_non_entity_base(bool async) { return base.Nested_include_collection_reference_on_non_entity_base(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_without_inheritance(bool async) { return base.Include_reference_without_inheritance(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_on_derived_with_filter4(bool async) { return base.Include_reference_with_inheritance_on_derived_with_filter4(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance_on_derived1(bool async) { return base.Include_reference_with_inheritance_on_derived1(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Nested_include_with_inheritance_collection_collection_reverse(bool async) { return base.Nested_include_with_inheritance_collection_collection_reverse(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_reference_with_inheritance(bool async) { return base.Include_reference_with_inheritance(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_without_inheritance_with_filter(bool async) { return base.Include_collection_without_inheritance_with_filter(async); } - [GeneratedNameTooLongTheory] + [Theory(Skip = SkipReasons.GeneratedNameTooLong)] [MemberData(nameof(IsAsyncData))] public override Task Include_on_derived_type_with_queryable_Cast(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ManyToManyNoTrackingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ManyToManyNoTrackingQueryFbTest.cs index bc451b955..44f5daabd 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ManyToManyNoTrackingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ManyToManyNoTrackingQueryFbTest.cs @@ -28,21 +28,21 @@ public ManyToManyNoTrackingQueryFbTest(ManyToManyQueryFbFixture fixture) : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where(bool async) { return base.Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_navigation_order_by_single_or_default(bool async) { return base.Skip_navigation_order_by_single_or_default(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where_EF_Property(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ManyToManyQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ManyToManyQueryFbTest.cs index d9a425e7f..ab20a920f 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ManyToManyQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/ManyToManyQueryFbTest.cs @@ -29,21 +29,21 @@ public ManyToManyQueryFbTest(ManyToManyQueryFbFixture fixture) : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where(bool async) { return base.Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_navigation_order_by_single_or_default(bool async) { return base.Skip_navigation_order_by_single_or_default(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where_EF_Property(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/MappingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/MappingQueryFbTest.cs index defaa2ef6..8116390f2 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/MappingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/MappingQueryFbTest.cs @@ -20,6 +20,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -29,25 +30,25 @@ public MappingQueryFbTest(MappingQueryFbFixture fixture) : base(fixture) { } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void All_customers() { base.All_customers(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void All_employees() { base.All_employees(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void All_orders() { base.All_orders(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void Project_nullable_enum() { base.Project_nullable_enum(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs deleted file mode 100644 index a31978ada..000000000 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryFbTest.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* - * The contents of this file are subject to the Initial - * Developer's Public License Version 1.0 (the "License"); - * you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * All Rights Reserved. - */ - -//$Authors = Jiri Cincura (jiri@cincura.net) - -using System.Threading.Tasks; -using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; -using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; -using FirebirdSql.EntityFrameworkCore.Firebird.Infrastructure; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Query; -using Microsoft.EntityFrameworkCore.TestUtilities; -using Xunit; - -namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; - -public class NonSharedPrimitiveCollectionsQueryFbTest(NonSharedFixture fixture) : NonSharedPrimitiveCollectionsQueryRelationalTestBase(fixture) -{ - protected override DbContextOptionsBuilder SetParameterizedCollectionMode(DbContextOptionsBuilder optionsBuilder, - ParameterTranslationMode parameterizedCollectionMode) - { - new FbDbContextOptionsBuilder(optionsBuilder).UseParameterizedCollectionMode(parameterizedCollectionMode); - return optionsBuilder; - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_string() - { - return base.Array_of_string(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_int() - { - return base.Array_of_int(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_long() - { - return base.Array_of_long(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_short() - { - return base.Array_of_short(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_byte() - { - return base.Array_of_byte(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_double() - { - return base.Array_of_double(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_float() - { - return base.Array_of_float(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_decimal() - { - return base.Array_of_decimal(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_DateTime() - { - return base.Array_of_DateTime(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_DateTime_with_milliseconds() - { - return base.Array_of_DateTime_with_milliseconds(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_DateTime_with_microseconds() - { - return base.Array_of_DateTime_with_microseconds(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_DateOnly() - { - return base.Array_of_DateOnly(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_TimeOnly() - { - return base.Array_of_TimeOnly(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_TimeOnly_with_milliseconds() - { - return base.Array_of_TimeOnly_with_milliseconds(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_TimeOnly_with_microseconds() - { - return base.Array_of_TimeOnly_with_microseconds(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_DateTimeOffset() - { - return base.Array_of_DateTimeOffset(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_bool() - { - return base.Array_of_bool(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_Guid() - { - return base.Array_of_Guid(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_byte_array() - { - return base.Array_of_byte_array(); - } - - [NotSupportedOnFirebirdFact] - public override Task Array_of_enum() - { - return base.Array_of_enum(); - } - - [NotSupportedOnFirebirdFact] - public override Task Multidimensional_array_is_not_supported() - { - return base.Multidimensional_array_is_not_supported(); - } - - [NotSupportedOnFirebirdFact] - public override Task Column_with_custom_converter() - { - return base.Column_with_custom_converter(); - } - - [NotSupportedOnFirebirdFact] - public override Task Parameter_with_inferred_value_converter() - { - return base.Parameter_with_inferred_value_converter(); - } - - [NotSupportedOnFirebirdFact] - public override Task Constant_with_inferred_value_converter() - { - return base.Constant_with_inferred_value_converter(); - } - - [NotSupportedOnFirebirdFact] - public override Task Inline_collection_in_query_filter() - { - return base.Inline_collection_in_query_filter(); - } - - [NotSupportedOnFirebirdFact] - public override Task Column_collection_inside_json_owned_entity() - { - return base.Column_collection_inside_json_owned_entity(); - } - - [NotSupportedByProviderTheory] -#pragma warning disable xUnit1016 - [MemberData(nameof(ParameterTranslationModeValues))] -#pragma warning restore xUnit1016 - public override Task Parameter_collection_Count_with_column_predicate_with_default_mode(ParameterTranslationMode mode) - { - return base.Parameter_collection_Count_with_column_predicate_with_default_mode(mode); - } - - [NotSupportedByProviderTheory] -#pragma warning disable xUnit1016 - [MemberData(nameof(ParameterTranslationModeValues))] -#pragma warning restore xUnit1016 - public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Constant(ParameterTranslationMode mode) - { - return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Constant(mode); - } - - [NotSupportedByProviderTheory] -#pragma warning disable xUnit1016 - [MemberData(nameof(ParameterTranslationModeValues))] -#pragma warning restore xUnit1016 - public override Task Parameter_collection_Contains_with_default_mode_EF_Constant(ParameterTranslationMode mode) - { - return base.Parameter_collection_Contains_with_default_mode_EF_Constant(mode); - } - - [NotSupportedByProviderTheory] -#pragma warning disable xUnit1016 - [MemberData(nameof(ParameterTranslationModeValues))] -#pragma warning restore xUnit1016 - public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Parameter(ParameterTranslationMode mode) - { - return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Parameter(mode); - } - - [NotSupportedByProviderTheory] -#pragma warning disable xUnit1016 - [MemberData(nameof(ParameterTranslationModeValues))] -#pragma warning restore xUnit1016 - public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_MultipleParameters(ParameterTranslationMode mode) - { - return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_MultipleParameters(mode); - } - - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; -} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindAggregateOperatorsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindAggregateOperatorsQueryFbTest.cs index 8cd9f61a0..1ed719ea7 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindAggregateOperatorsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindAggregateOperatorsQueryFbTest.cs @@ -18,6 +18,7 @@ using System; using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; @@ -30,14 +31,14 @@ public NorthwindAggregateOperatorsQueryFbTest(NorthwindQueryFbFixture( await base.Contains_with_local_enumerable_inline(async)); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override async Task Contains_with_local_enumerable_inline_closure_mix(bool async) { @@ -96,4 +97,15 @@ public override Task Average_over_nested_subquery(bool async) { return base.Average_over_nested_subquery(async); } + + [Theory] + [MemberData(nameof(IsAsyncData))] + public override Task MinBy_over_subquery(bool async) + { + // FISSA and PARIS both have no orders, hence the minimum is a tie and Firebird 3 returns the other row + var fbTestStore = (FbTestStore)Fixture.TestStore; + if (fbTestStore.ServerLessThan4()) + return Task.CompletedTask; + return base.MinBy_over_subquery(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindCompiledQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindCompiledQueryFbTest.cs index f8eaa9d2c..7fff2b0ae 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindCompiledQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindCompiledQueryFbTest.cs @@ -19,6 +19,7 @@ using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -28,13 +29,13 @@ public NorthwindCompiledQueryFbTest(NorthwindQueryFbFixture : base(fixture) { } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override void Query_with_array_parameter() { base.Query_with_array_parameter(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Query_with_array_parameter_async() { return base.Query_with_array_parameter_async(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindEFPropertyIncludeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindEFPropertyIncludeQueryFbTest.cs index b78628c3e..391318e5f 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindEFPropertyIncludeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindEFPropertyIncludeQueryFbTest.cs @@ -81,28 +81,28 @@ public override Task Include_duplicate_collection_result_operator2(bool async) return base.Include_duplicate_collection_result_operator2(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_multiple_ordering(bool async) { return base.Filtered_include_with_multiple_ordering(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter(bool async) { return base.Include_collection_with_outer_apply_with_filter(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter_non_equality(bool async) { return base.Include_collection_with_outer_apply_with_filter_non_equality(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_cross_apply_with_filter(bool async) { @@ -123,21 +123,21 @@ public override Task Repro9735(bool async) return base.Repro9735(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_reference_GroupBy_Select(bool async) { return base.SelectMany_Include_reference_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_collection_GroupBy_Select(bool async) { return base.SelectMany_Include_collection_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task Join_Include_reference_GroupBy_Select(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindGroupByQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindGroupByQueryFbTest.cs index 9cbb7e6e1..dd7422274 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindGroupByQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindGroupByQueryFbTest.cs @@ -31,14 +31,14 @@ public NorthwindGroupByQueryFbTest(NorthwindQueryFbFixture : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Select_uncorrelated_collection_with_groupby_works(bool async) { return base.Select_uncorrelated_collection_with_groupby_works(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Select_uncorrelated_collection_with_groupby_multiple_collections_work(bool async) { @@ -52,63 +52,63 @@ public override Task GroupBy_scalar_subquery(bool async) return base.GroupBy_scalar_subquery(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task AsEnumerable_in_subquery_for_GroupBy(bool async) { return base.AsEnumerable_in_subquery_for_GroupBy(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_group_by_in_subquery5(bool async) { return base.Complex_query_with_group_by_in_subquery5(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_groupBy_in_subquery1(bool async) { return base.Complex_query_with_groupBy_in_subquery1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_groupBy_in_subquery2(bool async) { return base.Complex_query_with_groupBy_in_subquery2(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_groupBy_in_subquery3(bool async) { return base.Complex_query_with_groupBy_in_subquery3(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_query_with_groupBy_in_subquery4(bool async) { return base.Complex_query_with_groupBy_in_subquery4(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Select_nested_collection_with_groupby(bool async) { return base.Select_nested_collection_with_groupby(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Select_uncorrelated_collection_with_groupby_when_outer_is_distinct(bool async) { return base.Select_uncorrelated_collection_with_groupby_when_outer_is_distinct(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override async Task Select_correlated_collection_after_GroupBy_aggregate_when_identifier_changes_to_complex(bool async) { @@ -118,7 +118,7 @@ public override async Task Select_correlated_collection_after_GroupBy_aggregate_ Assert.Equal(RelationalStrings.InsufficientInformationToIdentifyElementOfCollectionJoin, message); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task GroupBy_aggregate_from_multiple_query_in_same_projection(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindIncludeNoTrackingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindIncludeNoTrackingQueryFbTest.cs index 1f719566f..5dc60bd62 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindIncludeNoTrackingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindIncludeNoTrackingQueryFbTest.cs @@ -30,28 +30,28 @@ public NorthwindIncludeNoTrackingQueryFbTest(NorthwindQueryFbFixture : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_multiple_ordering(bool async) { return base.Filtered_include_with_multiple_ordering(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter(bool async) { return base.Include_collection_with_outer_apply_with_filter(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter_non_equality(bool async) { return base.Include_collection_with_outer_apply_with_filter_non_equality(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_cross_apply_with_filter(bool async) { @@ -128,21 +128,21 @@ public override Task Include_collection_OrderBy_empty_list_does_not_contains(boo return base.Include_collection_OrderBy_empty_list_does_not_contains(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_reference_GroupBy_Select(bool async) { return base.SelectMany_Include_reference_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_collection_GroupBy_Select(bool async) { return base.SelectMany_Include_collection_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task Join_Include_reference_GroupBy_Select(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindJoinQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindJoinQueryFbTest.cs index 752c804f6..5fe43f93e 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindJoinQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindJoinQueryFbTest.cs @@ -50,49 +50,49 @@ public override Task GroupJoin_SelectMany_subquery_with_filter_orderby_and_Defau return base.GroupJoin_SelectMany_subquery_with_filter_orderby_and_DefaultIfEmpty(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_client_eval(bool async) { return base.SelectMany_with_client_eval(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_client_eval_with_collection_shaper(bool async) { return base.SelectMany_with_client_eval_with_collection_shaper(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_client_eval_with_collection_shaper_ignored(bool async) { return base.SelectMany_with_client_eval_with_collection_shaper_ignored(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_selecting_outer_element(bool async) { return base.SelectMany_with_selecting_outer_element(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_selecting_outer_entity(bool async) { return base.SelectMany_with_selecting_outer_entity(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_selecting_outer_entity_column_and_inner_column(bool async) { return base.SelectMany_with_selecting_outer_entity_column_and_inner_column(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Take_in_collection_projection_with_FirstOrDefault_on_top_level(bool async) { @@ -113,10 +113,17 @@ public override Task Unflattened_GroupJoin_composed_2(bool async) return base.Unflattened_GroupJoin_composed_2(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Join_local_collection_int_closure_is_cached_correctly(bool async) { return base.Join_local_collection_int_closure_is_cached_correctly(async); } + + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] + [MemberData(nameof(IsAsyncData))] + public override Task Join_local_string_closure_is_cached_correctly(bool async) + { + return base.Join_local_string_closure_is_cached_correctly(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindKeylessEntitiesQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindKeylessEntitiesQueryFbTest.cs index cc5ce7978..6ba307246 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindKeylessEntitiesQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindKeylessEntitiesQueryFbTest.cs @@ -30,14 +30,14 @@ public NorthwindKeylessEntitiesQueryFbTest(NorthwindQueryFbFixture(() => base.Max_on_empty_sequence_throws(async)); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Complex_nested_query_doesnt_try_binding_to_grandparent_when_parent_returns_complex_result(bool async) { return base.Complex_nested_query_doesnt_try_binding_to_grandparent_when_parent_returns_complex_result(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_distinct_without_default_identifiers_projecting_columns(bool async) { return base.Correlated_collection_with_distinct_without_default_identifiers_projecting_columns(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_distinct_without_default_identifiers_projecting_columns_with_navigation(bool async) { return base.Correlated_collection_with_distinct_without_default_identifiers_projecting_columns_with_navigation(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task DefaultIfEmpty_in_subquery_nested_filter_order_comparison(bool async) { return base.DefaultIfEmpty_in_subquery_nested_filter_order_comparison(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Select_correlated_subquery_ordered(bool async) { return base.Select_correlated_subquery_ordered(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Select_subquery_recursive_trivial(bool async) { return base.Select_subquery_recursive_trivial(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_correlated_subquery_hard(bool async) { @@ -139,21 +139,21 @@ public override Task Entity_equality_orderby_subquery(bool async) return base.Entity_equality_orderby_subquery(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_with_navigation_inside_inline_collection(bool async) { return base.Subquery_with_navigation_inside_inline_collection(async); } - [NotSupportedByProviderTheory] + [Theory(Skip = SkipReasons.NotSupportedByProvider)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_correlated_with_Select_value_type_and_DefaultIfEmpty_in_selector(bool async) { return base.SelectMany_correlated_with_Select_value_type_and_DefaultIfEmpty_in_selector(async); } - [NotSupportedByProviderTheory] + [Theory(Skip = SkipReasons.NotSupportedByProvider)] [MemberData(nameof(IsAsyncData))] public override Task Where_nanosecond_and_microsecond_component(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSelectQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSelectQueryFbTest.cs index a3dcdf99e..578c920d8 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSelectQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSelectQueryFbTest.cs @@ -38,175 +38,175 @@ public override Task Member_binding_after_ctor_arguments_fails_with_client_eval( return AssertTranslationFailed(() => base.Member_binding_after_ctor_arguments_fails_with_client_eval(async)); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projection_containing_DateTime_subtraction(bool async) { return base.Projection_containing_DateTime_subtraction(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Project_single_element_from_collection_with_OrderBy_over_navigation_Take_and_FirstOrDefault_2(bool async) { return base.Project_single_element_from_collection_with_OrderBy_over_navigation_Take_and_FirstOrDefault_2(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Select_nested_collection_deep(bool async) { return base.Select_nested_collection_deep(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_correlated_with_outer_1(bool async) { return base.SelectMany_correlated_with_outer_1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_correlated_with_outer_2(bool async) { return base.SelectMany_correlated_with_outer_1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_correlated_with_outer_3(bool async) { return base.SelectMany_correlated_with_outer_1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_correlated_with_outer_4(bool async) { return base.SelectMany_correlated_with_outer_1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_correlated_with_outer_5(bool async) { return base.SelectMany_correlated_with_outer_1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_correlated_with_outer_6(bool async) { return base.SelectMany_correlated_with_outer_1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_correlated_with_outer_7(bool async) { return base.SelectMany_correlated_with_outer_1(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_with_collection_being_correlated_subquery_which_references_inner_and_outer_entity(bool async) { return base.SelectMany_with_collection_being_correlated_subquery_which_references_inner_and_outer_entity(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_whose_selector_references_outer_source(bool async) { return base.SelectMany_whose_selector_references_outer_source(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Collection_projection_selecting_outer_element_followed_by_take(bool async) { return base.Collection_projection_selecting_outer_element_followed_by_take(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_not_containing_original_identifier(bool async) { return base.Correlated_collection_after_distinct_not_containing_original_identifier(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_with_complex_projection_containing_original_identifier(bool async) { return base.Correlated_collection_after_distinct_with_complex_projection_containing_original_identifier(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_groupby_with_complex_projection_containing_original_identifier(bool async) { return base.Correlated_collection_after_groupby_with_complex_projection_containing_original_identifier(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_after_navigation_and_distinct(bool async) { return base.Projecting_after_navigation_and_distinct(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Select_nested_collection_deep_distinct_no_identifiers(bool async) { return base.Select_nested_collection_deep_distinct_no_identifiers(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Take_on_correlated_collection_in_first(bool async) { return base.Take_on_correlated_collection_in_first(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Take_on_top_level_and_on_collection_projection_with_outer_apply(bool async) { return base.Take_on_top_level_and_on_collection_projection_with_outer_apply(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_groupby_with_complex_projection_not_containing_original_identifier(bool async) { return base.Correlated_collection_after_groupby_with_complex_projection_not_containing_original_identifier(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Reverse_in_projection_subquery(bool async) { return base.Reverse_in_projection_subquery(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Reverse_in_projection_subquery_single_result(bool async) { return base.Reverse_in_projection_subquery_single_result(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Reverse_in_SelectMany_with_Take(bool async) { return base.Reverse_in_SelectMany_with_Take(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Set_operation_in_pending_collection(bool async) { @@ -233,4 +233,11 @@ public override Task SelectMany_with_collection_being_correlated_subquery_which_ .SelectMany_with_collection_being_correlated_subquery_which_references_non_mapped_properties_from_inner_and_outer_entity( async)); } + + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] + [MemberData(nameof(IsAsyncData))] + public override Task SelectMany_over_inline_array_projecting_range_variable_and_outer(bool async) + { + return base.SelectMany_over_inline_array_projecting_range_variable_and_outer(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs index 167f69d17..9a46ab19e 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSetOperationsQueryFbTest.cs @@ -31,7 +31,7 @@ public NorthwindSetOperationsQueryFbTest(NorthwindQueryFbFixture(() => base.Client_eval_Union_FirstOrDefault(async)); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Except_nested2(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQueryFbTest.cs index e42c78daf..133a0fba3 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQueryFbTest.cs @@ -54,49 +54,49 @@ public override Task Include_collection_OrderBy_list_contains(bool async) return base.Include_collection_OrderBy_list_contains(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_multiple_ordering(bool async) { return base.Filtered_include_with_multiple_ordering(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_cross_apply_with_filter(bool async) { return base.Include_collection_with_cross_apply_with_filter(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter_non_equality(bool async) { return base.Include_collection_with_outer_apply_with_filter_non_equality(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter(bool async) { return base.Include_collection_with_outer_apply_with_filter(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task Join_Include_reference_GroupBy_Select(bool async) { return base.Join_Include_reference_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_collection_GroupBy_Select(bool async) { return base.SelectMany_Include_collection_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_reference_GroupBy_Select(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSplitIncludeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSplitIncludeQueryFbTest.cs index 18f4958d0..defd5daac 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSplitIncludeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindSplitIncludeQueryFbTest.cs @@ -54,49 +54,49 @@ public override Task Include_collection_OrderBy_list_contains(bool async) return base.Include_collection_OrderBy_list_contains(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_with_multiple_ordering(bool async) { return base.Filtered_include_with_multiple_ordering(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_cross_apply_with_filter(bool async) { return base.Include_collection_with_cross_apply_with_filter(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter_non_equality(bool async) { return base.Include_collection_with_outer_apply_with_filter_non_equality(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter(bool async) { return base.Include_collection_with_outer_apply_with_filter(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task Join_Include_reference_GroupBy_Select(bool async) { return base.Join_Include_reference_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_collection_GroupBy_Select(bool async) { return base.SelectMany_Include_collection_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_reference_GroupBy_Select(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindStringIncludeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindStringIncludeQueryFbTest.cs index aa31a194c..5efcedbce 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindStringIncludeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/NorthwindStringIncludeQueryFbTest.cs @@ -90,21 +90,21 @@ public override Task Include_duplicate_collection_result_operator2(bool async) return base.Include_duplicate_collection_result_operator2(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_cross_apply_with_filter(bool async) { return base.Include_collection_with_cross_apply_with_filter(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter_non_equality(bool async) { return base.Include_collection_with_outer_apply_with_filter_non_equality(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Include_collection_with_outer_apply_with_filter(bool async) { @@ -121,21 +121,21 @@ public override async Task Include_collection_with_last_no_orderby(bool async) () => base.Include_collection_with_last_no_orderby(async))).Message); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task Join_Include_reference_GroupBy_Select(bool async) { return base.Join_Include_reference_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_collection_GroupBy_Select(bool async) { return base.SelectMany_Include_collection_GroupBy_Select(async); } - [LongExecutionTheory] + [Theory(Skip = SkipReasons.LongExecution)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_Include_reference_GroupBy_Select(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs index 291927353..6e8aa6e0b 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsProceduralFbTest.cs @@ -24,5 +24,5 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class OperatorsProceduralFbTest(NonSharedFixture fixture) : OperatorsProceduralQueryTestBase(fixture) { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs index a4e220c8e..fea0a7a76 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OperatorsQueryFbTest.cs @@ -29,12 +29,12 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class OperatorsQueryFbTest(NonSharedFixture fixture) : OperatorsQueryTestBase(fixture) { - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Concat_and_json_scalar(bool async) { return base.Concat_and_json_scalar(async); } - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OptionalDependentQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OptionalDependentQueryFbTest.cs index 72e33e6b0..42bfad87e 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OptionalDependentQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OptionalDependentQueryFbTest.cs @@ -28,70 +28,70 @@ public OptionalDependentQueryFbTest(OptionalDependentQueryFbFixture fixture) : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Basic_projection_entity_with_all_optional(bool async) { return base.Basic_projection_entity_with_all_optional(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Basic_projection_entity_with_some_required(bool async) { return base.Basic_projection_entity_with_some_required(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filter_nested_optional_dependent_with_all_optional_compared_to_not_null(bool async) { return base.Filter_nested_optional_dependent_with_all_optional_compared_to_not_null(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filter_nested_optional_dependent_with_all_optional_compared_to_null(bool async) { return base.Filter_nested_optional_dependent_with_all_optional_compared_to_null(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filter_nested_optional_dependent_with_some_required_compared_to_not_null(bool async) { return base.Filter_nested_optional_dependent_with_some_required_compared_to_not_null(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filter_nested_optional_dependent_with_some_required_compared_to_null(bool async) { return base.Filter_nested_optional_dependent_with_some_required_compared_to_null(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filter_optional_dependent_with_all_optional_compared_to_not_null(bool async) { return base.Filter_optional_dependent_with_all_optional_compared_to_not_null(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filter_optional_dependent_with_all_optional_compared_to_null(bool async) { return base.Filter_optional_dependent_with_all_optional_compared_to_null(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filter_optional_dependent_with_some_required_compared_to_not_null(bool async) { return base.Filter_optional_dependent_with_some_required_compared_to_not_null(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filter_optional_dependent_with_some_required_compared_to_null(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs index 11f7aef7b..65e6991ba 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedEntityQueryFbTest.cs @@ -15,24 +15,65 @@ //$Authors = Jiri Cincura (jiri@cincura.net) +using System; using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; +using Microsoft.Extensions.Logging; using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class OwnedEntityQueryFbTest(NonSharedFixture fixture) : OwnedEntityQueryRelationalTestBase(fixture) { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_owned_reference_mapped_to_own_table_containing_owned_collection_in_split_query(bool async) { return base.Multiple_owned_reference_mapped_to_own_table_containing_owned_collection_in_split_query(async); } + + // Same as base, but with quoted identifiers in raw SQL. + public override async Task Inconsistent_owned_entity_data_logs_warning_and_does_not_cause_identity_conflict() + { + var contextFactory = await InitializeNonSharedTest( + shouldLogCategory: c => c == DbLoggerCategory.Query.Name, + onConfiguring: b => b.ConfigureWarnings(c => c.Log(CoreEventId.InconsistentOwnedDataWarning)), + seed: async c => + { + var rootEntity = new Context38223.RootEntity + { + Id = Guid.NewGuid(), + Outer = new Context38223.Outer { RequiredProperty = 1, Inner = new Context38223.Inner { InnerProperty = 42 } } + }; + c.Add(rootEntity); + await c.SaveChangesAsync(); + + await c.Database.ExecuteSqlRawAsync( + """UPDATE "RootEntity" SET "Outer_RequiredProperty" = NULL WHERE "Id" = {0}""", rootEntity.Id); + }); + + using var context = contextFactory.CreateDbContext(); + + ListLoggerFactory.Clear(); + + var root = await context.Set().SingleAsync(); + + Assert.NotNull(root); + Assert.Null(root.Outer); + + Assert.Contains( + ListLoggerFactory.Log, + l => l.Id == CoreEventId.InconsistentOwnedDataWarning && l.Level == LogLevel.Warning); + + root.Outer = new Context38223.Outer { RequiredProperty = 1, Inner = new Context38223.Inner { InnerProperty = 2 } }; + + await context.SaveChangesAsync(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedQueryFbTest.cs index 8806524a3..d37adc509 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/OwnedQueryFbTest.cs @@ -30,341 +30,341 @@ public OwnedQueryFbTest(OwnedQueryFbFixture fixture) : base(fixture) { } - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_collection(bool isAsync) => base.Navigation_rewrite_on_owned_collection(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_followed_by_regular_entity(bool isAsync) => base.Navigation_rewrite_on_owned_reference_followed_by_regular_entity(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_another_reference(bool isAsync) => base.Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_another_reference(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_another_reference_and_scalar(bool isAsync) => base.Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_another_reference_and_scalar(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_another_reference_in_predicate_and_projection(bool isAsync) => base.Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_another_reference_in_predicate_and_projection(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_collection(bool isAsync) => base.Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_collection(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_collection_count(bool isAsync) => base.Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_collection_count(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_property(bool isAsync) => base.Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_property(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task No_ignored_include_warning_when_implicit_load(bool isAsync) => base.No_ignored_include_warning_when_implicit_load(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_for_base_type_loads_all_owned_navs(bool isAsync) => base.Query_for_base_type_loads_all_owned_navs(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_for_branch_type_loads_all_owned_navs(bool isAsync) => base.Query_for_branch_type_loads_all_owned_navs(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_for_leaf_type_loads_all_owned_navs(bool isAsync) => base.Query_for_leaf_type_loads_all_owned_navs(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_when_subquery(bool isAsync) => base.Query_when_subquery(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_with_OfType_eagerly_loads_correct_owned_navigations(bool isAsync) => base.Query_with_OfType_eagerly_loads_correct_owned_navigations(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_with_owned_entity_equality_method(bool isAsync) => base.Query_with_owned_entity_equality_method(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_with_owned_entity_equality_object_method(bool isAsync) => base.Query_with_owned_entity_equality_object_method(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_with_owned_entity_equality_operator(bool isAsync) => base.Query_with_owned_entity_equality_operator(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_on_owned_reference_followed_by_regular_entity_and_collection(bool isAsync) => base.SelectMany_on_owned_reference_followed_by_regular_entity_and_collection(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_on_owned_reference_with_entity_in_between_ending_in_owned_collection(bool isAsync) => base.SelectMany_on_owned_reference_with_entity_in_between_ending_in_owned_collection(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_collection_with_composition(bool isAsync) => base.Navigation_rewrite_on_owned_collection_with_composition(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Filter_owned_entity_chained_with_regular_entity_followed_by_projecting_owned_collection(bool isAsync) => base.Filter_owned_entity_chained_with_regular_entity_followed_by_projecting_owned_collection(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_collection_with_composition_complex(bool isAsync) => base.Navigation_rewrite_on_owned_collection_with_composition_complex(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_followed_by_regular_entity_filter(bool isAsync) => base.Navigation_rewrite_on_owned_reference_followed_by_regular_entity_filter(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_projecting_entity(bool isAsync) => base.Navigation_rewrite_on_owned_reference_projecting_entity(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_projecting_scalar(bool isAsync) => base.Navigation_rewrite_on_owned_reference_projecting_scalar(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Preserve_includes_when_applying_skip_take_after_anonymous_type_select(bool isAsync) => base.Preserve_includes_when_applying_skip_take_after_anonymous_type_select(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Project_multiple_owned_navigations(bool isAsync) => base.Project_multiple_owned_navigations(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Project_multiple_owned_navigations_with_expansion_on_owned_collections(bool isAsync) => base.Project_multiple_owned_navigations_with_expansion_on_owned_collections(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_for_branch_type_loads_all_owned_navs_tracking(bool isAsync) => base.Query_for_branch_type_loads_all_owned_navs_tracking(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Query_loads_reference_nav_automatically_in_projection(bool isAsync) => base.Query_loads_reference_nav_automatically_in_projection(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_on_owned_collection(bool isAsync) => base.SelectMany_on_owned_collection(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Set_throws_for_owned_type(bool isAsync) => base.Set_throws_for_owned_type(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Throw_for_owned_entities_without_owner_in_tracking_query(bool isAsync) => base.Throw_for_owned_entities_without_owner_in_tracking_query(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Unmapped_property_projection_loads_owned_navigations(bool isAsync) => base.Unmapped_property_projection_loads_owned_navigations(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Client_method_take_loads_owned_navigations_variation_2(bool isAsync) => base.Client_method_take_loads_owned_navigations_variation_2(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Trying_to_access_non_existent_indexer_property_throws_meaningful_exception(bool isAsync) => base.Trying_to_access_non_existent_indexer_property_throws_meaningful_exception(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Client_method_skip_loads_owned_navigations(bool isAsync) => base.Client_method_skip_loads_owned_navigations(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Indexer_property_is_pushdown_into_subquery(bool isAsync) => base.Indexer_property_is_pushdown_into_subquery(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Query_with_OfType_eagerly_loads_correct_owned_navigations_split(bool isAsync) => base.Query_with_OfType_eagerly_loads_correct_owned_navigations_split(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_OrderBy_owned_indexer_properties(bool isAsync) => base.Can_OrderBy_owned_indexer_properties(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_query_on_indexer_property_when_property_name_from_closure(bool isAsync) => base.Can_query_on_indexer_property_when_property_name_from_closure(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_group_by_converted_indexer_property(bool isAsync) => base.Can_group_by_converted_indexer_property(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Where_collection_navigation_AsEnumerable_Count(bool isAsync) => base.Where_collection_navigation_AsEnumerable_Count(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_project_owned_indexer_properties_converted(bool isAsync) => base.Can_project_owned_indexer_properties_converted(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_group_by_owned_indexer_property(bool isAsync) => base.Can_group_by_owned_indexer_property(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Project_multiple_owned_navigations_split(bool isAsync) => base.Project_multiple_owned_navigations_split(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_project_owned_indexer_properties(bool isAsync) => base.Can_project_owned_indexer_properties(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task NoTracking_Include_with_cycles_throws(bool isAsync) => base.NoTracking_Include_with_cycles_throws(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_indexer_property_ignores_include(bool isAsync) => base.Projecting_indexer_property_ignores_include(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task GroupBy_with_multiple_aggregates_on_owned_navigation_properties(bool isAsync) => base.GroupBy_with_multiple_aggregates_on_owned_navigation_properties(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Using_from_sql_on_owner_generates_join_with_table_for_owned_shared_dependents(bool isAsync) => base.Using_from_sql_on_owner_generates_join_with_table_for_owned_shared_dependents(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Query_when_subquery_split(bool isAsync) => base.Query_when_subquery_split(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_group_by_converted_owned_indexer_property(bool isAsync) => base.Can_group_by_converted_owned_indexer_property(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_project_indexer_properties_converted(bool isAsync) => base.Can_project_indexer_properties_converted(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Query_for_base_type_loads_all_owned_navs_split(bool isAsync) => base.Query_for_base_type_loads_all_owned_navs_split(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_query_on_indexer_properties(bool isAsync) => base.Can_query_on_indexer_properties(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Non_nullable_property_through_optional_navigation(bool isAsync) => base.Non_nullable_property_through_optional_navigation(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Where_collection_navigation_ToArray_Count(bool isAsync) => base.Where_collection_navigation_ToArray_Count(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_OrderBy_indexer_properties_converted(bool isAsync) => base.Can_OrderBy_indexer_properties_converted(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_join_on_indexer_property_on_query(bool isAsync) => base.Can_join_on_indexer_property_on_query(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Where_collection_navigation_ToList_Count_member(bool isAsync) => base.Where_collection_navigation_ToList_Count_member(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_query_on_owned_indexer_properties(bool isAsync) => base.Can_query_on_owned_indexer_properties(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_indexer_property_ignores_include_converted(bool isAsync) => base.Projecting_indexer_property_ignores_include_converted(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Client_method_skip_loads_owned_navigations_variation_2(bool isAsync) => base.Client_method_skip_loads_owned_navigations_variation_2(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Client_method_skip_take_loads_owned_navigations_variation_2(bool isAsync) => base.Client_method_skip_take_loads_owned_navigations_variation_2(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Projecting_collection_correlated_with_keyless_entity_after_navigation_works_using_parent_identifiers(bool isAsync) => base.Projecting_collection_correlated_with_keyless_entity_after_navigation_works_using_parent_identifiers(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_query_on_indexer_properties_split(bool isAsync) => base.Can_query_on_indexer_properties_split(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_collection_split(bool isAsync) => base.Navigation_rewrite_on_owned_reference_followed_by_regular_entity_and_collection_split(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Where_collection_navigation_ToArray_Length_member(bool isAsync) => base.Where_collection_navigation_ToArray_Length_member(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_OrderBy_indexer_properties(bool isAsync) => base.Can_OrderBy_indexer_properties(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Where_owned_collection_navigation_ToList_Count(bool isAsync) => base.Where_owned_collection_navigation_ToList_Count(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Query_on_collection_entry_works_for_owned_collection(bool isAsync) => base.Query_on_collection_entry_works_for_owned_collection(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Client_method_take_loads_owned_navigations(bool isAsync) => base.Client_method_take_loads_owned_navigations(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_group_by_indexer_property(bool isAsync) => base.Can_group_by_indexer_property(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Query_for_branch_type_loads_all_owned_navs_split(bool isAsync) => base.Query_for_branch_type_loads_all_owned_navs_split(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_query_indexer_property_on_owned_collection(bool isAsync) => base.Can_query_indexer_property_on_owned_collection(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Client_method_skip_take_loads_owned_navigations(bool isAsync) => base.Client_method_skip_take_loads_owned_navigations(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Unmapped_property_projection_loads_owned_navigations_split(bool isAsync) => base.Unmapped_property_projection_loads_owned_navigations_split(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_project_indexer_properties(bool isAsync) => base.Can_project_indexer_properties(isAsync); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Ordering_by_identifying_projection(bool isAsync) => base.Ordering_by_identifying_projection(isAsync); - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Filter_on_indexer_using_closure(bool async) { return base.Filter_on_indexer_using_closure(async); } - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [MemberData(nameof(IsAsyncData))] public override Task Filter_on_indexer_using_function_argument(bool async) { return base.Filter_on_indexer_using_function_argument(async); } - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [InlineData(false, false)] [InlineData(false, true)] [InlineData(true, false)] @@ -374,7 +374,7 @@ public override Task NoTracking_Include_with_cycles_does_not_throw_when_performi return base.NoTracking_Include_with_cycles_does_not_throw_when_performing_identity_resolution(async, useAsTracking); } - [HasDataInTheSameTransactionAsDDLTheory] + [Theory(Skip = SkipReasons.HasDataInTheSameTransactionAsDDL)] [InlineData(false, false)] [InlineData(false, true)] [InlineData(true, false)] @@ -384,35 +384,35 @@ public override Task Owned_entity_without_owner_does_not_throw_for_identity_reso return base.Owned_entity_without_owner_does_not_throw_for_identity_resolution(async, useAsTracking); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Can_query_owner_with_different_owned_types_having_same_property_name_in_hierarchy(bool async) { return base.Can_query_owner_with_different_owned_types_having_same_property_name_in_hierarchy(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task GroupBy_aggregate_on_owned_navigation_in_aggregate_selector(bool async) { return base.GroupBy_aggregate_on_owned_navigation_in_aggregate_selector(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Left_join_on_entity_with_owned_navigations(bool async) { return base.Left_join_on_entity_with_owned_navigations(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Left_join_on_entity_with_owned_navigations_complex(bool async) { return base.Left_join_on_entity_with_owned_navigations_complex(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task Simple_query_entity_with_owned_collection(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs index 8d8bd1378..7af71b924 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/PrimitiveCollectionsQueryFbTest.cs @@ -18,6 +18,7 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using FirebirdSql.EntityFrameworkCore.Firebird.Infrastructure; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.EntityFrameworkCore.Query; @@ -32,7 +33,14 @@ public PrimitiveCollectionsQueryFbTest(PrimitiveCollectionsQueryFbFixture fixtur : base(fixture) { } - [ConditionalFact] + protected override DbContextOptionsBuilder SetParameterizedCollectionMode(DbContextOptionsBuilder optionsBuilder, + ParameterTranslationMode parameterizedCollectionMode) + { + new FbDbContextOptionsBuilder(optionsBuilder).UseParameterizedCollectionMode(parameterizedCollectionMode); + return optionsBuilder; + } + + [Fact] public virtual async Task Json_representation_of_bool_array() { await using var context = Fixture.CreateContext(); @@ -43,461 +51,575 @@ await context.Database.SqlQuery($@"SELECT ""Bools"" AS ""Value"" FROM "" .SingleAsync()); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override void Parameter_collection_in_subquery_and_Convert_as_compiled_query() { base.Parameter_collection_in_subquery_and_Convert_as_compiled_query(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query() { return base.Parameter_collection_in_subquery_Union_another_parameter_collection_as_compiled_query(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Any() { return base.Column_collection_Any(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Contains_over_subquery() { return base.Column_collection_Contains_over_subquery(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Count_method() { return base.Column_collection_Count_method(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Count_with_predicate() { return base.Column_collection_Count_with_predicate(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Distinct() { return base.Column_collection_Distinct(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_ElementAt() { return base.Column_collection_ElementAt(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_First() { return base.Column_collection_First(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_FirstOrDefault() { return base.Column_collection_FirstOrDefault(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_in_subquery_Union_parameter_collection() { return base.Column_collection_in_subquery_Union_parameter_collection(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_index_beyond_end() { return base.Column_collection_index_beyond_end(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_index_datetime() { return base.Column_collection_index_datetime(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_index_int() { return base.Column_collection_index_int(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_index_string() { return base.Column_collection_index_string(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Intersect_inline_collection() { return base.Column_collection_Intersect_inline_collection(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Join_parameter_collection() { return base.Column_collection_Join_parameter_collection(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Length() { return base.Column_collection_Length(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_of_bools_Contains() { return base.Column_collection_of_bools_Contains(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_of_ints_Contains() { return base.Column_collection_of_ints_Contains(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_of_nullable_ints_Contains() { return base.Column_collection_of_nullable_ints_Contains(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_of_nullable_ints_Contains_null() { return base.Column_collection_of_nullable_ints_Contains_null(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_of_nullable_strings_contains_null() { return base.Column_collection_of_nullable_strings_contains_null(); } - [NotSupportedOnFirebirdFact] - public override Task Column_collection_of_strings_contains_null() - { - return base.Column_collection_of_strings_contains_null(); - } - - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_OrderByDescending_ElementAt() { return base.Column_collection_OrderByDescending_ElementAt(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_SelectMany() { return base.Column_collection_SelectMany(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_SelectMany_with_filter() { return base.Column_collection_SelectMany_with_filter(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_SelectMany_with_Select_to_anonymous_type() { return base.Column_collection_SelectMany_with_Select_to_anonymous_type(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Single() { return base.Column_collection_Single(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_SingleOrDefault() { return base.Column_collection_SingleOrDefault(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Skip() { return base.Column_collection_Skip(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Skip_Take() { return base.Column_collection_Skip_Take(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Take() { return base.Column_collection_Take(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Union_parameter_collection() { return base.Column_collection_Union_parameter_collection(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Where_Count() { return base.Column_collection_Where_Count(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Where_ElementAt() { return base.Column_collection_Where_ElementAt(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Where_Skip() { return base.Column_collection_Where_Skip(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Where_Skip_Take() { return base.Column_collection_Where_Skip_Take(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Where_Take() { return base.Column_collection_Where_Take(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Column_collection_Where_Union() { return base.Column_collection_Where_Union(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_Count_with_column_predicate_with_EF_Parameter() { return base.Inline_collection_Count_with_column_predicate_with_EF_Parameter(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_Count_with_one_value() { return base.Inline_collection_Count_with_one_value(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_Count_with_two_values() { return base.Inline_collection_Count_with_two_values(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_Count_with_three_values() { return base.Inline_collection_Count_with_three_values(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_Except_column_collection() { return base.Inline_collection_Except_column_collection(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_index_Column() { return base.Inline_collection_index_Column(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_index_Column_with_EF_Constant() { return base.Inline_collection_index_Column_with_EF_Constant(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_Join_ordered_column_collection() { return base.Inline_collection_Join_ordered_column_collection(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_List_value_index_Column() { return base.Inline_collection_List_value_index_Column(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_of_nullable_value_type_Max() { return base.Inline_collection_of_nullable_value_type_Max(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_of_nullable_value_type_Min() { return base.Inline_collection_of_nullable_value_type_Min(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_of_nullable_value_type_with_null_Max() { return base.Inline_collection_of_nullable_value_type_with_null_Max(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_of_nullable_value_type_with_null_Min() { return base.Inline_collection_of_nullable_value_type_with_null_Min(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_value_index_Column() { return base.Inline_collection_value_index_Column(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Inline_collection_with_single_parameter_element_Count() { return base.Inline_collection_with_single_parameter_element_Count(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Non_nullable_reference_column_collection_index_equals_nullable_column() { return base.Non_nullable_reference_column_collection_index_equals_nullable_column(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Nullable_reference_column_collection_index_equals_nullable_column() { return base.Nullable_reference_column_collection_index_equals_nullable_column(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_Concat_column_collection() { return base.Parameter_collection_Concat_column_collection(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_Count() { return base.Parameter_collection_Count(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_Count_with_column_predicate_with_EF_Constant() { return base.Parameter_collection_Count_with_column_predicate_with_EF_Constant(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_ImmutableArray_of_ints_Contains_int() { return base.Parameter_collection_ImmutableArray_of_ints_Contains_int(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_in_subquery_Count_as_compiled_query() { return base.Parameter_collection_in_subquery_Count_as_compiled_query(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_in_subquery_Union_column_collection() { return base.Parameter_collection_in_subquery_Union_column_collection(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_in_subquery_Union_column_collection_as_compiled_query() { return base.Parameter_collection_in_subquery_Union_column_collection_as_compiled_query(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_in_subquery_Union_column_collection_nested() { return base.Parameter_collection_in_subquery_Union_column_collection_nested(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_index_Column_equal_Column() { return base.Parameter_collection_index_Column_equal_Column(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_index_Column_equal_constant() { return base.Parameter_collection_index_Column_equal_constant(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Parameter_collection_Where_with_EF_Constant_Where_Any() { return base.Parameter_collection_Where_with_EF_Constant_Where_Any(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Project_collection_of_datetimes_filtered() { return base.Project_collection_of_datetimes_filtered(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Project_collection_of_ints_ordered() { return base.Project_collection_of_ints_ordered(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Project_collection_of_nullable_ints_with_paging2() { return base.Project_collection_of_nullable_ints_with_paging2(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Project_empty_collection_of_nullables_and_collection_only_containing_nulls() { return base.Project_empty_collection_of_nullables_and_collection_only_containing_nulls(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Project_inline_collection_with_Union() { return base.Project_inline_collection_with_Union(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Project_multiple_collections() { return base.Project_multiple_collections(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Values_of_enum_casted_to_underlying_value() { return base.Values_of_enum_casted_to_underlying_value(); } + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Multidimensional_array_is_not_supported() + { + return base.Multidimensional_array_is_not_supported(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Column_with_custom_converter() + { + return base.Column_with_custom_converter(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Constant_with_inferred_value_converter() + { + return base.Constant_with_inferred_value_converter(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Inline_collection_in_query_filter() + { + return base.Inline_collection_in_query_filter(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Column_collection_inside_json_owned_entity() + { + return base.Column_collection_inside_json_owned_entity(); + } + + [Theory(Skip = SkipReasons.NotSupportedByProvider)] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode(ParameterTranslationMode mode) + { + return base.Parameter_collection_Count_with_column_predicate_with_default_mode(mode); + } + + [Theory(Skip = SkipReasons.NotSupportedByProvider)] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Constant(ParameterTranslationMode mode) + { + return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Constant(mode); + } + + [Theory(Skip = SkipReasons.NotSupportedByProvider)] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Contains_with_default_mode_EF_Constant(ParameterTranslationMode mode) + { + return base.Parameter_collection_Contains_with_default_mode_EF_Constant(mode); + } + + [Theory(Skip = SkipReasons.NotSupportedByProvider)] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Parameter(ParameterTranslationMode mode) + { + return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_Parameter(mode); + } + + [Theory(Skip = SkipReasons.NotSupportedByProvider)] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_Count_with_column_predicate_with_default_mode_EF_MultipleParameters(ParameterTranslationMode mode) + { + return base.Parameter_collection_Count_with_column_predicate_with_default_mode_EF_MultipleParameters(mode); + } + public class PrimitiveCollectionsQueryFbFixture : PrimitiveCollectionsQueryFixtureBase, ITestSqlLoggerFactory { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; public TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Column_collection_of_strings_Contains_null() + { + return base.Column_collection_of_strings_Contains_null(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Column_collection_of_strings_Contains() + { + return base.Column_collection_of_strings_Contains(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Compiled_query_with_uncorrelated_parameter_collection_expression() + { + return base.Compiled_query_with_uncorrelated_parameter_collection_expression(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Inline_collection_SelectMany_with_unreferenced_collection_value() + { + return base.Inline_collection_SelectMany_with_unreferenced_collection_value(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Parameter_collection_empty_Join() + { + return base.Parameter_collection_empty_Join(); + } + + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] +#pragma warning disable xUnit1016 + [MemberData(nameof(ParameterTranslationModeValues))] +#pragma warning restore xUnit1016 + public override Task Parameter_collection_of_enum_Cast_from_different_enum_type(ParameterTranslationMode mode) + { + return base.Parameter_collection_of_enum_Cast_from_different_enum_type(mode); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Subquery_over_primitive_collection_on_inheritance_derived_type() + { + return base.Subquery_over_primitive_collection_on_inheritance_derived_type(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs index 2342605ac..a98dddaca 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SharedTypeQueryFbTest.cs @@ -24,5 +24,5 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public class SharedTypeQueryFbTest(NonSharedFixture fixture) : SharedTypeQueryRelationalTestBase(fixture) { - protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlExecutorFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlExecutorFbTest.cs index 53b19e377..e5247f283 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlExecutorFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlExecutorFbTest.cs @@ -38,7 +38,7 @@ protected override DbParameter CreateDbParameter(string name, object value) protected override string CustomerOrderHistorySproc => throw new NotSupportedException(); protected override string CustomerOrderHistoryWithGeneratedParameterSproc => throw new NotSupportedException(); - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task Executes_stored_procedure(bool async) @@ -46,7 +46,7 @@ public override Task Executes_stored_procedure(bool async) return base.Executes_stored_procedure(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task Executes_stored_procedure_with_generated_parameter(bool async) @@ -54,7 +54,7 @@ public override Task Executes_stored_procedure_with_generated_parameter(bool asy return base.Executes_stored_procedure_with_generated_parameter(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [InlineData(false)] [InlineData(true)] public override Task Executes_stored_procedure_with_parameter(bool async) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs index dd0a61306..7e548d0de 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/SqlQueryFbTest.cs @@ -32,7 +32,7 @@ public SqlQueryFbTest(NorthwindQueryFbFixture fixture) { } // Uses INTERSECT - [NotSupportedByProviderTheory] + [Theory(Skip = SkipReasons.NotSupportedByProvider)] [MemberData(nameof(IsAsyncData))] public override Task Multiple_occurrences_of_SqlQuery_with_db_parameter_adds_two_parameters(bool async) { @@ -74,70 +74,70 @@ public override Task SqlQueryRaw_queryable_simple_projection_composed(bool async return base.SqlQueryRaw_queryable_simple_projection_composed(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_with_dbParameter_mixed_in_subquery(bool async) { return base.SqlQueryRaw_with_dbParameter_mixed_in_subquery(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_queryable_multiple_composed_with_parameters_and_closure_parameters(bool async) { return base.SqlQueryRaw_queryable_multiple_composed_with_parameters_and_closure_parameters(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_queryable_multiple_composed_with_closure_parameters(bool async) { return base.SqlQueryRaw_queryable_multiple_composed_with_closure_parameters(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_queryable_multiple_composed(bool async) { return base.SqlQueryRaw_queryable_multiple_composed(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_in_subquery_with_positional_dbParameter_without_name(bool async) { return base.SqlQueryRaw_in_subquery_with_positional_dbParameter_without_name(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_in_subquery_with_positional_dbParameter_with_name(bool async) { return base.SqlQueryRaw_in_subquery_with_positional_dbParameter_with_name(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_in_subquery_with_dbParameter(bool async) { return base.SqlQueryRaw_in_subquery_with_dbParameter(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_does_not_parameterize_interpolated_string(bool async) { return base.SqlQueryRaw_does_not_parameterize_interpolated_string(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQueryRaw_queryable_with_null_parameter(bool async) { return base.SqlQueryRaw_queryable_with_null_parameter(async); } - [DoesNotHaveTheDataTheory] + [Theory(Skip = SkipReasons.DoesNotHaveTheData)] [MemberData(nameof(IsAsyncData))] public override Task SqlQuery_queryable_multiple_composed_with_parameters_and_closure_parameters_interpolated(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCFiltersInheritanceQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCFiltersInheritanceQueryFbTest.cs index 395a61b57..7103c37d2 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCFiltersInheritanceQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCFiltersInheritanceQueryFbTest.cs @@ -17,6 +17,7 @@ using System.Threading.Tasks; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbFixture.cs index fea02aad8..a38db2a72 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbFixture.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbFixture.cs @@ -19,6 +19,7 @@ using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; using Microsoft.EntityFrameworkCore.TestModels.GearsOfWarModel; using Microsoft.EntityFrameworkCore.TestUtilities; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs index 52df94ce7..2c0937b45 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCGearsOfWarQueryFbTest.cs @@ -19,6 +19,7 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; using Microsoft.EntityFrameworkCore.TestModels.GearsOfWarModel; using Xunit; @@ -55,196 +56,196 @@ public override Task Group_by_on_StartsWith_with_null_parameter_as_argument(bool return base.Group_by_on_StartsWith_with_null_parameter_as_argument(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_after_distinct_3_levels(bool async) { return base.Correlated_collection_after_distinct_3_levels(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_via_SelectMany_with_Distinct_missing_indentifying_columns_in_projection(bool async) { return base.Correlated_collection_via_SelectMany_with_Distinct_missing_indentifying_columns_in_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_distinct_not_projecting_identifier_column(bool async) { return base.Correlated_collection_with_distinct_not_projecting_identifier_column(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_distinct_projecting_identifier_column(bool async) { return base.Correlated_collection_with_distinct_projecting_identifier_column(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_not_projecting_identifier_column_but_only_grouping_key_in_final_projection(bool async) { return base.Correlated_collection_with_groupby_not_projecting_identifier_column_but_only_grouping_key_in_final_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) { return base.Correlated_collection_with_groupby_not_projecting_identifier_column_with_group_aggregate_in_final_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_not_projecting_identifier_column_with_group_aggregate_in_final_projection_multiple_grouping_keys(bool async) { return base.Correlated_collection_with_groupby_not_projecting_identifier_column_with_group_aggregate_in_final_projection_multiple_grouping_keys(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(bool async) { return base.Correlated_collection_with_groupby_with_complex_grouping_key_not_projecting_identifier_column_with_group_aggregate_in_final_projection(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collection_with_inner_collection_references_element_two_levels_up(bool async) { return base.Correlated_collection_with_inner_collection_references_element_two_levels_up(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_inner_subquery_predicate_references_outer_qsre(bool async) { return base.Correlated_collections_inner_subquery_predicate_references_outer_qsre(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_inner_subquery_selector_references_outer_qsre(bool async) { return base.Correlated_collections_inner_subquery_selector_references_outer_qsre(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_nested_inner_subquery_references_outer_qsre_one_level_up(bool async) { return base.Correlated_collections_nested_inner_subquery_references_outer_qsre_one_level_up(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_nested_inner_subquery_references_outer_qsre_two_levels_up(bool async) { return base.Correlated_collections_nested_inner_subquery_references_outer_qsre_two_levels_up(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Correlated_collections_with_Distinct(bool async) { return base.Correlated_collections_with_Distinct(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task DateTimeOffset_Contains_Less_than_Greater_than(bool async) { return base.DateTimeOffset_Contains_Less_than_Greater_than(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task DateTimeOffset_Date_returns_datetime(bool async) { return base.DateTimeOffset_Date_returns_datetime(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task DateTimeOffsetNow_minus_timespan(bool async) { return base.DateTimeOffsetNow_minus_timespan(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_group_join_with_DefaultIfEmpty(bool async) { return base.Outer_parameter_in_group_join_with_DefaultIfEmpty(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_join_key(bool async) { return base.Outer_parameter_in_join_key(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Outer_parameter_in_join_key_inner_and_outer(bool async) { return base.Outer_parameter_in_join_key_inner_and_outer(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task SelectMany_predicate_with_non_equality_comparison_with_Take_doesnt_convert_to_join(bool async) { return base.SelectMany_predicate_with_non_equality_comparison_with_Take_doesnt_convert_to_join(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_projecting_non_nullable_scalar_contains_non_nullable_value_doesnt_need_null_expansion(bool async) { return base.Subquery_projecting_non_nullable_scalar_contains_non_nullable_value_doesnt_need_null_expansion(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_projecting_non_nullable_scalar_contains_non_nullable_value_doesnt_need_null_expansion_negated(bool async) { return base.Subquery_projecting_non_nullable_scalar_contains_non_nullable_value_doesnt_need_null_expansion_negated(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion(bool async) { return base.Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion_negated(bool async) { return base.Subquery_projecting_nullable_scalar_contains_nullable_value_needs_null_expansion_negated(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Subquery_inside_Take_argument(bool async) { return base.Subquery_inside_Take_argument(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Non_string_concat_uses_appropriate_type_mapping(bool async) { return base.Non_string_concat_uses_appropriate_type_mapping(async); } - [NotSupportedByProviderTheory] + [Theory(Skip = SkipReasons.NotSupportedByProvider)] [MemberData(nameof(IsAsyncData))] public override Task Take_without_orderby_followed_by_orderBy_is_pushed_down1(bool async) { @@ -257,4 +258,11 @@ public override Task Take_without_orderby_followed_by_orderBy_is_pushed_down2(bo { return base.Take_without_orderby_followed_by_orderBy_is_pushed_down2(async); } + + [Theory(Skip = "Different implicit ordering on Firebird.")] + [MemberData(nameof(IsAsyncData))] + public override Task String_concat_with_null_conditional_argument(bool async) + { + return base.String_concat_with_null_conditional_argument(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbFixtureBase.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbFixtureBase.cs index 0c028635a..1418e8e47 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbFixtureBase.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbFixtureBase.cs @@ -16,7 +16,11 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; +using Microsoft.EntityFrameworkCore.TestModels.InheritanceModel; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -24,4 +28,16 @@ namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; public abstract class TPCInheritanceQueryFbFixtureBase : TPCInheritanceQueryFixture { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + + // Complex collections are mapped to JSON, which is not supported on Firebird. + public override bool EnableComplexTypes => false; + + public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) + => base.AddOptions(builder).ConfigureWarnings(w => w.Ignore(CoreEventId.MappedComplexPropertyIgnoredWarning)); + + protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) + { + base.OnModelCreating(modelBuilder, context); + modelBuilder.Entity().Ignore(x => x.ComplexTypeCollection); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbTest.cs index 026610653..f8edb9584 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbTest.cs @@ -15,7 +15,7 @@ //$Authors = Jiri Cincura (jiri@cincura.net) -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbTestBase.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbTestBase.cs index 4f2630de3..da8cabad7 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbTestBase.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryFbTestBase.cs @@ -15,8 +15,11 @@ //$Authors = Jiri Cincura (jiri@cincura.net) +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; -using Xunit.Abstractions; +using Microsoft.EntityFrameworkCore.Query.Inheritance; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -26,4 +29,11 @@ public abstract class TPCInheritanceQueryFbTestBase : TPCInheritanceQu protected TPCInheritanceQueryFbTestBase(TFixture fixture, ITestOutputHelper testOutputHelper) : base(fixture, testOutputHelper) { } + + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] + [MemberData(nameof(IsAsyncData))] + public override Task Primitive_collection_on_subtype(bool async) + { + return base.Primitive_collection_on_subtype(async); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryHiLoFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryHiLoFbFixture.cs index bf9dfc1ae..7c4e00ac7 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryHiLoFbFixture.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryHiLoFbFixture.cs @@ -23,6 +23,8 @@ public class TPCInheritanceQueryHiLoFbFixture : TPCInheritanceQueryFbFixtureBase { protected override string StoreName => "TPCHiLoInheritanceTest"; + public override bool UseGeneratedKeys => true; + protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { modelBuilder.UseHiLo(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryHiLoFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryHiLoFbTest.cs index 39a6d588d..954da0b01 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryHiLoFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCInheritanceQueryHiLoFbTest.cs @@ -15,7 +15,7 @@ //$Authors = Jiri Cincura (jiri@cincura.net) -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyNoTrackingQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyNoTrackingQueryFbTest.cs index 8af40881d..1ee64a534 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyNoTrackingQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyNoTrackingQueryFbTest.cs @@ -18,6 +18,7 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -28,21 +29,21 @@ public TPCManyToManyNoTrackingQueryFbTest(TPCManyToManyQueryFbFixture fixture) : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where(bool async) { return base.Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_navigation_order_by_single_or_default(bool async) { return base.Skip_navigation_order_by_single_or_default(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where_EF_Property(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyQueryFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyQueryFbFixture.cs index 57618e697..c079bbc71 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyQueryFbFixture.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyQueryFbFixture.cs @@ -19,6 +19,7 @@ using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyQueryFbTest.cs index be8654380..d41c792f7 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCManyToManyQueryFbTest.cs @@ -18,6 +18,7 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -28,21 +29,21 @@ public TPCManyToManyQueryFbTest(TPCManyToManyQueryFbFixture fixture) : base(fixture) { } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where(bool async) { return base.Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Skip_navigation_order_by_single_or_default(bool async) { return base.Skip_navigation_order_by_single_or_default(async); } - [NotSupportedOnFirebirdTheory] + [Theory(Skip = SkipReasons.NotSupportedOnFirebird)] [MemberData(nameof(IsAsyncData))] public override Task Filtered_include_skip_navigation_order_by_skip_take_then_include_skip_navigation_where_EF_Property(bool async) { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCRelationshipsQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCRelationshipsQueryFbTest.cs index 4c7bf745e..a672836db 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCRelationshipsQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPCRelationshipsQueryFbTest.cs @@ -17,6 +17,7 @@ using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; using Microsoft.EntityFrameworkCore.TestUtilities; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHFiltersInheritanceQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHFiltersInheritanceQueryFbTest.cs index 895bb9624..678f1a5a7 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHFiltersInheritanceQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHFiltersInheritanceQueryFbTest.cs @@ -16,6 +16,7 @@ //$Authors = Jiri Cincura (jiri@cincura.net) using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHInheritanceQueryFbFixture.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHInheritanceQueryFbFixture.cs index b12c114b1..b2803ed79 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHInheritanceQueryFbFixture.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHInheritanceQueryFbFixture.cs @@ -17,7 +17,9 @@ using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.EntityFrameworkCore.Query; +using Microsoft.EntityFrameworkCore.Query.Inheritance; using Microsoft.EntityFrameworkCore.TestModels.InheritanceModel; using Microsoft.EntityFrameworkCore.TestUtilities; @@ -27,9 +29,16 @@ public class TPHInheritanceQueryFbFixture : TPHInheritanceQueryFixture { protected override ITestStoreFactory TestStoreFactory => FbTestStoreFactory.Instance; + // Complex collections are mapped to JSON, which is not supported on Firebird. + public override bool EnableComplexTypes => false; + + public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) + => base.AddOptions(builder).ConfigureWarnings(w => w.Ignore(CoreEventId.MappedComplexPropertyIgnoredWarning)); + protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { base.OnModelCreating(modelBuilder, context); + modelBuilder.Entity().Ignore(x => x.ComplexTypeCollection); modelBuilder.Entity().ToSqlQuery(@"SELECT * FROM ""Animals"""); } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHInheritanceQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHInheritanceQueryFbTest.cs index 3b50b792f..023024607 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHInheritanceQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPHInheritanceQueryFbTest.cs @@ -15,8 +15,11 @@ //$Authors = Jiri Cincura (jiri@cincura.net) +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; -using Xunit.Abstractions; +using Microsoft.EntityFrameworkCore.Query.Inheritance; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -25,4 +28,11 @@ public class TPHInheritanceQueryFbTest : TPHInheritanceQueryTestBase FbTestStoreFactory.Instance; + // Complex collections are mapped to JSON, which is not supported on Firebird. + public override bool EnableComplexTypes => false; + + public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) + => base.AddOptions(builder).ConfigureWarnings(w => w.Ignore(CoreEventId.MappedComplexPropertyIgnoredWarning)); + protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) { base.OnModelCreating(modelBuilder, context); + modelBuilder.Entity().Ignore(x => x.ComplexTypeCollection); modelBuilder.Entity().Property(x => x.Id).UseSequenceTrigger(); modelBuilder.Entity().Property(x => x.Id).UseSequenceTrigger(); } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTInheritanceQueryFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTInheritanceQueryFbTest.cs index f6fa61657..0410c0686 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTInheritanceQueryFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/TPTInheritanceQueryFbTest.cs @@ -15,8 +15,11 @@ //$Authors = Jiri Cincura (jiri@cincura.net) +using System.Threading.Tasks; +using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query; -using Xunit.Abstractions; +using Microsoft.EntityFrameworkCore.Query.Inheritance; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query; @@ -25,4 +28,11 @@ public class TPTInheritanceQueryFbTest : TPTInheritanceQueryTestBase FbTestStoreFactory.Instance; + protected override ITestStoreFactory NonSharedTestStoreFactory => FbTestStoreFactory.Instance; public override async Task Entity_type_with_navigation_mapped_to_SqlQuery(bool async) { - var contextFactory = await InitializeAsync( + var contextFactory = await InitializeNonSharedTest( seed: async c => { var author = new Author { Name = "Toast", Posts = { new Post { Title = "Sausages of the world!" } } }; @@ -44,7 +44,7 @@ public override async Task Entity_type_with_navigation_mapped_to_SqlQuery(bool a await c.SaveChangesAsync(); }); - using var context = contextFactory.CreateContext(); + using var context = contextFactory.CreateDbContext(); var authors = await (from o in context.Authors diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs index 3ecf0647e..355e26710 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/ByteArrayTranslationsFbTest.cs @@ -18,7 +18,7 @@ using System.Threading.Tasks; using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query.Translations; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; @@ -31,15 +31,21 @@ public ByteArrayTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutput Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task First() { return base.First(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Index() { return base.Index(); } + + [Fact(Skip = SkipReasons.NotSupportedByProvider)] + public override Task Any() + { + return base.Any(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs index 4dd719401..d2c696e07 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/EnumTranslationsFbTest.cs @@ -18,7 +18,6 @@ using Microsoft.EntityFrameworkCore.Query.Translations; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs index ab3c3fd0a..b33a4528a 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/GuidTranslationsFbTest.cs @@ -16,7 +16,7 @@ //$Authors = Niek Schoemaker (@niekschoemaker) using Microsoft.EntityFrameworkCore.Query.Translations; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs index 25869915a..871dffa09 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MathTranslationsFbTest.cs @@ -20,7 +20,6 @@ using Microsoft.EntityFrameworkCore.Query.Translations; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; @@ -33,188 +32,188 @@ public MathTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputHelpe Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Acos_float() { return base.Acos_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Acosh() { return base.Acosh(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Asin_float() { return base.Asin_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Asinh() { return base.Asinh(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Atan_float() { return base.Atan_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Atanh() { return base.Atanh(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Atan2_float() { return base.Atan2_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Ceiling_float() { return base.Ceiling_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Cos_float() { return base.Cos_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Cosh() { return base.Cosh(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Degrees() { return base.Degrees(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Degrees_float() { return base.Degrees_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Exp_float() { return base.Exp_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Floor_float() { return base.Floor_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Log_float() { return base.Log_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Log_with_newBase_float() { return base.Log_with_newBase_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Log10_float() { return base.Log10_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Log2() { return base.Log2(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Power_float() { return base.Power_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Radians() { return base.Radians(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Radians_float() { return base.Radians_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Round_float() { return base.Round_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Round_with_digits_float() { return base.Round_with_digits_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Sign_float() { return base.Sign_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Sin_float() { return base.Sin_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Sinh() { return base.Sinh(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Sqrt_float() { return base.Sqrt_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Tan_float() { return base.Tan_float(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Tanh() { return base.Tanh(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Truncate_float() { return base.Truncate_float(); } // Round itself works here, but the where clause (255.1) is not translated correctly (255.09999) due to floating point error - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Round_with_digits_double() { return base.Round_with_digits_double(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs index 76bc8bf36..bfe73fe3b 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/MiscellaneousTranslationsFbTest.cs @@ -20,7 +20,6 @@ using Microsoft.EntityFrameworkCore.Query.Translations; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; @@ -35,51 +34,87 @@ public MiscellaneousTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOu - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Convert_ToBoolean() { return base.Convert_ToBoolean(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Convert_ToByte() { return base.Convert_ToByte(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Convert_ToDecimal() { return base.Convert_ToDecimal(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Convert_ToDouble() { return base.Convert_ToDouble(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Convert_ToInt16() { return base.Convert_ToInt16(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Convert_ToInt32() { return base.Convert_ToInt32(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Convert_ToInt64() { return base.Convert_ToInt64(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Convert_ToString() { return base.Convert_ToString(); } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Byte_Parse() + { + return base.Byte_Parse(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Decimal_Parse() + { + return base.Decimal_Parse(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Double_Parse() + { + return base.Double_Parse(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Int_Parse() + { + return base.Int_Parse(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Long_Parse() + { + return base.Long_Parse(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Short_Parse() + { + return base.Short_Parse(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs index c575858ae..bd28f45ef 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ArithmeticOperatorTranslationsFbTest.cs @@ -17,7 +17,7 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Operators; using Microsoft.EntityFrameworkCore.TestUtilities; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs index b21abe185..71f778938 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/BitwiseOperatorTranslationsFbTest.cs @@ -19,7 +19,7 @@ using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers; using Microsoft.EntityFrameworkCore.Query.Translations.Operators; using Microsoft.EntityFrameworkCore.TestUtilities; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; @@ -32,11 +32,11 @@ public BitwiseOperatorTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITest Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Left_shift() => base.Left_shift(); - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Right_shift() => base.Right_shift(); } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs index a6eaa34a2..9fd83c77d 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/ComparisonOperatorTranslationsFbTest.cs @@ -17,7 +17,7 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Operators; using Microsoft.EntityFrameworkCore.TestUtilities; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs index 88dc4d17c..a4e265a0d 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/LogicalOperatorTranslationsFbTest.cs @@ -17,7 +17,7 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Operators; using Microsoft.EntityFrameworkCore.TestUtilities; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs index 8597e053e..52425cda6 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Operators/MiscellaneousOperatorTranslationsFbTest.cs @@ -17,7 +17,7 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Operators; using Microsoft.EntityFrameworkCore.TestUtilities; -using Xunit.Abstractions; +using Xunit; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Operators; diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs index 025827939..92f526dcb 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/StringTranslationsFbTest.cs @@ -20,7 +20,6 @@ using Microsoft.EntityFrameworkCore.Query.Translations; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations; @@ -38,157 +37,157 @@ protected override void ClearLog() Fixture.TestSqlLoggerFactory.Clear(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task TrimStart_with_char_array_argument() { return base.TrimStart_with_char_array_argument(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task TrimEnd_with_char_array_argument() { return base.TrimEnd_with_char_array_argument(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Trim_with_char_array_argument_in_predicate() { return base.Trim_with_char_array_argument_in_predicate(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Regex_IsMatch() { return base.Regex_IsMatch(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Regex_IsMatch_constant_input() { return base.Regex_IsMatch_constant_input(); } - [ConditionalFact] + [Fact] public override Task Join_non_aggregate() { return AssertTranslationFailed(() => base.Join_non_aggregate()); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Contains_Literal_Char() { return base.Contains_Literal_Char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Contains_with_StringComparison_Ordinal() { return base.Contains_with_StringComparison_Ordinal(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Contains_with_StringComparison_OrdinalIgnoreCase() { return base.Contains_with_StringComparison_OrdinalIgnoreCase(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task EndsWith_Literal_Char() { return base.EndsWith_Literal_Char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task EndsWith_Parameter_Char() { return base.EndsWith_Parameter_Char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task EndsWith_with_StringComparison_Ordinal() { return base.EndsWith_with_StringComparison_Ordinal(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task EndsWith_with_StringComparison_OrdinalIgnoreCase() { return base.EndsWith_with_StringComparison_OrdinalIgnoreCase(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Equals_with_Ordinal() { return base.Equals_with_Ordinal(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Equals_with_OrdinalIgnoreCase() { return base.Equals_with_OrdinalIgnoreCase(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task IndexOf_Char() { return base.IndexOf_Char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task IndexOf_with_constant_starting_position_char() { return base.IndexOf_with_constant_starting_position_char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task IndexOf_with_one_parameter_arg_char() { return base.IndexOf_with_one_parameter_arg_char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task IndexOf_with_parameter_starting_position_char() { return base.IndexOf_with_parameter_starting_position_char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Replace_Char() { return base.Replace_Char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task StartsWith_Literal_Char() { return base.StartsWith_Literal_Char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task StartsWith_Parameter_Char() { return base.StartsWith_Parameter_Char(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task StartsWith_with_StringComparison_Ordinal() { return base.StartsWith_with_StringComparison_Ordinal(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task StartsWith_with_StringComparison_OrdinalIgnoreCase() { return base.StartsWith_with_StringComparison_OrdinalIgnoreCase(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Static_Equals_with_Ordinal() { return base.Static_Equals_with_Ordinal(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Static_Equals_with_OrdinalIgnoreCase() { return base.Static_Equals_with_OrdinalIgnoreCase(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs index 898a44502..55604ded5 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateOnlyTranslationsFbTest.cs @@ -20,7 +20,6 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; @@ -33,43 +32,43 @@ public DateOnlyTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputH Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task DayNumber() { return base.DayNumber(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task DayNumber_subtraction() { return base.DayNumber_subtraction(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task ToDateTime_constant_DateTime_with_property_TimeOnly() { return base.ToDateTime_constant_DateTime_with_property_TimeOnly(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task ToDateTime_property_with_constant_TimeOnly() { return base.ToDateTime_property_with_constant_TimeOnly(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task ToDateTime_property_with_property_TimeOnly() { return base.ToDateTime_property_with_property_TimeOnly(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task ToDateTime_with_complex_DateTime() { return base.ToDateTime_with_complex_DateTime(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task ToDateTime_with_complex_TimeOnly() { return base.ToDateTime_with_complex_TimeOnly(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs index 99e4f57ea..e8d655f51 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeOffsetTranslationsFbTest.cs @@ -20,7 +20,6 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; @@ -35,105 +34,141 @@ public DateTimeOffsetTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestO - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Now() { return base.Now(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task UtcNow() { return base.UtcNow(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task AddMilliseconds() { return base.AddMilliseconds(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task AddMinutes() { return base.AddMinutes(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Date() { return base.Date(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Day() { return base.Day(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task DayOfYear() { return base.DayOfYear(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Hour() { return base.Hour(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Microsecond() { return base.Microsecond(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Millisecond() { return base.Millisecond(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Minute() { return base.Minute(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Month() { return base.Month(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Nanosecond() { return base.Nanosecond(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Second() { return base.Second(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task ToUnixTimeMilliseconds() { return base.ToUnixTimeMilliseconds(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task ToUnixTimeSecond() { return base.ToUnixTimeSecond(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Year() { return base.Year(); } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Ctor_DateTime_TimeSpan() + { + return base.Ctor_DateTime_TimeSpan(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task Ctor_DateTime() + { + return base.Ctor_DateTime(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task DateTime() + { + return base.DateTime(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task LocalDateTime() + { + return base.LocalDateTime(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task ToOffset() + { + return base.ToOffset(); + } + + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] + public override Task UtcDateTime() + { + return base.UtcDateTime(); + } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs index 39e0c94b0..5468a9f78 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsFbTest.cs @@ -20,7 +20,6 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; @@ -35,19 +34,19 @@ public DateTimeTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputH - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task UtcNow() { return base.UtcNow(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task subtract_and_TotalDays() { return base.subtract_and_TotalDays(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task TimeOfDay() { return base.TimeOfDay(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs index 663105e06..097ff2978 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeOnlyTranslationsFbTest.cs @@ -20,7 +20,6 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; @@ -33,31 +32,31 @@ public TimeOnlyTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputH Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Add_TimeSpan() { return base.Add_TimeSpan(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task IsBetween() { return base.IsBetween(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Microsecond() { return base.Microsecond(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Nanosecond() { return base.Nanosecond(); } - [NotSupportedByProviderFact] + [Fact(Skip = SkipReasons.NotSupportedByProvider)] public override Task Subtract() { return base.Subtract(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs index c853a74f2..8571e49af 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/Translations/Temporal/TimeSpanTranslationsFbTest.cs @@ -20,7 +20,6 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; -using Xunit.Abstractions; namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query.Translations.Temporal; @@ -33,13 +32,13 @@ public TimeSpanTranslationsFbTest(BasicTypesQueryFbFixture fixture, ITestOutputH Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Microseconds() { return base.Microseconds(); } - [NotSupportedOnFirebirdFact] + [Fact(Skip = SkipReasons.NotSupportedOnFirebird)] public override Task Nanoseconds() { return base.Nanoseconds(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs index bc4c0cc2b..36c0d6c6c 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/Query/UdfDbFunctionFbTests.cs @@ -59,55 +59,55 @@ public override void QF_Correlated_Func_Call_With_Navigation() base.QF_Correlated_Func_Call_With_Navigation(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void QF_CrossJoin_Not_Correlated() { base.QF_CrossJoin_Not_Correlated(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void DbSet_mapped_to_function() { base.DbSet_mapped_to_function(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void QF_LeftJoin_Select_Result() { base.QF_LeftJoin_Select_Result(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void QF_Join() { base.QF_Join(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void QF_LeftJoin_Select_Anonymous() { base.QF_LeftJoin_Select_Anonymous(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void QF_Stand_Alone_Parameter() { base.QF_Stand_Alone_Parameter(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void QF_Stand_Alone() { base.QF_Stand_Alone(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void QF_Nested() { base.QF_Nested(); } - [DoesNotHaveTheDataFact] + [Fact(Skip = SkipReasons.DoesNotHaveTheData)] public override void QF_CrossJoin_Parameter() { base.QF_CrossJoin_Parameter(); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/UpdatesFbTest.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/UpdatesFbTest.cs index 1b5909bcb..ac92d66dc 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/UpdatesFbTest.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/UpdatesFbTest.cs @@ -51,7 +51,7 @@ public override void Identifiers_are_generated_correctly() "FK_LoginEntityTypeWithAnExtrem~", entityType.GetForeignKeys().Single().GetConstraintName()); Assert.Equal( - "IX_LoginEntityTypeWithAnExtrem~", + "IX_LoginEntityTypeWithAnExtre~1", entityType.GetIndexes().Single().GetDatabaseName()); } } diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj index 97754a322..65df3e775 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj @@ -1,6 +1,6 @@  - net10.0 + net11.0 false false true diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Migrations/MigrationsTests.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Migrations/MigrationsTests.cs index eabcd1bcc..bc951ffed 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Migrations/MigrationsTests.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird.Tests/Migrations/MigrationsTests.cs @@ -292,6 +292,23 @@ public async Task AddColumn() Assert.AreEqual(NewLineEnd(@"ALTER TABLE ""schema"".""People"" ADD ""NewColumn"" DECIMAL(18,2) NOT NULL;"), batch[0].CommandText); } + [Test] + public async Task AddColumnWithPrecisionAndScale() + { + var operation = new AddColumnOperation() + { + Table = "People", + Name = "NewColumn", + ClrType = typeof(decimal), + Precision = 18, + Scale = 6, + IsNullable = false, + }; + var batch = await Generate(new[] { operation }); + Assert.AreEqual(1, batch.Count()); + Assert.AreEqual(NewLineEnd(@"ALTER TABLE ""People"" ADD ""NewColumn"" DECIMAL(18,6) NOT NULL;"), batch[0].CommandText); + } + [Test] public async Task AddColumnWithCollation() { diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj b/src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj index 4baf2bd0c..989625c7c 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/FirebirdSql.EntityFrameworkCore.Firebird.csproj @@ -1,6 +1,6 @@  - net10.0 + net11.0 FirebirdSql.EntityFrameworkCore.Firebird FirebirdSql.EntityFrameworkCore.Firebird true diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Infrastructure/Internal/FbModelValidator.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Infrastructure/Internal/FbModelValidator.cs index cbcbf2b53..991c28d8e 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Infrastructure/Internal/FbModelValidator.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Infrastructure/Internal/FbModelValidator.cs @@ -30,8 +30,9 @@ public FbModelValidator(ModelValidatorDependencies dependencies, RelationalModel : base(dependencies, relationalDependencies) { } - protected override void ValidateValueGeneration(IEntityType entityType, IKey key, IDiagnosticsLogger logger) + protected override void ValidateValueGeneration(IKey key, IDiagnosticsLogger logger) { + var entityType = key.DeclaringEntityType; if (entityType.GetMappingStrategy() == RelationalAnnotationNames.TpcMappingStrategy && entityType.BaseType == null) { foreach (var storeGeneratedProperty in key.Properties.Where(p => (p.ValueGenerated & ValueGenerated.OnAdd) != 0 && p.GetValueGenerationStrategy() == FbValueGenerationStrategy.IdentityColumn)) diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs index bb2f29f17..ed5b61607 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Query/Internal/FbQuerySqlGenerator.cs @@ -330,6 +330,23 @@ void GenerateApplySource(TableExpressionBase source) } } + // Quoted collation name would be case sensitive, hence keeping it unquoted and allowing only regular identifier characters. + protected override Expression VisitCollate(CollateExpression collateExpression) + { + Visit(collateExpression.Operand); + foreach (var c in collateExpression.Collation) + { + if (!char.IsAsciiLetterOrDigit(c) && c != '_' && c != '$') + { + throw new InvalidOperationException($"Invalid collation name '{collateExpression.Collation}'."); + } + } + Sql + .Append(" COLLATE ") + .Append(collateExpression.Collation); + return collateExpression; + } + protected override void GeneratePseudoFromClause() { Sql.Append(" FROM RDB$DATABASE"); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Storage/Internal/FbDecimalTypeMapping.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Storage/Internal/FbDecimalTypeMapping.cs new file mode 100644 index 000000000..01a4ce3ea --- /dev/null +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Storage/Internal/FbDecimalTypeMapping.cs @@ -0,0 +1,42 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * All Rights Reserved. + */ + +//$Authors = Jiri Cincura (jiri@cincura.net) + +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Json; + +namespace FirebirdSql.EntityFrameworkCore.Firebird.Storage.Internal; + +public class FbDecimalTypeMapping : DecimalTypeMapping +{ + // The store type is built from precision and scale, so it reflects the configured facets. + public FbDecimalTypeMapping(string storeType, int precision, int scale) + : base(new RelationalTypeMappingParameters( + new CoreTypeMappingParameters(typeof(decimal), jsonValueReaderWriter: JsonDecimalReaderWriter.Instance), + storeType, + StoreTypePostfix.PrecisionAndScale, + System.Data.DbType.Decimal, + precision: precision, + scale: scale)) + { } + + protected FbDecimalTypeMapping(RelationalTypeMappingParameters parameters) + : base(parameters) + { } + + protected override RelationalTypeMapping Clone(RelationalTypeMappingParameters parameters) + => new FbDecimalTypeMapping(parameters); +} diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/Storage/Internal/FbTypeMappingSource.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/Storage/Internal/FbTypeMappingSource.cs index 9e41a9efb..66dd2b7fd 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/Storage/Internal/FbTypeMappingSource.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/Storage/Internal/FbTypeMappingSource.cs @@ -46,7 +46,7 @@ public class FbTypeMappingSource : RelationalTypeMappingSource readonly FloatTypeMapping _float = new FloatTypeMapping("FLOAT"); readonly DoubleTypeMapping _double = new DoubleTypeMapping("DOUBLE PRECISION"); - readonly DecimalTypeMapping _decimal = new DecimalTypeMapping($"DECIMAL({DefaultDecimalPrecision},{DefaultDecimalScale})"); + readonly FbDecimalTypeMapping _decimal = new FbDecimalTypeMapping("DECIMAL", DefaultDecimalPrecision, DefaultDecimalScale); readonly FbDateTimeTypeMapping _timestamp = new FbDateTimeTypeMapping("TIMESTAMP", FbDbType.TimeStamp); readonly FbDateTimeTypeMapping _date = new FbDateTimeTypeMapping("DATE", FbDbType.Date); diff --git a/src/FirebirdSql.EntityFrameworkCore.Firebird/ValueGeneration/Internal/FbValueGeneratorSelector.cs b/src/FirebirdSql.EntityFrameworkCore.Firebird/ValueGeneration/Internal/FbValueGeneratorSelector.cs index 4e01ee43b..53c89057f 100644 --- a/src/FirebirdSql.EntityFrameworkCore.Firebird/ValueGeneration/Internal/FbValueGeneratorSelector.cs +++ b/src/FirebirdSql.EntityFrameworkCore.Firebird/ValueGeneration/Internal/FbValueGeneratorSelector.cs @@ -44,19 +44,6 @@ public FbValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies, public new virtual IFbValueGeneratorCache Cache => (IFbValueGeneratorCache)base.Cache; - [Obsolete("Use TrySelect and throw if needed when the generator is not found.")] - public override ValueGenerator Select(IProperty property, ITypeBase entityType) - { - if (TrySelect(property, entityType, out var generator)) - { - return generator; - } - - throw new ArgumentException( - CoreStrings.InvalidValueGeneratorFactoryProperty( - nameof(FbSequenceValueGeneratorFactory), property.Name, property.DeclaringType.DisplayName())); - } - public override bool TrySelect(IProperty property, ITypeBase entityType, out ValueGenerator valueGenerator) { if (property.GetValueGeneratorFactory() != null diff --git a/src/Versions.props b/src/Versions.props index e134dd2ec..96f4dc0f7 100644 --- a/src/Versions.props +++ b/src/Versions.props @@ -5,9 +5,9 @@ - 13.0.0 + 14.0.0-rc1 10.3.4 - 10.0.0 + 11.0.0 diff --git a/tests.ps1 b/tests.ps1 index b3e840596..495237431 100644 --- a/tests.ps1 +++ b/tests.ps1 @@ -28,9 +28,8 @@ $FirebirdConfiguration = @{ } } -$frameworkVersion = 'net11.0' $testsBaseDir = "$baseDir\src\FirebirdSql.Data.FirebirdClient.Tests" -$testsProviderDir = "$testsBaseDir\bin\$Configuration\$frameworkVersion" +$testsProviderDir = "$testsBaseDir\bin\$Configuration\net11.0" $firebirdProcess = $null @@ -131,7 +130,7 @@ function Tests-FirebirdClient($serverType, $compression, $wireCrypt) { } function Tests-EF6() { - pushd "$baseDir\src\EntityFramework.Firebird.Tests\bin\$Configuration\$frameworkVersion" + pushd "$baseDir\src\EntityFramework.Firebird.Tests\bin\$Configuration\net11.0" try { .\EntityFramework.Firebird.Tests.exe --labels=All Check-ExitCode @@ -142,7 +141,7 @@ function Tests-EF6() { } function Tests-EFCore() { - pushd "$baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird.Tests\bin\$Configuration\net10.0" + pushd "$baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird.Tests\bin\$Configuration\net11.0" try { .\FirebirdSql.EntityFrameworkCore.Firebird.Tests.exe --labels=All Check-ExitCode From af956d0590c820beafee70ed645d69a144f90924 Mon Sep 17 00:00:00 2001 From: Jiri Cincura Date: Thu, 19 Nov 2026 08:59:02 +0100 Subject: [PATCH 39/39] Bump version. --- src/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Versions.props b/src/Versions.props index 96f4dc0f7..881f35e08 100644 --- a/src/Versions.props +++ b/src/Versions.props @@ -5,7 +5,7 @@ - 14.0.0-rc1 + 14.0.0 10.3.4 11.0.0