From 7f57ec3e095bad5bfe1261e9eba069af8d669c2d Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Fri, 5 Jul 2024 12:30:56 +0200 Subject: [PATCH] Update baselines --- .../Query/GearsOfWarQuerySqlServerTest.cs | 6 +- .../Query/NorthwindWhereQuerySqlServerTest.cs | 6 +- .../Query/NullSemanticsQuerySqlServerTest.cs | 144 +++++++++--------- .../Query/TPCGearsOfWarQuerySqlServerTest.cs | 6 +- .../Query/TPTGearsOfWarQuerySqlServerTest.cs | 6 +- .../TemporalGearsOfWarQuerySqlServerTest.cs | 6 +- .../CustomConvertersSqliteTest.cs | 2 +- .../Query/GearsOfWarQuerySqliteTest.cs | 6 +- .../Query/NullSemanticsQuerySqliteTest.cs | 56 +++---- 9 files changed, 119 insertions(+), 119 deletions(-) diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs index 7ca1b124855..979b6858332 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs @@ -6812,7 +6812,7 @@ FROM [Gears] AS [g] LEFT JOIN ( SELECT [w].[Id], [w].[OwnerFullName] FROM [Weapons] AS [w] - WHERE [w].[IsAutomatic] <> @__isAutomatic_0 + WHERE [w].[IsAutomatic] = @__isAutomatic_0 ^ CAST(1 AS bit) ) AS [w0] ON [g].[FullName] = [w0].[OwnerFullName] """); } @@ -7536,7 +7536,7 @@ public override async Task Logical_operation_with_non_null_parameter_optimizes_n SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank] FROM [Gears] AS [g] -WHERE [g].[HasSoulPatch] <> @__prm_0 +WHERE [g].[HasSoulPatch] = @__prm_0 ^ CAST(1 AS bit) """, // """ @@ -7544,7 +7544,7 @@ WHERE [g].[HasSoulPatch] <> @__prm_0 SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[Rank] FROM [Gears] AS [g] -WHERE [g].[HasSoulPatch] <> @__prm_0 +WHERE [g].[HasSoulPatch] = @__prm_0 ^ CAST(1 AS bit) """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs index e913143e580..2e769a9f6b3 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs @@ -1347,10 +1347,10 @@ public override async Task Where_not_bool_member_compared_to_binary_expression(b """ SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock] FROM [Products] AS [p] -WHERE [p].[Discontinued] <> CASE +WHERE [p].[Discontinued] = CASE WHEN [p].[ProductID] > 50 THEN CAST(1 AS bit) ELSE CAST(0 AS bit) -END +END ^ CAST(1 AS bit) """); } @@ -1381,7 +1381,7 @@ FROM [Products] AS [p] WHERE CASE WHEN [p].[ProductID] > 50 THEN CAST(1 AS bit) ELSE CAST(0 AS bit) -END <> @__prm_0 +END = @__prm_0 ^ CAST(1 AS bit) """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NullSemanticsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NullSemanticsQuerySqlServerTest.cs index 9b6e3004f16..16519889198 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NullSemanticsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NullSemanticsQuerySqlServerTest.cs @@ -272,7 +272,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ @@ -286,7 +286,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[NullableBoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[NullableBoolB] """, // """ @@ -328,7 +328,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[BoolB] +WHERE [e].[NullableBoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ @@ -342,7 +342,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) +WHERE [e].[NullableBoolA] ^ CAST(1 AS bit) = [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) """, // """ @@ -353,7 +353,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -367,7 +367,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[NullableBoolB] +WHERE [e].[BoolA] = [e].[NullableBoolB] ^ CAST(1 AS bit) """, // """ @@ -406,7 +406,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[BoolB] +WHERE [e].[NullableBoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -420,7 +420,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) +WHERE [e].[NullableBoolA] = [e].[NullableBoolB] ^ CAST(1 AS bit) OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) """, // """ @@ -459,7 +459,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -590,7 +590,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ @@ -671,7 +671,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -802,7 +802,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ @@ -908,7 +908,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ @@ -922,7 +922,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[NullableBoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[NullableBoolB] """, // """ @@ -964,7 +964,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[BoolB] +WHERE [e].[NullableBoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ @@ -978,7 +978,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) +WHERE [e].[NullableBoolA] ^ CAST(1 AS bit) = [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) """, // """ @@ -989,7 +989,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -1003,7 +1003,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[NullableBoolB] +WHERE [e].[BoolA] = [e].[NullableBoolB] ^ CAST(1 AS bit) """, // """ @@ -1042,7 +1042,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[BoolB] +WHERE [e].[NullableBoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -1056,7 +1056,7 @@ FROM [Entities1] AS [e] """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) +WHERE [e].[NullableBoolA] = [e].[NullableBoolB] ^ CAST(1 AS bit) OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) """, // """ @@ -1126,25 +1126,25 @@ public override async Task Compare_negated_bool_with_bool_equal(bool async) """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[NullableBoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[NullableBoolB] """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[BoolB] +WHERE [e].[NullableBoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) +WHERE [e].[NullableBoolA] ^ CAST(1 AS bit) = [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) """); } @@ -1156,25 +1156,25 @@ public override async Task Compare_bool_with_negated_bool_equal(bool async) """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[NullableBoolB] +WHERE [e].[BoolA] = [e].[NullableBoolB] ^ CAST(1 AS bit) """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[BoolB] +WHERE [e].[NullableBoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) +WHERE [e].[NullableBoolA] = [e].[NullableBoolB] ^ CAST(1 AS bit) OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) """); } @@ -1216,7 +1216,7 @@ public override async Task Compare_bool_with_bool_equal_negated(bool async) """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -1306,7 +1306,7 @@ public override async Task Compare_negated_bool_with_negated_bool_equal_negated( """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ @@ -1336,7 +1336,7 @@ public override async Task Compare_bool_with_bool_not_equal(bool async) """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -1426,7 +1426,7 @@ public override async Task Compare_negated_bool_with_negated_bool_not_equal(bool """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ @@ -1486,25 +1486,25 @@ public override async Task Compare_negated_bool_with_bool_not_equal_negated(bool """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[NullableBoolB] +WHERE [e].[BoolA] ^ CAST(1 AS bit) = [e].[NullableBoolB] """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[BoolB] +WHERE [e].[NullableBoolA] ^ CAST(1 AS bit) = [e].[BoolB] """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) +WHERE [e].[NullableBoolA] ^ CAST(1 AS bit) = [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) """); } @@ -1516,25 +1516,25 @@ public override async Task Compare_bool_with_negated_bool_not_equal_negated(bool """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[NullableBoolB] +WHERE [e].[BoolA] = [e].[NullableBoolB] ^ CAST(1 AS bit) """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[BoolB] +WHERE [e].[NullableBoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[NullableBoolA] <> [e].[NullableBoolB] OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) +WHERE [e].[NullableBoolA] = [e].[NullableBoolB] ^ CAST(1 AS bit) OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) """); } @@ -1636,7 +1636,7 @@ public override async Task Compare_equals_method_negated(bool async) """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -1666,7 +1666,7 @@ public override async Task Compare_equals_method_negated_static(bool async) """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] <> [e].[BoolB] +WHERE [e].[BoolA] = [e].[BoolB] ^ CAST(1 AS bit) """, // """ @@ -1732,7 +1732,7 @@ public override async Task Compare_complex_equal_not_equal_equal(bool async) """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] ^ [e].[BoolB] ^ CAST(1 AS bit) <> CAST([e].[IntA] ^ [e].[IntB] AS bit) ^ CAST(1 AS bit) +WHERE [e].[BoolA] ^ [e].[BoolB] ^ CAST(1 AS bit) = CAST([e].[IntA] ^ [e].[IntB] AS bit) """, // """ @@ -1741,8 +1741,8 @@ FROM [Entities1] AS [e] WHERE CASE WHEN [e].[NullableBoolA] = [e].[BoolB] AND [e].[NullableBoolA] IS NOT NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) -END <> CASE - WHEN [e].[IntA] = [e].[NullableIntB] AND [e].[NullableIntB] IS NOT NULL THEN CAST(1 AS bit) +END = CASE + WHEN [e].[IntA] <> [e].[NullableIntB] OR [e].[NullableIntB] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """, @@ -1753,8 +1753,8 @@ FROM [Entities1] AS [e] WHERE CASE WHEN ([e].[NullableBoolA] = [e].[NullableBoolB] AND [e].[NullableBoolA] IS NOT NULL AND [e].[NullableBoolB] IS NOT NULL) OR ([e].[NullableBoolA] IS NULL AND [e].[NullableBoolB] IS NULL) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) -END <> CASE - WHEN ([e].[NullableIntA] = [e].[NullableIntB] AND [e].[NullableIntA] IS NOT NULL AND [e].[NullableIntB] IS NOT NULL) OR ([e].[NullableIntA] IS NULL AND [e].[NullableIntB] IS NULL) THEN CAST(1 AS bit) +END = CASE + WHEN ([e].[NullableIntA] <> [e].[NullableIntB] OR [e].[NullableIntA] IS NULL OR [e].[NullableIntB] IS NULL) AND ([e].[NullableIntA] IS NOT NULL OR [e].[NullableIntB] IS NOT NULL) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """); @@ -1804,7 +1804,7 @@ public override async Task Compare_complex_not_equal_not_equal_equal(bool async) """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] ^ [e].[BoolB] <> CAST([e].[IntA] ^ [e].[IntB] AS bit) ^ CAST(1 AS bit) +WHERE [e].[BoolA] ^ [e].[BoolB] = CAST([e].[IntA] ^ [e].[IntB] AS bit) """, // """ @@ -1813,8 +1813,8 @@ FROM [Entities1] AS [e] WHERE CASE WHEN [e].[NullableBoolA] <> [e].[BoolB] OR [e].[NullableBoolA] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) -END <> CASE - WHEN [e].[IntA] = [e].[NullableIntB] AND [e].[NullableIntB] IS NOT NULL THEN CAST(1 AS bit) +END = CASE + WHEN [e].[IntA] <> [e].[NullableIntB] OR [e].[NullableIntB] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """, @@ -1825,8 +1825,8 @@ FROM [Entities1] AS [e] WHERE CASE WHEN ([e].[NullableBoolA] <> [e].[NullableBoolB] OR [e].[NullableBoolA] IS NULL OR [e].[NullableBoolB] IS NULL) AND ([e].[NullableBoolA] IS NOT NULL OR [e].[NullableBoolB] IS NOT NULL) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) -END <> CASE - WHEN ([e].[NullableIntA] = [e].[NullableIntB] AND [e].[NullableIntA] IS NOT NULL AND [e].[NullableIntB] IS NOT NULL) OR ([e].[NullableIntA] IS NULL AND [e].[NullableIntB] IS NULL) THEN CAST(1 AS bit) +END = CASE + WHEN ([e].[NullableIntA] <> [e].[NullableIntB] OR [e].[NullableIntA] IS NULL OR [e].[NullableIntB] IS NULL) AND ([e].[NullableIntA] IS NOT NULL OR [e].[NullableIntB] IS NOT NULL) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """); @@ -1876,7 +1876,7 @@ public override async Task Compare_complex_not_equal_not_equal_not_equal(bool as """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE [e].[BoolA] ^ [e].[BoolB] <> CAST([e].[IntA] ^ [e].[IntB] AS bit) +WHERE [e].[BoolA] ^ [e].[BoolB] = CAST([e].[IntA] ^ [e].[IntB] AS bit) ^ CAST(1 AS bit) """, // """ @@ -1885,8 +1885,8 @@ FROM [Entities1] AS [e] WHERE CASE WHEN [e].[NullableBoolA] <> [e].[BoolB] OR [e].[NullableBoolA] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) -END <> CASE - WHEN [e].[IntA] <> [e].[NullableIntB] OR [e].[NullableIntB] IS NULL THEN CAST(1 AS bit) +END = CASE + WHEN [e].[IntA] = [e].[NullableIntB] AND [e].[NullableIntB] IS NOT NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """, @@ -1897,8 +1897,8 @@ FROM [Entities1] AS [e] WHERE CASE WHEN ([e].[NullableBoolA] <> [e].[NullableBoolB] OR [e].[NullableBoolA] IS NULL OR [e].[NullableBoolB] IS NULL) AND ([e].[NullableBoolA] IS NOT NULL OR [e].[NullableBoolB] IS NOT NULL) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) -END <> CASE - WHEN ([e].[NullableIntA] <> [e].[NullableIntB] OR [e].[NullableIntA] IS NULL OR [e].[NullableIntB] IS NULL) AND ([e].[NullableIntA] IS NOT NULL OR [e].[NullableIntB] IS NOT NULL) THEN CAST(1 AS bit) +END = CASE + WHEN ([e].[NullableIntA] = [e].[NullableIntB] AND [e].[NullableIntA] IS NOT NULL AND [e].[NullableIntB] IS NOT NULL) OR ([e].[NullableIntA] IS NULL AND [e].[NullableIntB] IS NULL) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """); @@ -2822,7 +2822,7 @@ WHEN CASE ELSE CAST(0 AS bit) END ELSE [e].[BoolC] - END <> [e].[BoolB] THEN [e].[BoolA] + END ^ CAST(1 AS bit) = [e].[BoolB] THEN [e].[BoolA] WHEN ([e].[NullableBoolB] = [e].[NullableBoolC] AND [e].[NullableBoolB] IS NOT NULL AND [e].[NullableBoolC] IS NOT NULL) OR ([e].[NullableBoolB] IS NULL AND [e].[NullableBoolC] IS NULL) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END = CAST(1 AS bit) @@ -3503,13 +3503,13 @@ public override async Task Null_semantics_with_null_check_complex2(bool async) """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE ([e].[NullableBoolA] IS NOT NULL AND [e].[NullableBoolB] IS NOT NULL AND ([e].[NullableBoolB] <> [e].[NullableBoolA] OR [e].[NullableBoolC] IS NOT NULL) AND ([e].[NullableBoolC] <> [e].[NullableBoolB] OR [e].[NullableBoolC] IS NULL)) OR [e].[NullableBoolC] <> [e].[BoolB] OR [e].[NullableBoolC] IS NULL +WHERE ([e].[NullableBoolA] IS NOT NULL AND [e].[NullableBoolB] IS NOT NULL AND ([e].[NullableBoolB] = [e].[NullableBoolA] ^ CAST(1 AS bit) OR [e].[NullableBoolC] IS NOT NULL) AND ([e].[NullableBoolC] <> [e].[NullableBoolB] OR [e].[NullableBoolC] IS NULL)) OR [e].[NullableBoolC] <> [e].[BoolB] OR [e].[NullableBoolC] IS NULL """, // """ SELECT [e].[Id] FROM [Entities1] AS [e] -WHERE ([e].[NullableBoolA] IS NOT NULL AND [e].[NullableBoolB] IS NOT NULL AND ([e].[NullableBoolB] <> [e].[NullableBoolA] OR [e].[NullableBoolC] IS NOT NULL) AND ([e].[NullableBoolC] <> [e].[NullableBoolB] OR [e].[NullableBoolC] IS NULL)) OR [e].[NullableBoolB] <> [e].[BoolB] OR [e].[NullableBoolB] IS NULL +WHERE ([e].[NullableBoolA] IS NOT NULL AND [e].[NullableBoolB] IS NOT NULL AND ([e].[NullableBoolB] = [e].[NullableBoolA] ^ CAST(1 AS bit) OR [e].[NullableBoolC] IS NOT NULL) AND ([e].[NullableBoolC] <> [e].[NullableBoolB] OR [e].[NullableBoolC] IS NULL)) OR [e].[NullableBoolB] <> [e].[BoolB] OR [e].[NullableBoolB] IS NULL """); } @@ -4145,8 +4145,8 @@ WHERE [e].[NullableBoolA] IS NULL SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] FROM [Entities1] AS [e] -WHERE @__prm_0 <> CASE - WHEN [e].[NullableBoolA] IS NOT NULL THEN CAST(1 AS bit) +WHERE @__prm_0 = CASE + WHEN [e].[NullableBoolA] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """, @@ -4154,8 +4154,8 @@ ELSE CAST(0 AS bit) """ SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] FROM [Entities1] AS [e] -WHERE [e].[BoolB] <> CASE - WHEN [e].[NullableBoolA] IS NOT NULL THEN CAST(1 AS bit) +WHERE [e].[BoolB] = CASE + WHEN [e].[NullableBoolA] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """); @@ -4177,8 +4177,8 @@ WHERE [e].[NullableIntA] IS NULL SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] FROM [Entities1] AS [e] -WHERE @__prm_0 <> CASE - WHEN [e].[NullableIntA] IS NOT NULL THEN CAST(1 AS bit) +WHERE @__prm_0 = CASE + WHEN [e].[NullableIntA] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """, @@ -4186,8 +4186,8 @@ ELSE CAST(0 AS bit) """ SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] FROM [Entities1] AS [e] -WHERE [e].[BoolB] <> CASE - WHEN [e].[NullableIntA] IS NOT NULL THEN CAST(1 AS bit) +WHERE [e].[BoolB] = CASE + WHEN [e].[NullableIntA] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """); @@ -4209,8 +4209,8 @@ WHERE [e].[NullableBoolA] IS NOT NULL SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] FROM [Entities1] AS [e] -WHERE @__prm_0 <> CASE - WHEN [e].[NullableBoolA] IS NOT NULL THEN CAST(1 AS bit) +WHERE @__prm_0 = CASE + WHEN [e].[NullableBoolA] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """); @@ -4247,8 +4247,8 @@ public override async Task Comparison_compared_to_null_check_on_bool(bool async) """ SELECT [e].[Id], [e].[BoolA], [e].[BoolB], [e].[BoolC], [e].[IntA], [e].[IntB], [e].[IntC], [e].[NullableBoolA], [e].[NullableBoolB], [e].[NullableBoolC], [e].[NullableIntA], [e].[NullableIntB], [e].[NullableIntC], [e].[NullableStringA], [e].[NullableStringB], [e].[NullableStringC], [e].[StringA], [e].[StringB], [e].[StringC] FROM [Entities1] AS [e] -WHERE CAST([e].[IntA] ^ [e].[IntB] AS bit) ^ CAST(1 AS bit) <> CASE - WHEN [e].[NullableBoolA] IS NOT NULL THEN CAST(1 AS bit) +WHERE CAST([e].[IntA] ^ [e].[IntB] AS bit) ^ CAST(1 AS bit) = CASE + WHEN [e].[NullableBoolA] IS NULL THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """, diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs index fb3d5eb4945..449ac311df3 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs @@ -10088,7 +10088,7 @@ UNION ALL SELECT [o].[Nickname], [o].[SquadId], [o].[AssignedCityName], [o].[CityOfBirthName], [o].[FullName], [o].[HasSoulPatch], [o].[LeaderNickname], [o].[LeaderSquadId], [o].[Rank], N'Officer' AS [Discriminator] FROM [Officers] AS [o] ) AS [u] -WHERE [u].[HasSoulPatch] <> @__prm_0 +WHERE [u].[HasSoulPatch] = @__prm_0 ^ CAST(1 AS bit) """, // """ @@ -10102,7 +10102,7 @@ UNION ALL SELECT [o].[Nickname], [o].[SquadId], [o].[AssignedCityName], [o].[CityOfBirthName], [o].[FullName], [o].[HasSoulPatch], [o].[LeaderNickname], [o].[LeaderSquadId], [o].[Rank], N'Officer' AS [Discriminator] FROM [Officers] AS [o] ) AS [u] -WHERE [u].[HasSoulPatch] <> @__prm_0 +WHERE [u].[HasSoulPatch] = @__prm_0 ^ CAST(1 AS bit) """); } @@ -12299,7 +12299,7 @@ FROM [Officers] AS [o] LEFT JOIN ( SELECT [w].[Id], [w].[OwnerFullName] FROM [Weapons] AS [w] - WHERE [w].[IsAutomatic] <> @__isAutomatic_0 + WHERE [w].[IsAutomatic] = @__isAutomatic_0 ^ CAST(1 AS bit) ) AS [w0] ON [u].[FullName] = [w0].[OwnerFullName] """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs index 634064306f1..0b43136fbee 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs @@ -8556,7 +8556,7 @@ WHEN [o].[Nickname] IS NOT NULL THEN N'Officer' END AS [Discriminator] FROM [Gears] AS [g] LEFT JOIN [Officers] AS [o] ON [g].[Nickname] = [o].[Nickname] AND [g].[SquadId] = [o].[SquadId] -WHERE [g].[HasSoulPatch] <> @__prm_0 +WHERE [g].[HasSoulPatch] = @__prm_0 ^ CAST(1 AS bit) """, // """ @@ -8567,7 +8567,7 @@ WHEN [o].[Nickname] IS NOT NULL THEN N'Officer' END AS [Discriminator] FROM [Gears] AS [g] LEFT JOIN [Officers] AS [o] ON [g].[Nickname] = [o].[Nickname] AND [g].[SquadId] = [o].[SquadId] -WHERE [g].[HasSoulPatch] <> @__prm_0 +WHERE [g].[HasSoulPatch] = @__prm_0 ^ CAST(1 AS bit) """); } @@ -10462,7 +10462,7 @@ FROM [Gears] AS [g] LEFT JOIN ( SELECT [w].[Id], [w].[OwnerFullName] FROM [Weapons] AS [w] - WHERE [w].[IsAutomatic] <> @__isAutomatic_0 + WHERE [w].[IsAutomatic] = @__isAutomatic_0 ^ CAST(1 AS bit) ) AS [w0] ON [g].[FullName] = [w0].[OwnerFullName] """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerTest.cs index a7b9ce28a68..a6b64b1438f 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerTest.cs @@ -1866,7 +1866,7 @@ END AS [Collection] LEFT JOIN ( SELECT [w].[Id], [w].[OwnerFullName] FROM [Weapons] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [w] - WHERE [w].[IsAutomatic] <> @__isAutomatic_0 + WHERE [w].[IsAutomatic] = @__isAutomatic_0 ^ CAST(1 AS bit) ) AS [w0] ON [g].[FullName] = [w0].[OwnerFullName] """); } @@ -2427,7 +2427,7 @@ public override async Task Logical_operation_with_non_null_parameter_optimizes_n SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[PeriodEnd], [g].[PeriodStart], [g].[Rank] FROM [Gears] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [g] -WHERE [g].[HasSoulPatch] <> @__prm_0 +WHERE [g].[HasSoulPatch] = @__prm_0 ^ CAST(1 AS bit) """, // """ @@ -2435,7 +2435,7 @@ WHERE [g].[HasSoulPatch] <> @__prm_0 SELECT [g].[Nickname], [g].[SquadId], [g].[AssignedCityName], [g].[CityOfBirthName], [g].[Discriminator], [g].[FullName], [g].[HasSoulPatch], [g].[LeaderNickname], [g].[LeaderSquadId], [g].[PeriodEnd], [g].[PeriodStart], [g].[Rank] FROM [Gears] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [g] -WHERE [g].[HasSoulPatch] <> @__prm_0 +WHERE [g].[HasSoulPatch] = @__prm_0 ^ CAST(1 AS bit) """); } diff --git a/test/EFCore.Sqlite.FunctionalTests/CustomConvertersSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/CustomConvertersSqliteTest.cs index 7571112cd34..9006084cf41 100644 --- a/test/EFCore.Sqlite.FunctionalTests/CustomConvertersSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/CustomConvertersSqliteTest.cs @@ -89,7 +89,7 @@ public override async Task Where_bool_with_value_conversion_inside_comparison_do """ SELECT "b"."BlogId", "b"."Discriminator", "b"."IndexerVisible", "b"."IsVisible", "b"."Url", "b"."RssUrl" FROM "Blog" AS "b" -WHERE "b"."IsVisible" <> 'Y' +WHERE "b"."IsVisible" = 'N' """); } diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs index cddc6d96f46..7c72ac7db70 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs @@ -825,7 +825,7 @@ public override async Task Logical_operation_with_non_null_parameter_optimizes_n SELECT "g"."Nickname", "g"."SquadId", "g"."AssignedCityName", "g"."CityOfBirthName", "g"."Discriminator", "g"."FullName", "g"."HasSoulPatch", "g"."LeaderNickname", "g"."LeaderSquadId", "g"."Rank" FROM "Gears" AS "g" -WHERE "g"."HasSoulPatch" <> @__prm_0 +WHERE "g"."HasSoulPatch" = (NOT (@__prm_0)) """, // """ @@ -833,7 +833,7 @@ public override async Task Logical_operation_with_non_null_parameter_optimizes_n SELECT "g"."Nickname", "g"."SquadId", "g"."AssignedCityName", "g"."CityOfBirthName", "g"."Discriminator", "g"."FullName", "g"."HasSoulPatch", "g"."LeaderNickname", "g"."LeaderSquadId", "g"."Rank" FROM "Gears" AS "g" -WHERE "g"."HasSoulPatch" <> @__prm_0 +WHERE "g"."HasSoulPatch" = (NOT (@__prm_0)) """); } @@ -7979,7 +7979,7 @@ public override async Task SelectMany_Where_DefaultIfEmpty_with_navigation_in_th LEFT JOIN ( SELECT "w"."Id", "w"."OwnerFullName" FROM "Weapons" AS "w" - WHERE "w"."IsAutomatic" <> @__isAutomatic_0 + WHERE "w"."IsAutomatic" = (NOT (@__isAutomatic_0)) ) AS "w0" ON "g"."FullName" = "w0"."OwnerFullName" """); } diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/NullSemanticsQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/NullSemanticsQuerySqliteTest.cs index a6c6c770ea5..16ea0ed2b2b 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/NullSemanticsQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/NullSemanticsQuerySqliteTest.cs @@ -234,7 +234,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."BoolB" +WHERE (NOT ("e"."BoolA")) = "e"."BoolB" """, // """ @@ -245,7 +245,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."NullableBoolB" +WHERE (NOT ("e"."BoolA")) = "e"."NullableBoolB" """, // """ @@ -278,7 +278,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."NullableBoolA" <> "e"."BoolB" +WHERE (NOT ("e"."NullableBoolA")) = "e"."BoolB" """, // """ @@ -289,7 +289,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."NullableBoolA" <> "e"."NullableBoolB" OR ("e"."NullableBoolA" IS NULL AND "e"."NullableBoolB" IS NULL) +WHERE (NOT ("e"."NullableBoolA")) = "e"."NullableBoolB" OR ("e"."NullableBoolA" IS NULL AND "e"."NullableBoolB" IS NULL) """, // """ @@ -300,7 +300,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."BoolB" +WHERE "e"."BoolA" = (NOT ("e"."BoolB")) """, // """ @@ -311,7 +311,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."NullableBoolB" +WHERE "e"."BoolA" = (NOT ("e"."NullableBoolB")) """, // """ @@ -344,7 +344,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."NullableBoolA" <> "e"."BoolB" +WHERE "e"."NullableBoolA" = (NOT ("e"."BoolB")) """, // """ @@ -355,7 +355,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."NullableBoolA" <> "e"."NullableBoolB" OR ("e"."NullableBoolA" IS NULL AND "e"."NullableBoolB" IS NULL) +WHERE "e"."NullableBoolA" = (NOT ("e"."NullableBoolB")) OR ("e"."NullableBoolA" IS NULL AND "e"."NullableBoolB" IS NULL) """, // """ @@ -388,7 +388,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."BoolB" +WHERE "e"."BoolA" = (NOT ("e"."BoolB")) """, // """ @@ -498,7 +498,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."BoolB" +WHERE (NOT ("e"."BoolA")) = "e"."BoolB" """, // """ @@ -564,7 +564,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."BoolB" +WHERE "e"."BoolA" = (NOT ("e"."BoolB")) """, // """ @@ -674,7 +674,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."BoolB" +WHERE (NOT ("e"."BoolA")) = "e"."BoolB" """, // """ @@ -762,7 +762,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."BoolB" +WHERE (NOT ("e"."BoolA")) = "e"."BoolB" """, // """ @@ -773,7 +773,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."NullableBoolB" +WHERE (NOT ("e"."BoolA")) = "e"."NullableBoolB" """, // """ @@ -806,7 +806,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."NullableBoolA" <> "e"."BoolB" +WHERE (NOT ("e"."NullableBoolA")) = "e"."BoolB" """, // """ @@ -817,7 +817,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."NullableBoolA" <> "e"."NullableBoolB" OR ("e"."NullableBoolA" IS NULL AND "e"."NullableBoolB" IS NULL) +WHERE (NOT ("e"."NullableBoolA")) = "e"."NullableBoolB" OR ("e"."NullableBoolA" IS NULL AND "e"."NullableBoolB" IS NULL) """, // """ @@ -828,7 +828,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."BoolB" +WHERE "e"."BoolA" = (NOT ("e"."BoolB")) """, // """ @@ -839,7 +839,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."BoolA" <> "e"."NullableBoolB" +WHERE "e"."BoolA" = (NOT ("e"."NullableBoolB")) """, // """ @@ -872,7 +872,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."NullableBoolA" <> "e"."BoolB" +WHERE "e"."NullableBoolA" = (NOT ("e"."BoolB")) """, // """ @@ -883,7 +883,7 @@ public override async Task Rewrite_compare_bool_with_bool(bool async) """ SELECT "e"."Id" FROM "Entities1" AS "e" -WHERE "e"."NullableBoolA" <> "e"."NullableBoolB" OR ("e"."NullableBoolA" IS NULL AND "e"."NullableBoolB" IS NULL) +WHERE "e"."NullableBoolA" = (NOT ("e"."NullableBoolB")) OR ("e"."NullableBoolA" IS NULL AND "e"."NullableBoolB" IS NULL) """, // """ @@ -984,10 +984,10 @@ WHERE CASE SELECT "e"."Id" FROM "Entities1" AS "e" WHERE CASE - WHEN CASE + WHEN (NOT (CASE WHEN "e"."BoolA" THEN ("e"."NullableBoolA" <> "e"."NullableBoolB" OR "e"."NullableBoolA" IS NULL OR "e"."NullableBoolB" IS NULL) AND ("e"."NullableBoolA" IS NOT NULL OR "e"."NullableBoolB" IS NOT NULL) ELSE "e"."BoolC" - END <> "e"."BoolB" THEN "e"."BoolA" + END)) = "e"."BoolB" THEN "e"."BoolA" ELSE ("e"."NullableBoolB" = "e"."NullableBoolC" AND "e"."NullableBoolB" IS NOT NULL AND "e"."NullableBoolC" IS NOT NULL) OR ("e"."NullableBoolB" IS NULL AND "e"."NullableBoolC" IS NULL) END """, @@ -1264,13 +1264,13 @@ public override async Task Bool_not_equal_nullable_bool_HasValue(bool async) SELECT "e"."Id", "e"."BoolA", "e"."BoolB", "e"."BoolC", "e"."IntA", "e"."IntB", "e"."IntC", "e"."NullableBoolA", "e"."NullableBoolB", "e"."NullableBoolC", "e"."NullableIntA", "e"."NullableIntB", "e"."NullableIntC", "e"."NullableStringA", "e"."NullableStringB", "e"."NullableStringC", "e"."StringA", "e"."StringB", "e"."StringC" FROM "Entities1" AS "e" -WHERE @__prm_0 <> ("e"."NullableBoolA" IS NOT NULL) +WHERE @__prm_0 = ("e"."NullableBoolA" IS NULL) """, // """ SELECT "e"."Id", "e"."BoolA", "e"."BoolB", "e"."BoolC", "e"."IntA", "e"."IntB", "e"."IntC", "e"."NullableBoolA", "e"."NullableBoolB", "e"."NullableBoolC", "e"."NullableIntA", "e"."NullableIntB", "e"."NullableIntC", "e"."NullableStringA", "e"."NullableStringB", "e"."NullableStringC", "e"."StringA", "e"."StringB", "e"."StringC" FROM "Entities1" AS "e" -WHERE "e"."BoolB" <> ("e"."NullableBoolA" IS NOT NULL) +WHERE "e"."BoolB" = ("e"."NullableBoolA" IS NULL) """); } @@ -1290,13 +1290,13 @@ public override async Task Bool_not_equal_nullable_int_HasValue(bool async) SELECT "e"."Id", "e"."BoolA", "e"."BoolB", "e"."BoolC", "e"."IntA", "e"."IntB", "e"."IntC", "e"."NullableBoolA", "e"."NullableBoolB", "e"."NullableBoolC", "e"."NullableIntA", "e"."NullableIntB", "e"."NullableIntC", "e"."NullableStringA", "e"."NullableStringB", "e"."NullableStringC", "e"."StringA", "e"."StringB", "e"."StringC" FROM "Entities1" AS "e" -WHERE @__prm_0 <> ("e"."NullableIntA" IS NOT NULL) +WHERE @__prm_0 = ("e"."NullableIntA" IS NULL) """, // """ SELECT "e"."Id", "e"."BoolA", "e"."BoolB", "e"."BoolC", "e"."IntA", "e"."IntB", "e"."IntC", "e"."NullableBoolA", "e"."NullableBoolB", "e"."NullableBoolC", "e"."NullableIntA", "e"."NullableIntB", "e"."NullableIntC", "e"."NullableStringA", "e"."NullableStringB", "e"."NullableStringC", "e"."StringA", "e"."StringB", "e"."StringC" FROM "Entities1" AS "e" -WHERE "e"."BoolB" <> ("e"."NullableIntA" IS NOT NULL) +WHERE "e"."BoolB" = ("e"."NullableIntA" IS NULL) """); } @@ -1316,7 +1316,7 @@ public override async Task Bool_not_equal_nullable_bool_compared_to_null(bool as SELECT "e"."Id", "e"."BoolA", "e"."BoolB", "e"."BoolC", "e"."IntA", "e"."IntB", "e"."IntC", "e"."NullableBoolA", "e"."NullableBoolB", "e"."NullableBoolC", "e"."NullableIntA", "e"."NullableIntB", "e"."NullableIntC", "e"."NullableStringA", "e"."NullableStringB", "e"."NullableStringC", "e"."StringA", "e"."StringB", "e"."StringC" FROM "Entities1" AS "e" -WHERE @__prm_0 <> ("e"."NullableBoolA" IS NOT NULL) +WHERE @__prm_0 = ("e"."NullableBoolA" IS NULL) """); } @@ -1439,7 +1439,7 @@ public override async Task Comparison_compared_to_null_check_on_bool(bool async) """ SELECT "e"."Id", "e"."BoolA", "e"."BoolB", "e"."BoolC", "e"."IntA", "e"."IntB", "e"."IntC", "e"."NullableBoolA", "e"."NullableBoolB", "e"."NullableBoolC", "e"."NullableIntA", "e"."NullableIntB", "e"."NullableIntC", "e"."NullableStringA", "e"."NullableStringB", "e"."NullableStringC", "e"."StringA", "e"."StringB", "e"."StringC" FROM "Entities1" AS "e" -WHERE ("e"."IntA" = "e"."IntB") <> ("e"."NullableBoolA" IS NOT NULL) +WHERE ("e"."IntA" = "e"."IntB") = ("e"."NullableBoolA" IS NULL) """, // """