From d358a9233996ad4844f4a39ad5dd92b19f94aeca Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Fri, 3 Apr 2026 12:22:42 +0800 Subject: [PATCH 1/9] Improve Substring/CharIndex translation in Jet provider Enhance Substring translation by coalescing function arguments to 0 for null safety. Remove redundant assignment in CharIndex translation for cleaner code. --- .../Internal/JetStringMethodTranslator.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetStringMethodTranslator.cs b/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetStringMethodTranslator.cs index 0b48ed5ea..8349d378d 100644 --- a/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetStringMethodTranslator.cs +++ b/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetStringMethodTranslator.cs @@ -184,12 +184,18 @@ private static readonly MethodInfo _lastOrDefaultMethodInfoWithoutArgs if (_substringMethodInfoWithTwoArgs.Equals(method)) { + var argument = arguments[0]; + //if argument is a function expression, coalesce to 0 + if (argument is SqlFunctionExpression or SqlBinaryExpression or SqlUnaryExpression) + { + argument = _sqlExpressionFactory.Coalesce(argument, _sqlExpressionFactory.Constant(0)); + } return _sqlExpressionFactory.Function( "MID", [ instance, _sqlExpressionFactory.Add( - arguments[0], + argument, _sqlExpressionFactory.Constant(1)), arguments[1] ], @@ -296,7 +302,7 @@ private SqlExpression TranslateIndexOf( var argumentsPropagateNullability = Enumerable.Repeat(true, charIndexArguments.Count); - SqlExpression charIndexExpression = charIndexExpression = _sqlExpressionFactory.Function( + SqlExpression charIndexExpression = _sqlExpressionFactory.Function( "INSTR", charIndexArguments, nullable: true, From f767ef30c87725a46e72e1edac5b7ae54d612d51 Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Fri, 3 Apr 2026 12:23:23 +0800 Subject: [PATCH 2/9] Add DateTime to JetConvertTranslator supported types Added DateTime to the _supportedTypes list in JetConvertTranslator.cs, enabling conversion support for DateTime values in EntityFrameworkCore.Jet queries. --- .../Query/ExpressionTranslators/Internal/JetConvertTranslator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetConvertTranslator.cs b/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetConvertTranslator.cs index 18c2665aa..983f9a4d0 100644 --- a/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetConvertTranslator.cs +++ b/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetConvertTranslator.cs @@ -31,6 +31,7 @@ public class JetConvertTranslator(ISqlExpressionFactory sqlExpressionFactory) : [ typeof(bool), typeof(byte), + typeof(DateTime), typeof(decimal), typeof(double), typeof(float), From 1bbc96b0edcd365360a1182032d62bea0a566293 Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Fri, 3 Apr 2026 12:24:45 +0800 Subject: [PATCH 3/9] Ensure 'counter' columns are always non-nullable Updated DatabaseColumn creation logic to set IsNullable to false for columns with storeType "counter", regardless of the nullable flag. This ensures "counter" columns are consistently treated as non-nullable in the model. --- src/EFCore.Jet/Scaffolding/Internal/JetDatabaseModelFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EFCore.Jet/Scaffolding/Internal/JetDatabaseModelFactory.cs b/src/EFCore.Jet/Scaffolding/Internal/JetDatabaseModelFactory.cs index 23194010a..c01665d36 100644 --- a/src/EFCore.Jet/Scaffolding/Internal/JetDatabaseModelFactory.cs +++ b/src/EFCore.Jet/Scaffolding/Internal/JetDatabaseModelFactory.cs @@ -258,7 +258,7 @@ private void GetColumns(DbConnection connection, IReadOnlyList ta Table = table, Name = columnName!, StoreType = storeType, - IsNullable = nullable, + IsNullable = storeType != "counter" && nullable, DefaultValue = defaultValueobj, DefaultValueSql = defaultValue, ComputedColumnSql = null, From 8dc0f95c9bef5d0e14b28951499272f3e96c8daa Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Fri, 3 Apr 2026 12:25:32 +0800 Subject: [PATCH 4/9] Refactor FROM clause table handling and variable naming Refactored logic for counting non-cross join tables in FROM clause generation, improving readability and correctness. Renamed variables for clarity, removed unnecessary null-forgiving operators, and standardized use of var for consistency. --- .../Sql/Internal/JetQuerySqlGenerator.cs | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs b/src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs index a83058d52..6f0fe25c3 100644 --- a/src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs +++ b/src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs @@ -221,35 +221,40 @@ private void VisitJetTables(IReadOnlyList Tables, bool addf const int maxTablesWithoutBrackets = 2; + var nonCrossTableCount = Tables.Count(t => t is not CrossJoinExpression and not CrossApplyExpression); + Sql.Append( new string( '(', - Math.Max( - 0, - Tables - .Count(t => !(t is CrossJoinExpression or CrossApplyExpression)) - - maxTablesWithoutBrackets))); + Math.Max(0, nonCrossTableCount - maxTablesWithoutBrackets))); + + var nonCrossTablesSeen = 0; for (var index = 0; index < Tables.Count; index++) { var tableExpression = Tables[index]; var isApplyExpression = tableExpression is CrossApplyExpression or OuterApplyExpression; - var isCrossExpression = tableExpression is CrossJoinExpression or CrossApplyExpression; + var isNonCrossExpression = !isCrossExpression; if (isApplyExpression) { throw new UnreachableException(); } + if (isNonCrossExpression) + { + nonCrossTablesSeen++; + } + if (index > 0) { if (isCrossExpression) { Sql.Append(","); } - else if (index >= maxTablesWithoutBrackets) + else if (nonCrossTablesSeen > maxTablesWithoutBrackets) { Sql.Append(")"); } @@ -262,28 +267,28 @@ private void VisitJetTables(IReadOnlyList Tables, bool addf { if (expression.JoinPredicate is SqlBinaryExpression binaryJoin) { - tempcolexp = ExtractColumnExpressions(binaryJoin!); + tempcolexp = ExtractColumnExpressions(binaryJoin); } else if (expression.JoinPredicate is SqlUnaryExpression unaryJoin) { - tempcolexp = ExtractColumnExpressions(unaryJoin!); + tempcolexp = ExtractColumnExpressions(unaryJoin); } else { tempcolexp = []; } - bool refrencesfirsttable = false; - foreach (ColumnExpression col in tempcolexp) + var referencesFirstTable = false; + foreach (var col in tempcolexp) { if (col.TableAlias == Tables[0].Alias) { - refrencesfirsttable = true; + referencesFirstTable = true; break; } } - if (refrencesfirsttable) + if (referencesFirstTable) { Visit(tableExpression); continue; From 6a794f56f9306a567234c2fd1fbc61e732063bff Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Fri, 3 Apr 2026 12:26:07 +0800 Subject: [PATCH 5/9] Fix Math/MathF translation and SGN function handling Update JetMathTranslator to distinguish between Math and MathF methods, using correct runtime methods and constant types for square root translations. Also, fix SQL function name check from "SIGN" to "SGN" for accurate SQL generation. --- .../Internal/JetMathTranslator.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetMathTranslator.cs b/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetMathTranslator.cs index 5e87adaa6..aa77c6438 100644 --- a/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetMathTranslator.cs +++ b/src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetMathTranslator.cs @@ -115,7 +115,7 @@ public class JetMathTranslator(ISqlExpressionFactory sqlExpressionFactory) : IMe nullable: true, argumentsPropagateNullability: newArguments.Select(_ => true).ToArray(), method.ReturnType, - sqlFunctionName == "SIGN" ? null : typeMapping); + sqlFunctionName == "SGN" ? null : typeMapping); } if (_supportedMethodTranslationsIndirect.Contains(method)) @@ -132,7 +132,9 @@ public class JetMathTranslator(ISqlExpressionFactory sqlExpressionFactory) : IMe _sqlExpressionFactory.Negate(arguments[0]), Translate( null, - typeof(Math).GetMethod(nameof(Math.Sqrt))!, + method.DeclaringType == typeof(MathF) + ? typeof(MathF).GetRuntimeMethod(nameof(MathF.Sqrt), [typeof(float)])! + : typeof(Math).GetRuntimeMethod(nameof(Math.Sqrt), [typeof(double)])!, [ _sqlExpressionFactory.Add( _sqlExpressionFactory.Negate( @@ -141,7 +143,7 @@ public class JetMathTranslator(ISqlExpressionFactory sqlExpressionFactory) : IMe arguments[0] ) ), - _sqlExpressionFactory.Constant(1d) + _sqlExpressionFactory.Constant(method.DeclaringType == typeof(MathF) ? 1f : 1d) ) ], logger @@ -160,7 +162,9 @@ public class JetMathTranslator(ISqlExpressionFactory sqlExpressionFactory) : IMe arguments[0], Translate( null, - typeof(Math).GetMethod(nameof(Math.Sqrt)) !, + method.DeclaringType == typeof(MathF) + ? typeof(MathF).GetRuntimeMethod(nameof(MathF.Sqrt), [typeof(float)])! + : typeof(Math).GetRuntimeMethod(nameof(Math.Sqrt), [typeof(double)])!, [ _sqlExpressionFactory.Add( _sqlExpressionFactory.Negate( @@ -169,7 +173,7 @@ public class JetMathTranslator(ISqlExpressionFactory sqlExpressionFactory) : IMe arguments[0] ) ), - _sqlExpressionFactory.Constant(1d) + _sqlExpressionFactory.Constant(method.DeclaringType == typeof(MathF) ? 1f : 1d) ) ], logger From 96acdfbfd962ca8198400fc23f6e87782a612b7d Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Fri, 3 Apr 2026 12:27:59 +0800 Subject: [PATCH 6/9] Update tests for Jet: deps, locale, SQL, and coverage - Bump Microsoft.Build.Tasks.Core to 18.4.0 and EFCore.* to 10.0.* - Add ModuleInitializer to enforce en-US culture for tests - Update test SQL assertions for new parameter naming (@p1, etc.) - Add/adjust tests for DefaultIfEmpty, Contains, and parameterized collections - Mark unsupported/unstable tests as skipped for Jet - Remove/comment out Jet-unsupported features (collation, idempotent migrations) - Treat NotSupportedException as a valid skip in test runner - Add scaffolding test for non-nullable identity columns - Clean up code and ensure all new/overridden tests assert expected Jet SQL --- .../AssemblyInfo.cs | 5 + .../NorthwindBulkUpdatesJetTest.cs | 108 +++++++--- ...TPCFiltersInheritanceBulkUpdatesJetTest.cs | 4 +- .../TPCInheritanceBulkUpdatesJetTest.cs | 4 +- .../TPHInheritanceBulkUpdatesJetTest.cs | 8 +- .../EFCore.Jet.FunctionalTests.csproj | 2 +- .../EFCore.Jet.FunctionalTests/FindJetTest.cs | 8 +- .../GraphUpdates/ProxyGraphUpdatesJetTest.cs | 6 +- .../JetEndToEndTest.cs | 38 ---- .../LazyLoadProxyJetTest.cs | 16 +- .../EFCore.Jet.FunctionalTests/LoadJetTest.cs | 48 ++--- .../MigrationsInfrastructureJetTest.cs | 200 +----------------- .../Migrations/MigrationsJetTest.cs | 67 ------ .../Properties/AssemblyInfo.cs | 1 - .../Query/AdHocPrecompiledQueryJetTest.cs | 1 + .../ComplexJsonCollectionJetTest.cs | 12 ++ .../ComplexJsonMiscellaneousJetTest.cs | 13 ++ .../ComplexTableSplittingBulkUpdateJetTest.cs | 4 +- ...mplexTableSplittingMiscellaneousJetTest.cs | 10 + .../NavigationsCollectionJetTest.cs | 7 + .../NavigationsMiscellaneousJetTest.cs | 30 +++ .../OwnedJson/OwnedJsonCollectionJetTest.cs | 12 ++ .../OwnedJsonMiscellaneousJetTest.cs | 13 ++ .../OwnedNavigationsCollectionJetTest.cs | 7 + .../OwnedNavigationsMiscellaneousJetTest.cs | 29 +++ ...OwnedTableSplittingMiscellaneousJetTest.cs | 25 +++ ...mplexNavigationsCollectionsQueryJetTest.cs | 12 +- ...NavigationsCollectionsSplitQueryJetTest.cs | 32 +-- .../Query/ComplexNavigationsQueryJetTest.cs | 4 +- .../Query/ComplexTypeQueryJetTest.cs | 2 +- .../Query/GearsOfWarQueryJetTest.cs | 62 +++++- .../NorthwindChangeTrackingQueryJetTest.cs | 4 +- .../NorthwindEFPropertyIncludeQueryJetTest.cs | 4 +- .../Query/NorthwindGroupByQueryJetTest.cs | 14 +- .../NorthwindIncludeNoTrackingQueryJetTest.cs | 4 +- .../Query/NorthwindIncludeQueryJetTest.cs | 4 +- .../NorthwindMiscellaneousQueryJetTest.cs | 100 ++++----- .../Query/NorthwindSelectQueryJetTest.cs | 2 +- .../NorthwindSetOperationsQueryJetTest.cs | 4 +- ...hwindSplitIncludeNoTrackingQueryJetTest.cs | 14 +- .../NorthwindSplitIncludeQueryJetTest.cs | 14 +- .../NorthwindStringIncludeQueryJetTest.cs | 4 +- .../Query/NorthwindWhereQueryJetTest.cs | 4 +- .../Query/OwnedQueryJetTest.cs | 4 +- .../Query/PrimitiveCollectionsQueryJetTest.cs | 149 +++++++++++++ .../Query/QueryFilterFuncletizationJetTest.cs | 24 +-- .../Query/TPCGearsOfWarQueryJetTest.cs | 62 +++++- .../Query/TPTGearsOfWarQueryJetTest.cs | 62 +++++- .../Translations/MathTranslationsJetTest.cs | 2 +- .../MiscellaneousTranslationsJetTest.cs | 108 +++++----- .../Temporal/DateTimeTranslationsJetTest.cs | 16 +- .../JetDatabaseModelFactoryTest.cs | 25 +++ .../TPTTableSplittingJetTest.cs | 3 - test/EFCore.Jet.Tests/EFCore.Jet.Tests.csproj | 8 +- test/Shared/ModuleInitializer.cs | 22 ++ .../TestUtilities/Xunit/JetXunitTestRunner.cs | 6 +- 56 files changed, 866 insertions(+), 587 deletions(-) create mode 100644 test/EFCore.Jet.FunctionalTests/AssemblyInfo.cs create mode 100644 test/Shared/ModuleInitializer.cs diff --git a/test/EFCore.Jet.FunctionalTests/AssemblyInfo.cs b/test/EFCore.Jet.FunctionalTests/AssemblyInfo.cs new file mode 100644 index 000000000..398ae649d --- /dev/null +++ b/test/EFCore.Jet.FunctionalTests/AssemblyInfo.cs @@ -0,0 +1,5 @@ +using Xunit; + +[assembly: CollectionBehavior( + DisableTestParallelization = false, + MaxParallelThreads = 1)] \ No newline at end of file diff --git a/test/EFCore.Jet.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesJetTest.cs b/test/EFCore.Jet.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesJetTest.cs index 527e6cfa1..7c9566014 100644 --- a/test/EFCore.Jet.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesJetTest.cs @@ -273,9 +273,9 @@ SELECT 1 FROM ( SELECT `o4`.`OrderID`, `o4`.`ProductID` FROM ( - SELECT TOP @p2 `o3`.`OrderID`, `o3`.`ProductID` + SELECT TOP @p3 `o3`.`OrderID`, `o3`.`ProductID` FROM ( - SELECT TOP @p1 + @p2 `o0`.`OrderID`, `o0`.`ProductID` + SELECT TOP @p2 + @p3 `o0`.`OrderID`, `o0`.`ProductID` FROM ( SELECT `o6`.`OrderID`, `o6`.`ProductID` FROM ( @@ -528,9 +528,9 @@ SELECT 1 INNER JOIN ( SELECT `o4`.`OrderID` FROM ( - SELECT TOP @p0 `o3`.`OrderID` + SELECT TOP @p1 `o3`.`OrderID` FROM ( - SELECT TOP @p + @p0 `o2`.`OrderID` + SELECT TOP @p + @p1 `o2`.`OrderID` FROM `Orders` AS `o2` WHERE `o2`.`OrderID` < 10300 ORDER BY `o2`.`OrderID` @@ -556,9 +556,9 @@ SELECT 1 LEFT JOIN ( SELECT `o4`.`OrderID` FROM ( - SELECT TOP @p0 `o3`.`OrderID` + SELECT TOP @p1 `o3`.`OrderID` FROM ( - SELECT TOP @p + @p0 `o2`.`OrderID` + SELECT TOP @p + @p1 `o2`.`OrderID` FROM `Orders` AS `o2` WHERE `o2`.`OrderID` < 10300 ORDER BY `o2`.`OrderID` @@ -584,9 +584,9 @@ SELECT 1 LEFT JOIN ( SELECT `o4`.`OrderID` FROM ( - SELECT TOP @p0 `o3`.`OrderID` + SELECT TOP @p1 `o3`.`OrderID` FROM ( - SELECT TOP @p + @p0 `o2`.`OrderID` + SELECT TOP @p + @p1 `o2`.`OrderID` FROM `Orders` AS `o2` WHERE `o2`.`OrderID` < 10300 ORDER BY `o2`.`OrderID` @@ -678,9 +678,9 @@ SELECT 1 RIGHT JOIN ( SELECT `o4`.`OrderID` FROM ( - SELECT TOP @p0 `o3`.`OrderID` + SELECT TOP @p1 `o3`.`OrderID` FROM ( - SELECT TOP @p + @p0 `o2`.`OrderID` + SELECT TOP @p + @p1 `o2`.`OrderID` FROM `Orders` AS `o2` WHERE `o2`.`OrderID` < 10300 ORDER BY `o2`.`OrderID` @@ -855,7 +855,7 @@ public override async Task Update_Where_Take_set_constant(bool async) AssertExecuteUpdateSql( """ -@p0='Updated' (Size = 30) +@p1='Updated' (Size = 30) UPDATE `Customers` AS `c0` INNER JOIN ( @@ -863,7 +863,7 @@ SELECT TOP @p `c`.`CustomerID` FROM `Customers` AS `c` WHERE `c`.`CustomerID` LIKE 'F%' ) AS `c1` ON `c0`.`CustomerID` = `c1`.`CustomerID` -SET `c0`.`ContactName` = @p0 +SET `c0`.`ContactName` = @p1 """); } @@ -873,21 +873,21 @@ public override async Task Update_Where_Skip_Take_set_constant(bool async) AssertExecuteUpdateSql( """ -@p1='Updated' (Size = 30) +@p2='Updated' (Size = 30) UPDATE `Customers` AS `c0` INNER JOIN ( SELECT `c3`.`CustomerID` FROM ( - SELECT TOP @p0 `c2`.`CustomerID` + SELECT TOP @p1 `c2`.`CustomerID` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID` + SELECT TOP @p + @p1 `c`.`CustomerID` FROM `Customers` AS `c` WHERE `c`.`CustomerID` LIKE 'F%' ) AS `c2` ) AS `c3` ) AS `c1` ON `c0`.`CustomerID` = `c1`.`CustomerID` -SET `c0`.`ContactName` = @p1 +SET `c0`.`ContactName` = @p2 """); } @@ -936,7 +936,7 @@ public override async Task Update_Where_OrderBy_Take_set_constant(bool async) AssertExecuteUpdateSql( """ -@p0='Updated' (Size = 30) +@p1='Updated' (Size = 30) UPDATE `Customers` AS `c0` INNER JOIN ( @@ -945,7 +945,7 @@ SELECT TOP @p `c`.`CustomerID` WHERE `c`.`CustomerID` LIKE 'F%' ORDER BY `c`.`City` ) AS `c1` ON `c0`.`CustomerID` = `c1`.`CustomerID` -SET `c0`.`ContactName` = @p0 +SET `c0`.`ContactName` = @p1 """); } @@ -955,15 +955,15 @@ public override async Task Update_Where_OrderBy_Skip_Take_set_constant(bool asyn AssertExecuteUpdateSql( """ -@p1='Updated' (Size = 30) +@p2='Updated' (Size = 30) UPDATE `Customers` AS `c0` INNER JOIN ( SELECT `c3`.`CustomerID` FROM ( - SELECT TOP @p0 `c2`.`CustomerID`, `c2`.`City` + SELECT TOP @p1 `c2`.`CustomerID`, `c2`.`City` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`City` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`City` FROM `Customers` AS `c` WHERE `c`.`CustomerID` LIKE 'F%' ORDER BY `c`.`City` @@ -972,7 +972,7 @@ ORDER BY `c2`.`City` DESC ) AS `c3` ORDER BY `c3`.`City` ) AS `c1` ON `c0`.`CustomerID` = `c1`.`CustomerID` -SET `c0`.`ContactName` = @p1 +SET `c0`.`ContactName` = @p2 """); } @@ -982,7 +982,7 @@ public override async Task Update_Where_OrderBy_Skip_Take_Skip_Take_set_constant AssertExecuteUpdateSql( """ -@p3='Updated' (Size = 30) +@p4='Updated' (Size = 30) UPDATE `Customers` AS `c1` INNER JOIN ( @@ -992,9 +992,9 @@ INNER JOIN ( FROM ( SELECT TOP @p + @p `c0`.`CustomerID`, `c0`.`City` FROM ( - SELECT TOP @p0 `c5`.`CustomerID`, `c5`.`City` + SELECT TOP @p1 `c5`.`CustomerID`, `c5`.`City` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`City` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`City` FROM `Customers` AS `c` WHERE `c`.`CustomerID` LIKE 'F%' ORDER BY `c`.`City` @@ -1007,7 +1007,7 @@ ORDER BY `c3`.`City` DESC ) AS `c4` ORDER BY `c4`.`City` ) AS `c2` ON `c1`.`CustomerID` = `c2`.`CustomerID` -SET `c1`.`ContactName` = @p3 +SET `c1`.`ContactName` = @p4 """); } @@ -1624,6 +1624,62 @@ public override async Task Update_with_two_inner_joins(bool async) """); } + [ConditionalTheory, MemberData(nameof(IsAsyncData))] + public override async Task Update_with_PK_pushdown_and_join_and_multiple_setters(bool async) + { + await base.Update_with_PK_pushdown_and_join_and_multiple_setters(async); + + AssertExecuteUpdateSql( + """ +@p='1' +@p2='10' (DbType = Currency) + +UPDATE [o2] +SET [o2].[Quantity] = CAST(@p AS smallint), + [o2].[UnitPrice] = @p2 +FROM [Order Details] AS [o2] +INNER JOIN ( + SELECT [o1].[OrderID], [o1].[ProductID] + FROM ( + SELECT [o].[OrderID], [o].[ProductID] + FROM [Order Details] AS [o] + ORDER BY [o].[OrderID] + OFFSET @p ROWS + ) AS [o1] + INNER JOIN [Orders] AS [o0] ON [o1].[OrderID] = [o0].[OrderID] + WHERE [o0].[CustomerID] = N'ALFKI' +) AS [s] ON [o2].[OrderID] = [s].[OrderID] AND [o2].[ProductID] = [s].[ProductID] +"""); + } + + /*public override async Task Update_with_select_mixed_entity_scalar_anonymous_projection(bool async) + { + await base.Update_with_select_mixed_entity_scalar_anonymous_projection(async); + + AssertSql( + """ +@p='Updated' (Size = 30) + +UPDATE [c] +SET [c].[ContactName] = @p +FROM [Customers] AS [c] +"""); + } + + public override async Task Update_with_select_scalar_anonymous_projection(bool async) + { + await base.Update_with_select_scalar_anonymous_projection(async); + + AssertSql( + """ +@p='Updated' (Size = 30) + +UPDATE [c] +SET [c].[ContactName] = @p +FROM [Customers] AS [c] +"""); + } + */ private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); diff --git a/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesJetTest.cs b/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesJetTest.cs index a6d19f028..cde6064de 100644 --- a/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesJetTest.cs @@ -188,11 +188,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 255) -@p0='0' (Size = 1) +@p1='0' (Size = 1) UPDATE `Kiwi` AS `k` SET `k`.`Name` = @p, - `k`.`FoundOn` = @p0 + `k`.`FoundOn` = @p1 WHERE `k`.`CountryId` = 1 """); } diff --git a/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesJetTest.cs b/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesJetTest.cs index 54a110262..7e326e288 100644 --- a/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesJetTest.cs @@ -185,11 +185,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 255) -@p0='0' (Size = 1) +@p1='0' (Size = 1) UPDATE `Kiwi` AS `k` SET `k`.`Name` = @p, - `k`.`FoundOn` = @p0 + `k`.`FoundOn` = @p1 """); } diff --git a/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesJetTest.cs b/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesJetTest.cs index f394d86eb..f6dc22f6b 100644 --- a/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesJetTest.cs @@ -119,9 +119,9 @@ DELETE FROM `Animals` AS `a` WHERE `a`.`Id` IN ( SELECT `a2`.`Id` FROM ( - SELECT TOP @p0 `a1`.`Id`, `a1`.`Name` + SELECT TOP @p1 `a1`.`Id`, `a1`.`Name` FROM ( - SELECT TOP @p + @p0 `a0`.`Id`, `a0`.`Name` + SELECT TOP @p + @p1 `a0`.`Id`, `a0`.`Name` FROM `Animals` AS `a0` WHERE `a0`.`Name` = 'Great spotted kiwi' ORDER BY `a0`.`Name` @@ -220,11 +220,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 255) -@p0='0' (Size = 1) +@p1='0' (Size = 1) UPDATE `Animals` AS `a` SET `a`.`Name` = @p, - `a`.`FoundOn` = @p0 + `a`.`FoundOn` = @p1 WHERE `a`.`Discriminator` = 'Kiwi' """); } diff --git a/test/EFCore.Jet.FunctionalTests/EFCore.Jet.FunctionalTests.csproj b/test/EFCore.Jet.FunctionalTests/EFCore.Jet.FunctionalTests.csproj index 4724cd1c5..01ab4d65a 100644 --- a/test/EFCore.Jet.FunctionalTests/EFCore.Jet.FunctionalTests.csproj +++ b/test/EFCore.Jet.FunctionalTests/EFCore.Jet.FunctionalTests.csproj @@ -15,7 +15,7 @@ - + diff --git a/test/EFCore.Jet.FunctionalTests/FindJetTest.cs b/test/EFCore.Jet.FunctionalTests/FindJetTest.cs index c16cfa706..35409c8f9 100644 --- a/test/EFCore.Jet.FunctionalTests/FindJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/FindJetTest.cs @@ -190,11 +190,11 @@ public override void Find_composite_key_from_store() AssertSql( """ @p='77' -@p0='Dog' (Size = 255) +@p1='Dog' (Size = 255) SELECT TOP 1 `c`.`Id1`, `c`.`Id2`, `c`.`Foo` FROM `CompositeKey` AS `c` -WHERE `c`.`Id1` = @p AND `c`.`Id2` = @p0 +WHERE `c`.`Id1` = @p AND `c`.`Id2` = @p1 """); } @@ -205,11 +205,11 @@ public override void Returns_null_for_composite_key_not_in_store() AssertSql( """ @p='77' -@p0='Fox' (Size = 255) +@p1='Fox' (Size = 255) SELECT TOP 1 `c`.`Id1`, `c`.`Id2`, `c`.`Foo` FROM `CompositeKey` AS `c` -WHERE `c`.`Id1` = @p AND `c`.`Id2` = @p0 +WHERE `c`.`Id1` = @p AND `c`.`Id2` = @p1 """); } diff --git a/test/EFCore.Jet.FunctionalTests/GraphUpdates/ProxyGraphUpdatesJetTest.cs b/test/EFCore.Jet.FunctionalTests/GraphUpdates/ProxyGraphUpdatesJetTest.cs index ad9dd8ad3..6fbcf9dca 100644 --- a/test/EFCore.Jet.FunctionalTests/GraphUpdates/ProxyGraphUpdatesJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/GraphUpdates/ProxyGraphUpdatesJetTest.cs @@ -78,6 +78,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con public class ChangeTracking(ChangeTracking.ProxyGraphUpdatesWithChangeTrackingJetFixture fixture) : ProxyGraphUpdatesJetTestBase(fixture) { + // Needs lazy loading + public override Task Save_two_entity_cycle_with_lazy_loading() + => Task.CompletedTask; + protected override bool DoesLazyLoading => false; protected override bool DoesChangeTracking => true; @@ -114,7 +118,7 @@ public class ChangeTrackingAndLazyLoading( public class ProxyGraphUpdatesWithChangeTrackingAndLazyLoadingJetFixture : ProxyGraphUpdatesJetFixtureBase { - protected override string StoreName { get; } = "ProxyGraphChangeTrackingAndLazyLoadingUpdatesTest"; + protected override string StoreName => "ProxyGraphChangeTrackingAndLazyLoadingUpdatesTest"; public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) => base.AddOptions(builder.UseLazyLoadingProxies().UseChangeTrackingProxies()); diff --git a/test/EFCore.Jet.FunctionalTests/JetEndToEndTest.cs b/test/EFCore.Jet.FunctionalTests/JetEndToEndTest.cs index 15ad17b78..4300527cd 100644 --- a/test/EFCore.Jet.FunctionalTests/JetEndToEndTest.cs +++ b/test/EFCore.Jet.FunctionalTests/JetEndToEndTest.cs @@ -224,44 +224,6 @@ private class ByteAdNum public string Lucy { get; set; } } - [ConditionalFact] // Issue #29931 - public async Task Can_use_SqlQuery_when_context_has_DbFunction() - { - await using var testDatabase = await JetTestStore.CreateInitializedAsync(DatabaseName); - var options = Fixture.CreateOptions(testDatabase); - using var context = new DbFunctionContext(options); - var result = context.Database - .SqlQueryRaw("SELECT Name from sys.databases") - .OrderBy(d => d.Name) - .ToList(); - } - - private class DbFunctionContext(DbContextOptions options) : DbContext(options) - { - [DbFunction("tvp", "dbo")] - public IQueryable Tvp(int? storeid) - => FromExpression(() => Tvp(storeid)); - - protected override void OnModelCreating(ModelBuilder modelBuilder) - => modelBuilder.Entity().HasNoKey(); - } - - private class TvpResult - { - public int Id { get; set; } - - [Required] - public string Name { get; set; } - - [Column(TypeName = "decimal(18,2)")] - public decimal Total { get; set; } - } - - private class RawResult - { - public string Name { get; set; } - } - [ConditionalFact] public async Task Can_use_string_enum_or_byte_array_as_key() { diff --git a/test/EFCore.Jet.FunctionalTests/LazyLoadProxyJetTest.cs b/test/EFCore.Jet.FunctionalTests/LazyLoadProxyJetTest.cs index 142e23e63..d4647fae7 100644 --- a/test/EFCore.Jet.FunctionalTests/LazyLoadProxyJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/LazyLoadProxyJetTest.cs @@ -364,11 +364,11 @@ public override void Lazy_load_collection_composite_key(EntityState state) AssertSql( $""" @p='Root' (Size = 255) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT `c`.`Id`, `c`.`ParentAlternateId`, `c`.`ParentId`, `c`.`Culture_Rating`, `c`.`Culture_Species`, `c`.`Culture_Subspecies`, `c`.`Culture_Validation`, `c`.`Culture_License_Charge`, `c`.`Culture_License_Title`, `c`.`Culture_License_Tag_Text`, `c`.`Culture_License_Tog_Text`, `c`.`Culture_Manufacturer_Name`, `c`.`Culture_Manufacturer_Rating`, `c`.`Culture_Manufacturer_Tag_Text`, `c`.`Culture_Manufacturer_Tog_Text`, `c`.`Milk_Rating`, `c`.`Milk_Species`, `c`.`Milk_Subspecies`, `c`.`Milk_Validation`, `c`.`Milk_License_Charge`, `c`.`Milk_License_Title`, `c`.`Milk_License_Tag_Text`, `c`.`Milk_License_Tog_Text`, `c`.`Milk_Manufacturer_Name`, `c`.`Milk_Manufacturer_Rating`, `c`.`Milk_Manufacturer_Tag_Text`, `c`.`Milk_Manufacturer_Tog_Text` FROM `ChildCompositeKey` AS `c` -WHERE `c`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `c`.`ParentId` = {AssertSqlHelper.Parameter("@p0")} +WHERE `c`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `c`.`ParentId` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -379,11 +379,11 @@ public override void Lazy_load_many_to_one_reference_to_principal_composite_key( AssertSql( $""" @p='Root' (Size = 255) -@p0='707' +@p1='707' SELECT TOP 1 `p`.`Id`, `p`.`AlternateId`, `p`.`Discriminator`, `p`.`Culture_Rating1`, `p`.`Culture_Species1`, `p`.`Culture_Subspecies1`, `p`.`Culture_Validation1`, `p`.`Culture_License_Charge`, `p`.`Culture_License_Title`, `p`.`Culture_License_Tag_Text`, `p`.`Culture_License_Tog_Text`, `p`.`Culture_Manufacturer_Name`, `p`.`Culture_Manufacturer_Rating`, `p`.`Culture_Manufacturer_Tag_Text`, `p`.`Culture_Manufacturer_Tog_Text`, `p`.`Milk_Rating1`, `p`.`Milk_Species1`, `p`.`Milk_Subspecies1`, `p`.`Milk_Validation1`, `p`.`Milk_License_Charge`, `p`.`Milk_License_Title`, `p`.`Milk_License_Tag_Text`, `p`.`Milk_License_Tog_Text`, `p`.`Milk_Manufacturer_Name`, `p`.`Milk_Manufacturer_Rating`, `p`.`Milk_Manufacturer_Tag_Text`, `p`.`Milk_Manufacturer_Tog_Text`, `p`.`Culture_Rating`, `p`.`Culture_Species`, `p`.`Culture_Subspecies`, `p`.`Culture_Validation`, `p`.`Milk_Rating`, `p`.`Milk_Species`, `p`.`Milk_Subspecies`, `p`.`Milk_Validation` FROM `Parent` AS `p` -WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p0")} +WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -394,11 +394,11 @@ public override void Lazy_load_one_to_one_reference_to_principal_composite_key(E AssertSql( $""" @p='Root' (Size = 255) -@p0='707' +@p1='707' SELECT TOP 1 `p`.`Id`, `p`.`AlternateId`, `p`.`Discriminator`, `p`.`Culture_Rating1`, `p`.`Culture_Species1`, `p`.`Culture_Subspecies1`, `p`.`Culture_Validation1`, `p`.`Culture_License_Charge`, `p`.`Culture_License_Title`, `p`.`Culture_License_Tag_Text`, `p`.`Culture_License_Tog_Text`, `p`.`Culture_Manufacturer_Name`, `p`.`Culture_Manufacturer_Rating`, `p`.`Culture_Manufacturer_Tag_Text`, `p`.`Culture_Manufacturer_Tog_Text`, `p`.`Milk_Rating1`, `p`.`Milk_Species1`, `p`.`Milk_Subspecies1`, `p`.`Milk_Validation1`, `p`.`Milk_License_Charge`, `p`.`Milk_License_Title`, `p`.`Milk_License_Tag_Text`, `p`.`Milk_License_Tog_Text`, `p`.`Milk_Manufacturer_Name`, `p`.`Milk_Manufacturer_Rating`, `p`.`Milk_Manufacturer_Tag_Text`, `p`.`Milk_Manufacturer_Tog_Text`, `p`.`Culture_Rating`, `p`.`Culture_Species`, `p`.`Culture_Subspecies`, `p`.`Culture_Validation`, `p`.`Milk_Rating`, `p`.`Milk_Species`, `p`.`Milk_Subspecies`, `p`.`Milk_Validation` FROM `Parent` AS `p` -WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p0")} +WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -409,11 +409,11 @@ public override void Lazy_load_one_to_one_reference_to_dependent_composite_key(E AssertSql( $""" @p='Root' (Size = 255) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT TOP 1 `s`.`Id`, `s`.`ParentAlternateId`, `s`.`ParentId`, `s`.`Culture_Rating`, `s`.`Culture_Species`, `s`.`Culture_Subspecies`, `s`.`Culture_Validation`, `s`.`Culture_License_Charge`, `s`.`Culture_License_Title`, `s`.`Culture_License_Tag_Text`, `s`.`Culture_License_Tog_Text`, `s`.`Culture_Manufacturer_Name`, `s`.`Culture_Manufacturer_Rating`, `s`.`Culture_Manufacturer_Tag_Text`, `s`.`Culture_Manufacturer_Tog_Text`, `s`.`Milk_Rating`, `s`.`Milk_Species`, `s`.`Milk_Subspecies`, `s`.`Milk_Validation`, `s`.`Milk_License_Charge`, `s`.`Milk_License_Title`, `s`.`Milk_License_Tag_Text`, `s`.`Milk_License_Tog_Text`, `s`.`Milk_Manufacturer_Name`, `s`.`Milk_Manufacturer_Rating`, `s`.`Milk_Manufacturer_Tag_Text`, `s`.`Milk_Manufacturer_Tog_Text` FROM `SingleCompositeKey` AS `s` -WHERE `s`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `s`.`ParentId` = {AssertSqlHelper.Parameter("@p0")} +WHERE `s`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `s`.`ParentId` = {AssertSqlHelper.Parameter("@p1")} """); } diff --git a/test/EFCore.Jet.FunctionalTests/LoadJetTest.cs b/test/EFCore.Jet.FunctionalTests/LoadJetTest.cs index e8c3c8c11..ff254b23e 100644 --- a/test/EFCore.Jet.FunctionalTests/LoadJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/LoadJetTest.cs @@ -385,11 +385,11 @@ public override void Lazy_load_collection_composite_key(EntityState state, Query ? "" : $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} -{AssertSqlHelper.Declaration("@p0='707' (Nullable = true)")} +{AssertSqlHelper.Declaration("@p1='707' (Nullable = true)")} SELECT `c`.`Id`, `c`.`ParentAlternateId`, `c`.`ParentId` FROM `ChildCompositeKey` AS `c` -WHERE `c`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `c`.`ParentId` = {AssertSqlHelper.Parameter("@p0")} +WHERE `c`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `c`.`ParentId` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -402,11 +402,11 @@ public override void Lazy_load_many_to_one_reference_to_principal_composite_key( ? "" : $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} -{AssertSqlHelper.Declaration("@p0='707'")} +{AssertSqlHelper.Declaration("@p1='707'")} SELECT TOP 1 `p`.`Id`, `p`.`AlternateId` FROM `Parent` AS `p` -WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p0")} +WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -419,11 +419,11 @@ public override void Lazy_load_one_to_one_reference_to_principal_composite_key(E ? "" : $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} -{AssertSqlHelper.Declaration("@p0='707'")} +{AssertSqlHelper.Declaration("@p1='707'")} SELECT TOP 1 `p`.`Id`, `p`.`AlternateId` FROM `Parent` AS `p` -WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p0")} +WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -436,11 +436,11 @@ public override void Lazy_load_one_to_one_reference_to_dependent_composite_key(E ? "" : $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} -{AssertSqlHelper.Declaration("@p0='707' (Nullable = true)")} +{AssertSqlHelper.Declaration("@p1='707' (Nullable = true)")} SELECT TOP 1 `s`.`Id`, `s`.`ParentAlternateId`, `s`.`ParentId` FROM `SingleCompositeKey` AS `s` -WHERE `s`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `s`.`ParentId` = {AssertSqlHelper.Parameter("@p0")} +WHERE `s`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `s`.`ParentId` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -1554,11 +1554,11 @@ public override async Task Load_collection_composite_key(EntityState state, bool AssertSql( $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} - {AssertSqlHelper.Declaration("@p0='707' (Nullable = true)")} + {AssertSqlHelper.Declaration("@p1='707' (Nullable = true)")} SELECT `c`.`Id`, `c`.`ParentAlternateId`, `c`.`ParentId` FROM `ChildCompositeKey` AS `c` - WHERE `c`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `c`.`ParentId` = {AssertSqlHelper.Parameter("@p0")} + WHERE `c`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `c`.`ParentId` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -1569,11 +1569,11 @@ public override async Task Load_many_to_one_reference_to_principal_composite_key AssertSql( $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} - {AssertSqlHelper.Declaration("@p0='707'")} + {AssertSqlHelper.Declaration("@p1='707'")} SELECT TOP 1 `p`.`Id`, `p`.`AlternateId` FROM `Parent` AS `p` - WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p0")} + WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -1584,11 +1584,11 @@ public override async Task Load_one_to_one_reference_to_principal_composite_key( AssertSql( $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} - {AssertSqlHelper.Declaration("@p0='707'")} + {AssertSqlHelper.Declaration("@p1='707'")} SELECT TOP 1 `p`.`Id`, `p`.`AlternateId` FROM `Parent` AS `p` - WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p0")} + WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -1599,11 +1599,11 @@ public override async Task Load_one_to_one_reference_to_dependent_composite_key( AssertSql( $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} - {AssertSqlHelper.Declaration("@p0='707' (Nullable = true)")} + {AssertSqlHelper.Declaration("@p1='707' (Nullable = true)")} SELECT TOP 1 `s`.`Id`, `s`.`ParentAlternateId`, `s`.`ParentId` FROM `SingleCompositeKey` AS `s` - WHERE `s`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `s`.`ParentId` = {AssertSqlHelper.Parameter("@p0")} + WHERE `s`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `s`.`ParentId` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -1614,11 +1614,11 @@ public override async Task Load_collection_using_Query_composite_key(EntityState AssertSql( $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} - {AssertSqlHelper.Declaration("@p0='707' (Nullable = true)")} + {AssertSqlHelper.Declaration("@p1='707' (Nullable = true)")} SELECT `c`.`Id`, `c`.`ParentAlternateId`, `c`.`ParentId` FROM `ChildCompositeKey` AS `c` - WHERE `c`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `c`.`ParentId` = {AssertSqlHelper.Parameter("@p0")} + WHERE `c`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `c`.`ParentId` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -1629,11 +1629,11 @@ public override async Task Load_many_to_one_reference_to_principal_using_Query_c AssertSql( $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} - {AssertSqlHelper.Declaration("@p0='707'")} + {AssertSqlHelper.Declaration("@p1='707'")} SELECT TOP 2 `p`.`Id`, `p`.`AlternateId` FROM `Parent` AS `p` - WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p0")} + WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -1644,11 +1644,11 @@ public override async Task Load_one_to_one_reference_to_principal_using_Query_co AssertSql( $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} - {AssertSqlHelper.Declaration("@p0='707'")} + {AssertSqlHelper.Declaration("@p1='707'")} SELECT TOP 2 `p`.`Id`, `p`.`AlternateId` FROM `Parent` AS `p` - WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p0")} + WHERE `p`.`AlternateId` = {AssertSqlHelper.Parameter("@p")} AND `p`.`Id` = {AssertSqlHelper.Parameter("@p1")} """); } @@ -1661,11 +1661,11 @@ public override async Task Load_one_to_one_reference_to_dependent_using_Query_co ? "" : $""" {AssertSqlHelper.Declaration("@p='Root' (Size = 255)")} -{AssertSqlHelper.Declaration("@p0='707' (Nullable = true)")} +{AssertSqlHelper.Declaration("@p1='707' (Nullable = true)")} SELECT TOP 2 `s`.`Id`, `s`.`ParentAlternateId`, `s`.`ParentId` FROM `SingleCompositeKey` AS `s` -WHERE `s`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `s`.`ParentId` = {AssertSqlHelper.Parameter("@p0")} +WHERE `s`.`ParentAlternateId` = {AssertSqlHelper.Parameter("@p")} AND `s`.`ParentId` = {AssertSqlHelper.Parameter("@p1")} """); } diff --git a/test/EFCore.Jet.FunctionalTests/Migrations/MigrationsInfrastructureJetTest.cs b/test/EFCore.Jet.FunctionalTests/Migrations/MigrationsInfrastructureJetTest.cs index fc934720d..a864fbb77 100644 --- a/test/EFCore.Jet.FunctionalTests/Migrations/MigrationsInfrastructureJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Migrations/MigrationsInfrastructureJetTest.cs @@ -315,208 +315,12 @@ DELETE FROM `__EFMigrationsHistory` public override async Task Can_generate_idempotent_up_and_down_scripts() { - await base.Can_generate_idempotent_up_and_down_scripts(); - - Assert.Equal( - """ -IF OBJECT_ID(N'[__EFMigrationsHistory]') IS NULL -BEGIN - CREATE TABLE [__EFMigrationsHistory] ( - [MigrationId] nvarchar(150) NOT NULL, - [ProductVersion] nvarchar(32) NOT NULL, - CONSTRAINT [PK___EFMigrationsHistory] PRIMARY KEY ([MigrationId]) - ); -END; -GO - -BEGIN TRANSACTION; -IF NOT EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1' -) -BEGIN - CREATE TABLE [Table1] ( - [Id] int NOT NULL, - [Foo] int NOT NULL, - [Description] nvarchar(max) NOT NULL, - CONSTRAINT [PK_Table1] PRIMARY KEY ([Id]) - ); -END; - -IF NOT EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1' -) -BEGIN - INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion]) - VALUES (N'00000000000001_Migration1', N'7.0.0-test'); -END; - -IF NOT EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2' -) -BEGIN - EXEC sp_rename N'[Table1].[Foo]', N'Bar', 'COLUMN'; -END; - -IF NOT EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2' -) -BEGIN - INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion]) - VALUES (N'00000000000002_Migration2', N'7.0.0-test'); -END; - -COMMIT; -GO - -BEGIN TRANSACTION; -IF EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2' -) -BEGIN - EXEC sp_rename N'[Table1].[Bar]', N'Foo', 'COLUMN'; -END; - -IF EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2' -) -BEGIN - DELETE FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2'; -END; - -IF EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1' -) -BEGIN - DROP TABLE [Table1]; -END; - -IF EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1' -) -BEGIN - DELETE FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1'; -END; - -COMMIT; -GO - - -""", - Sql, - ignoreLineEndingDifferences: true); + await Assert.ThrowsAsync(async () => await base.Can_generate_idempotent_up_and_down_scripts()); } public override async Task Can_generate_idempotent_up_and_down_scripts_noTransactions() { - await base.Can_generate_idempotent_up_and_down_scripts_noTransactions(); - - Assert.Equal( - """ -IF OBJECT_ID(N'[__EFMigrationsHistory]') IS NULL -BEGIN - CREATE TABLE [__EFMigrationsHistory] ( - [MigrationId] nvarchar(150) NOT NULL, - [ProductVersion] nvarchar(32) NOT NULL, - CONSTRAINT [PK___EFMigrationsHistory] PRIMARY KEY ([MigrationId]) - ); -END; -GO - -IF NOT EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1' -) -BEGIN - CREATE TABLE [Table1] ( - [Id] int NOT NULL, - [Foo] int NOT NULL, - [Description] nvarchar(max) NOT NULL, - CONSTRAINT [PK_Table1] PRIMARY KEY ([Id]) - ); -END; -GO - -IF NOT EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1' -) -BEGIN - INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion]) - VALUES (N'00000000000001_Migration1', N'7.0.0-test'); -END; -GO - -IF NOT EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2' -) -BEGIN - EXEC sp_rename N'[Table1].[Foo]', N'Bar', 'COLUMN'; -END; -GO - -IF NOT EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2' -) -BEGIN - INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion]) - VALUES (N'00000000000002_Migration2', N'7.0.0-test'); -END; -GO - -IF EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2' -) -BEGIN - EXEC sp_rename N'[Table1].[Bar]', N'Foo', 'COLUMN'; -END; -GO - -IF EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2' -) -BEGIN - DELETE FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000002_Migration2'; -END; -GO - -IF EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1' -) -BEGIN - DROP TABLE [Table1]; -END; -GO - -IF EXISTS ( - SELECT * FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1' -) -BEGIN - DELETE FROM [__EFMigrationsHistory] - WHERE [MigrationId] = N'00000000000001_Migration1'; -END; -GO - - -""", - Sql, - ignoreLineEndingDifferences: true); + await Assert.ThrowsAsync(async () => await base.Can_generate_idempotent_up_and_down_scripts_noTransactions()); } public override void Can_get_active_provider() diff --git a/test/EFCore.Jet.FunctionalTests/Migrations/MigrationsJetTest.cs b/test/EFCore.Jet.FunctionalTests/Migrations/MigrationsJetTest.cs index 5e02fecf5..b364910c8 100644 --- a/test/EFCore.Jet.FunctionalTests/Migrations/MigrationsJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Migrations/MigrationsJetTest.cs @@ -979,73 +979,6 @@ public override async Task Alter_column_remove_comment() ); } - [ConditionalFact] - public override async Task Alter_column_set_collation() - { - await base.Alter_column_set_collation(); - - AssertSql( - """ -DECLARE @var0 sysname; -SELECT @var0 = [d].[name] -FROM [sys].[default_constraints] [d] -INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id] -WHERE ([d].[parent_object_id] = OBJECT_ID(N'[People]') AND [c].[name] = N'Name'); -IF @var0 IS NOT NULL EXEC(N'ALTER TABLE [People] DROP CONSTRAINT [' + @var0 + '];'); -ALTER TABLE [People] ALTER COLUMN [Name] nvarchar(max) COLLATE German_PhoneBook_CI_AS NULL; -"""); - } - - [ConditionalFact] - public virtual async Task Alter_column_set_collation_with_index() - { - await Test( - builder => builder.Entity( - "People", e => - { - e.Property("Name"); - e.HasIndex("Name"); - }), - builder => { }, - builder => builder.Entity("People").Property("Name") - .UseCollation(NonDefaultCollation), - model => - { - var nameColumn = Assert.Single(Assert.Single(model.Tables).Columns); - Assert.Equal(NonDefaultCollation, nameColumn.Collation); - }); - - AssertSql( - """ -DROP INDEX [IX_People_Name] ON [People]; -DECLARE @var0 sysname; -SELECT @var0 = [d].[name] -FROM [sys].[default_constraints] [d] -INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id] -WHERE ([d].[parent_object_id] = OBJECT_ID(N'[People]') AND [c].[name] = N'Name'); -IF @var0 IS NOT NULL EXEC(N'ALTER TABLE [People] DROP CONSTRAINT [' + @var0 + '];'); -ALTER TABLE [People] ALTER COLUMN [Name] nvarchar(450) COLLATE German_PhoneBook_CI_AS NULL; -CREATE INDEX [IX_People_Name] ON [People] ([Name]); -"""); - } - - [ConditionalFact] - public override async Task Alter_column_reset_collation() - { - await base.Alter_column_reset_collation(); - - AssertSql( - """ -DECLARE @var0 sysname; -SELECT @var0 = [d].[name] -FROM [sys].[default_constraints] [d] -INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id] -WHERE ([d].[parent_object_id] = OBJECT_ID(N'[People]') AND [c].[name] = N'Name'); -IF @var0 IS NOT NULL EXEC(N'ALTER TABLE [People] DROP CONSTRAINT [' + @var0 + '];'); -ALTER TABLE [People] ALTER COLUMN [Name] nvarchar(max) NULL; -"""); - } - public override async Task Convert_json_entities_to_regular_owned() { await base.Convert_json_entities_to_regular_owned(); diff --git a/test/EFCore.Jet.FunctionalTests/Properties/AssemblyInfo.cs b/test/EFCore.Jet.FunctionalTests/Properties/AssemblyInfo.cs index 79c1ec15f..e54f6631c 100644 --- a/test/EFCore.Jet.FunctionalTests/Properties/AssemblyInfo.cs +++ b/test/EFCore.Jet.FunctionalTests/Properties/AssemblyInfo.cs @@ -9,7 +9,6 @@ #if FIXED_TEST_ORDER -[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly, DisableTestParallelization = true, MaxParallelThreads = 1)] [assembly: TestCollectionOrderer("EntityFrameworkCore.Jet.FunctionalTests.TestUtilities.Xunit." + nameof(AscendingTestCollectionOrderer), "EntityFrameworkCore.Jet.FunctionalTests")] [assembly: TestCaseOrderer("EntityFrameworkCore.Jet.FunctionalTests.TestUtilities.Xunit." + nameof(AscendingTestCaseOrderer), "EntityFrameworkCore.Jet.FunctionalTests")] diff --git a/test/EFCore.Jet.FunctionalTests/Query/AdHocPrecompiledQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/AdHocPrecompiledQueryJetTest.cs index 3147ff2b3..063073a4e 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/AdHocPrecompiledQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/AdHocPrecompiledQueryJetTest.cs @@ -45,6 +45,7 @@ WHERE CAST(JSON_VALUE([j].[IntList], '$[' + CAST(@__id_0 AS nvarchar(max)) + ']' """); } + [ConditionalFact(Skip = "Not supported in Jet")] public override async Task JsonScalar() { await base.JsonScalar(); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonCollectionJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonCollectionJetTest.cs index 4a9feee6e..dc743ef33 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonCollectionJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonCollectionJetTest.cs @@ -128,6 +128,18 @@ WHERE CAST(JSON_VALUE([r].[AssociateCollection], '$[' + CAST([r].[Id] - 1 AS nva """); } + public override async Task Index_on_nested_collection() + { + await base.Index_on_nested_collection(); + + AssertSql( + """ +SELECT [r].[Id], [r].[Name], [r].[AssociateCollection], [r].[OptionalAssociate], [r].[RequiredAssociate] +FROM [RootEntity] AS [r] +WHERE CAST(JSON_VALUE([r].[RequiredAssociate], '$.NestedCollection[0].Int') AS int) = 8 +"""); + } + public override async Task Index_out_of_bounds() { await base.Index_out_of_bounds(); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonMiscellaneousJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonMiscellaneousJetTest.cs index 6805be6db..16a5b1e62 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonMiscellaneousJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonMiscellaneousJetTest.cs @@ -89,6 +89,19 @@ public override async Task Where_HasValue_on_nullable_value_type() #endregion Value types + public override async Task FromSql_on_root() + { + await base.FromSql_on_root(); + + AssertSql( + """ +SELECT `m`.`Id`, `m`.`Name`, `m`.`AssociateCollection`, `m`.`OptionalAssociate`, `m`.`RequiredAssociate` +FROM ( + SELECT * FROM `RootEntity` +) AS `m` +"""); + } + [ConditionalFact] public virtual void Check_all_tests_overridden() => TestHelpers.AssertAllMethodsOverridden(GetType()); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateJetTest.cs index adcff9794..39fbba659 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateJetTest.cs @@ -481,11 +481,11 @@ public override async Task Update_multiple_properties_inside_same_associate() AssertExecuteUpdateSql( """ @p='foo_updated' (Size = 255) -@p0='20' +@p1='20' UPDATE `RootEntity` AS `r` SET `r`.`RequiredAssociate_String` = @p, - `r`.`RequiredAssociate_Int` = @p0 + `r`.`RequiredAssociate_Int` = @p1 """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousJetTest.cs index 3b42f20f1..ef76a9530 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousJetTest.cs @@ -87,6 +87,16 @@ public override async Task Where_HasValue_on_nullable_value_type() #endregion Value types + public override async Task FromSql_on_root() + { + await base.FromSql_on_root(); + + AssertSql( + """ +SELECT * FROM `RootEntity` +"""); + } + [ConditionalFact] public virtual void Check_all_tests_overridden() => TestHelpers.AssertAllMethodsOverridden(GetType()); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionJetTest.cs index ffe1ca727..82ab76332 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionJetTest.cs @@ -203,6 +203,13 @@ public override async Task Index_column() AssertSql(); } + public override async Task Index_on_nested_collection() + { + await base.Index_on_nested_collection(); + + AssertSql(); + } + public override async Task Index_out_of_bounds() { await base.Index_out_of_bounds(); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousJetTest.cs index cb2a6a58a..81b08c0b9 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/Navigations/NavigationsMiscellaneousJetTest.cs @@ -99,6 +99,36 @@ LEFT JOIN ( #endregion Simple filters + public override async Task FromSql_on_root() + { + await base.FromSql_on_root(); + + AssertSql( + """ +SELECT `m`.`Id`, `m`.`Name`, `m`.`OptionalAssociateId`, `m`.`RequiredAssociateId`, `a`.`Id`, `n`.`Id`, `n0`.`Id`, `a0`.`Id`, `n1`.`Id`, `n2`.`Id`, `s`.`Id`, `s`.`CollectionRootId`, `s`.`Int`, `s`.`Ints`, `s`.`Name`, `s`.`OptionalNestedAssociateId`, `s`.`RequiredNestedAssociateId`, `s`.`String`, `s`.`Id0`, `s`.`Id1`, `s`.`Id2`, `s`.`CollectionAssociateId`, `s`.`Int0`, `s`.`Ints0`, `s`.`Name0`, `s`.`String0`, `s`.`CollectionAssociateId0`, `s`.`Int1`, `s`.`Ints1`, `s`.`Name1`, `s`.`String1`, `s`.`CollectionAssociateId1`, `s`.`Int2`, `s`.`Ints2`, `s`.`Name2`, `s`.`String2`, `a`.`CollectionRootId`, `a`.`Int`, `a`.`Ints`, `a`.`Name`, `a`.`OptionalNestedAssociateId`, `a`.`RequiredNestedAssociateId`, `a`.`String`, `n6`.`Id`, `n6`.`CollectionAssociateId`, `n6`.`Int`, `n6`.`Ints`, `n6`.`Name`, `n6`.`String`, `n`.`CollectionAssociateId`, `n`.`Int`, `n`.`Ints`, `n`.`Name`, `n`.`String`, `n0`.`CollectionAssociateId`, `n0`.`Int`, `n0`.`Ints`, `n0`.`Name`, `n0`.`String`, `a0`.`CollectionRootId`, `a0`.`Int`, `a0`.`Ints`, `a0`.`Name`, `a0`.`OptionalNestedAssociateId`, `a0`.`RequiredNestedAssociateId`, `a0`.`String`, `n7`.`Id`, `n7`.`CollectionAssociateId`, `n7`.`Int`, `n7`.`Ints`, `n7`.`Name`, `n7`.`String`, `n1`.`CollectionAssociateId`, `n1`.`Int`, `n1`.`Ints`, `n1`.`Name`, `n1`.`String`, `n2`.`CollectionAssociateId`, `n2`.`Int`, `n2`.`Ints`, `n2`.`Name`, `n2`.`String` +FROM ((((((((( + SELECT * FROM `RootEntity` +) AS `m` +LEFT JOIN `AssociateType` AS `a` ON `m`.`OptionalAssociateId` = `a`.`Id`) +LEFT JOIN `NestedAssociateType` AS `n` ON `a`.`OptionalNestedAssociateId` = `n`.`Id`) +LEFT JOIN `NestedAssociateType` AS `n0` ON `a`.`RequiredNestedAssociateId` = `n0`.`Id`) +INNER JOIN `AssociateType` AS `a0` ON `m`.`RequiredAssociateId` = `a0`.`Id`) +LEFT JOIN `NestedAssociateType` AS `n1` ON `a0`.`OptionalNestedAssociateId` = `n1`.`Id`) +LEFT JOIN `NestedAssociateType` AS `n2` ON `a0`.`RequiredNestedAssociateId` = `n2`.`Id`) +LEFT JOIN ( + SELECT `a1`.`Id`, `a1`.`CollectionRootId`, `a1`.`Int`, `a1`.`Ints`, `a1`.`Name`, `a1`.`OptionalNestedAssociateId`, `a1`.`RequiredNestedAssociateId`, `a1`.`String`, `n3`.`Id` AS `Id0`, `n4`.`Id` AS `Id1`, `n5`.`Id` AS `Id2`, `n5`.`CollectionAssociateId`, `n5`.`Int` AS `Int0`, `n5`.`Ints` AS `Ints0`, `n5`.`Name` AS `Name0`, `n5`.`String` AS `String0`, `n3`.`CollectionAssociateId` AS `CollectionAssociateId0`, `n3`.`Int` AS `Int1`, `n3`.`Ints` AS `Ints1`, `n3`.`Name` AS `Name1`, `n3`.`String` AS `String1`, `n4`.`CollectionAssociateId` AS `CollectionAssociateId1`, `n4`.`Int` AS `Int2`, `n4`.`Ints` AS `Ints2`, `n4`.`Name` AS `Name2`, `n4`.`String` AS `String2` + FROM ((`AssociateType` AS `a1` + LEFT JOIN `NestedAssociateType` AS `n3` ON `a1`.`OptionalNestedAssociateId` = `n3`.`Id`) + INNER JOIN `NestedAssociateType` AS `n4` ON `a1`.`RequiredNestedAssociateId` = `n4`.`Id`) + LEFT JOIN `NestedAssociateType` AS `n5` ON `a1`.`Id` = `n5`.`CollectionAssociateId` +) AS `s` ON `m`.`Id` = `s`.`CollectionRootId`) +LEFT JOIN `NestedAssociateType` AS `n6` ON `a`.`Id` = `n6`.`CollectionAssociateId`) +LEFT JOIN `NestedAssociateType` AS `n7` ON `a0`.`Id` = `n7`.`CollectionAssociateId` +WHERE `a0`.`RequiredNestedAssociateId` IS NOT NULL AND `n2`.`Id` IS NOT NULL +ORDER BY `m`.`Id`, `a`.`Id`, `n`.`Id`, `n0`.`Id`, `a0`.`Id`, `n1`.`Id`, `n2`.`Id`, `s`.`Id`, `s`.`Id0`, `s`.`Id1`, `s`.`Id2`, `n6`.`Id` +"""); + } + [ConditionalFact] public virtual void Check_all_tests_overridden() => TestHelpers.AssertAllMethodsOverridden(GetType()); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedJson/OwnedJsonCollectionJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedJson/OwnedJsonCollectionJetTest.cs index 18a9abce1..16208a527 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedJson/OwnedJsonCollectionJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedJson/OwnedJsonCollectionJetTest.cs @@ -184,6 +184,18 @@ WHERE CAST(JSON_VALUE([r].[AssociateCollection], '$[' + CAST([r].[Id] - 1 AS nva """); } + public override async Task Index_on_nested_collection() + { + await base.Index_on_nested_collection(); + + AssertSql( + """ +SELECT [r].[Id], [r].[Name], [r].[AssociateCollection], [r].[OptionalAssociate], [r].[RequiredAssociate] +FROM [RootEntity] AS [r] +WHERE CAST(JSON_VALUE([r].[RequiredAssociate], '$.NestedCollection[0].Int') AS int) = 8 +"""); + } + public override async Task Index_out_of_bounds() { await base.Index_out_of_bounds(); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedJson/OwnedJsonMiscellaneousJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedJson/OwnedJsonMiscellaneousJetTest.cs index a64f673da..eca2c3360 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedJson/OwnedJsonMiscellaneousJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedJson/OwnedJsonMiscellaneousJetTest.cs @@ -51,6 +51,19 @@ WHERE CAST(JSON_VALUE([r].[RequiredAssociate], '$.RequiredNestedAssociate.Int') #endregion Simple filters + public override async Task FromSql_on_root() + { + await base.FromSql_on_root(); + + AssertSql( + """ +SELECT `m`.`Id`, `m`.`Name`, `m`.`AssociateCollection`, `m`.`OptionalAssociate`, `m`.`RequiredAssociate` +FROM ( + SELECT * FROM `RootEntity` +) AS `m` +"""); + } + [ConditionalFact] public virtual void Check_all_tests_overridden() => TestHelpers.AssertAllMethodsOverridden(GetType()); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionJetTest.cs index 5a1b9167c..1625545d5 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionJetTest.cs @@ -206,6 +206,13 @@ public override async Task Index_column() AssertSql(); } + public override async Task Index_on_nested_collection() + { + await base.Index_on_nested_collection(); + + AssertSql(); + } + public override async Task Index_out_of_bounds() { await base.Index_out_of_bounds(); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousJetTest.cs index 8e93c52c1..95eb42645 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMiscellaneousJetTest.cs @@ -99,6 +99,35 @@ LEFT JOIN ( #endregion Simple filters + public override async Task FromSql_on_root() + { + await base.FromSql_on_root(); + + AssertSql( + """ +SELECT `m`.`Id`, `m`.`Name`, `o`.`RootEntityId`, `o0`.`AssociateTypeRootEntityId`, `o1`.`AssociateTypeRootEntityId`, `r`.`RootEntityId`, `r0`.`AssociateTypeRootEntityId`, `r1`.`AssociateTypeRootEntityId`, `s`.`RootEntityId`, `s`.`Id`, `s`.`Int`, `s`.`Ints`, `s`.`Name`, `s`.`String`, `s`.`AssociateTypeRootEntityId`, `s`.`AssociateTypeId`, `s`.`AssociateTypeRootEntityId0`, `s`.`AssociateTypeId0`, `s`.`AssociateTypeRootEntityId1`, `s`.`AssociateTypeId1`, `s`.`Id0`, `s`.`Int0`, `s`.`Ints0`, `s`.`Name0`, `s`.`String0`, `s`.`Id1`, `s`.`Int1`, `s`.`Ints1`, `s`.`Name1`, `s`.`String1`, `s`.`Id2`, `s`.`Int2`, `s`.`Ints2`, `s`.`Name2`, `s`.`String2`, `o`.`Id`, `o`.`Int`, `o`.`Ints`, `o`.`Name`, `o`.`String`, `o2`.`AssociateTypeRootEntityId`, `o2`.`Id`, `o2`.`Int`, `o2`.`Ints`, `o2`.`Name`, `o2`.`String`, `o0`.`Id`, `o0`.`Int`, `o0`.`Ints`, `o0`.`Name`, `o0`.`String`, `o1`.`Id`, `o1`.`Int`, `o1`.`Ints`, `o1`.`Name`, `o1`.`String`, `r`.`Id`, `r`.`Int`, `r`.`Ints`, `r`.`Name`, `r`.`String`, `r6`.`AssociateTypeRootEntityId`, `r6`.`Id`, `r6`.`Int`, `r6`.`Ints`, `r6`.`Name`, `r6`.`String`, `r0`.`Id`, `r0`.`Int`, `r0`.`Ints`, `r0`.`Name`, `r0`.`String`, `r1`.`Id`, `r1`.`Int`, `r1`.`Ints`, `r1`.`Name`, `r1`.`String` +FROM ((((((((( + SELECT * FROM `RootEntity` +) AS `m` +LEFT JOIN `OptionalRelated` AS `o` ON `m`.`Id` = `o`.`RootEntityId`) +LEFT JOIN `OptionalRelated_OptionalNested` AS `o0` ON `o`.`RootEntityId` = `o0`.`AssociateTypeRootEntityId`) +LEFT JOIN `OptionalRelated_RequiredNested` AS `o1` ON `o`.`RootEntityId` = `o1`.`AssociateTypeRootEntityId`) +LEFT JOIN `RequiredRelated` AS `r` ON `m`.`Id` = `r`.`RootEntityId`) +LEFT JOIN `RequiredRelated_OptionalNested` AS `r0` ON `r`.`RootEntityId` = `r0`.`AssociateTypeRootEntityId`) +LEFT JOIN `RequiredRelated_RequiredNested` AS `r1` ON `r`.`RootEntityId` = `r1`.`AssociateTypeRootEntityId`) +LEFT JOIN ( + SELECT `r2`.`RootEntityId`, `r2`.`Id`, `r2`.`Int`, `r2`.`Ints`, `r2`.`Name`, `r2`.`String`, `r3`.`AssociateTypeRootEntityId`, `r3`.`AssociateTypeId`, `r4`.`AssociateTypeRootEntityId` AS `AssociateTypeRootEntityId0`, `r4`.`AssociateTypeId` AS `AssociateTypeId0`, `r5`.`AssociateTypeRootEntityId` AS `AssociateTypeRootEntityId1`, `r5`.`AssociateTypeId` AS `AssociateTypeId1`, `r5`.`Id` AS `Id0`, `r5`.`Int` AS `Int0`, `r5`.`Ints` AS `Ints0`, `r5`.`Name` AS `Name0`, `r5`.`String` AS `String0`, `r3`.`Id` AS `Id1`, `r3`.`Int` AS `Int1`, `r3`.`Ints` AS `Ints1`, `r3`.`Name` AS `Name1`, `r3`.`String` AS `String1`, `r4`.`Id` AS `Id2`, `r4`.`Int` AS `Int2`, `r4`.`Ints` AS `Ints2`, `r4`.`Name` AS `Name2`, `r4`.`String` AS `String2` + FROM ((`RelatedCollection` AS `r2` + LEFT JOIN `RelatedCollection_OptionalNested` AS `r3` ON `r2`.`RootEntityId` = `r3`.`AssociateTypeRootEntityId` AND `r2`.`Id` = `r3`.`AssociateTypeId`) + LEFT JOIN `RelatedCollection_RequiredNested` AS `r4` ON `r2`.`RootEntityId` = `r4`.`AssociateTypeRootEntityId` AND `r2`.`Id` = `r4`.`AssociateTypeId`) + LEFT JOIN `RelatedCollection_NestedCollection` AS `r5` ON `r2`.`RootEntityId` = `r5`.`AssociateTypeRootEntityId` AND `r2`.`Id` = `r5`.`AssociateTypeId` +) AS `s` ON `m`.`Id` = `s`.`RootEntityId`) +LEFT JOIN `OptionalRelated_NestedCollection` AS `o2` ON `o`.`RootEntityId` = `o2`.`AssociateTypeRootEntityId`) +LEFT JOIN `RequiredRelated_NestedCollection` AS `r6` ON `r`.`RootEntityId` = `r6`.`AssociateTypeRootEntityId` +ORDER BY `m`.`Id`, `o`.`RootEntityId`, `o0`.`AssociateTypeRootEntityId`, `o1`.`AssociateTypeRootEntityId`, `r`.`RootEntityId`, `r0`.`AssociateTypeRootEntityId`, `r1`.`AssociateTypeRootEntityId`, `s`.`RootEntityId`, `s`.`Id`, `s`.`AssociateTypeRootEntityId`, `s`.`AssociateTypeId`, `s`.`AssociateTypeRootEntityId0`, `s`.`AssociateTypeId0`, `s`.`AssociateTypeRootEntityId1`, `s`.`AssociateTypeId1`, `s`.`Id0`, `o2`.`AssociateTypeRootEntityId`, `o2`.`Id`, `r6`.`AssociateTypeRootEntityId` +"""); + } + [ConditionalFact] public virtual void Check_all_tests_overridden() => TestHelpers.AssertAllMethodsOverridden(GetType()); diff --git a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousJetTest.cs index 47eb55235..7cf6d6172 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousJetTest.cs @@ -81,6 +81,31 @@ WHEN [r].[OptionalAssociate_Id] IS NOT NULL AND [r].[OptionalAssociate_Int] IS N #endregion Simple filters + public override async Task FromSql_on_root() + { + await base.FromSql_on_root(); + + AssertSql( + """ +SELECT [m].[Id], [m].[Name], [r].[Id], [r0].[Id], [s].[RootEntityId], [s].[Id], [s].[Int], [s].[Ints], [s].[Name], [s].[String], [s].[AssociateTypeRootEntityId], [s].[AssociateTypeId], [s].[Id0], [s].[Int0], [s].[Ints0], [s].[Name0], [s].[String0], [s].[OptionalNestedAssociate_Id], [s].[OptionalNestedAssociate_Int], [s].[OptionalNestedAssociate_Ints], [s].[OptionalNestedAssociate_Name], [s].[OptionalNestedAssociate_String], [s].[RequiredNestedAssociate_Id], [s].[RequiredNestedAssociate_Int], [s].[RequiredNestedAssociate_Ints], [s].[RequiredNestedAssociate_Name], [s].[RequiredNestedAssociate_String], [r].[OptionalAssociate_Id], [r].[OptionalAssociate_Int], [r].[OptionalAssociate_Ints], [r].[OptionalAssociate_Name], [r].[OptionalAssociate_String], [o].[AssociateTypeRootEntityId], [o].[Id], [o].[Int], [o].[Ints], [o].[Name], [o].[String], [r].[OptionalAssociate_OptionalNestedAssociate_Id], [r].[OptionalAssociate_OptionalNestedAssociate_Int], [r].[OptionalAssociate_OptionalNestedAssociate_Ints], [r].[OptionalAssociate_OptionalNestedAssociate_Name], [r].[OptionalAssociate_OptionalNestedAssociate_String], [r].[OptionalAssociate_RequiredNestedAssociate_Id], [r].[OptionalAssociate_RequiredNestedAssociate_Int], [r].[OptionalAssociate_RequiredNestedAssociate_Ints], [r].[OptionalAssociate_RequiredNestedAssociate_Name], [r].[OptionalAssociate_RequiredNestedAssociate_String], [r0].[RequiredAssociate_Id], [r0].[RequiredAssociate_Int], [r0].[RequiredAssociate_Ints], [r0].[RequiredAssociate_Name], [r0].[RequiredAssociate_String], [r3].[AssociateTypeRootEntityId], [r3].[Id], [r3].[Int], [r3].[Ints], [r3].[Name], [r3].[String], [r0].[RequiredAssociate_OptionalNestedAssociate_Id], [r0].[RequiredAssociate_OptionalNestedAssociate_Int], [r0].[RequiredAssociate_OptionalNestedAssociate_Ints], [r0].[RequiredAssociate_OptionalNestedAssociate_Name], [r0].[RequiredAssociate_OptionalNestedAssociate_String], [r0].[RequiredAssociate_RequiredNestedAssociate_Id], [r0].[RequiredAssociate_RequiredNestedAssociate_Int], [r0].[RequiredAssociate_RequiredNestedAssociate_Ints], [r0].[RequiredAssociate_RequiredNestedAssociate_Name], [r0].[RequiredAssociate_RequiredNestedAssociate_String] +FROM ( + SELECT * FROM [RootEntity] +) AS [m] +LEFT JOIN [RootEntity] AS [r] ON [m].[Id] = [r].[Id] +LEFT JOIN [RootEntity] AS [r0] ON [m].[Id] = [r0].[Id] +LEFT JOIN ( + SELECT [r1].[RootEntityId], [r1].[Id], [r1].[Int], [r1].[Ints], [r1].[Name], [r1].[String], [r2].[AssociateTypeRootEntityId], [r2].[AssociateTypeId], [r2].[Id] AS [Id0], [r2].[Int] AS [Int0], [r2].[Ints] AS [Ints0], [r2].[Name] AS [Name0], [r2].[String] AS [String0], [r1].[OptionalNestedAssociate_Id], [r1].[OptionalNestedAssociate_Int], [r1].[OptionalNestedAssociate_Ints], [r1].[OptionalNestedAssociate_Name], [r1].[OptionalNestedAssociate_String], [r1].[RequiredNestedAssociate_Id], [r1].[RequiredNestedAssociate_Int], [r1].[RequiredNestedAssociate_Ints], [r1].[RequiredNestedAssociate_Name], [r1].[RequiredNestedAssociate_String] + FROM [RelatedCollection] AS [r1] + LEFT JOIN [RelatedCollection_NestedCollection] AS [r2] ON [r1].[RootEntityId] = [r2].[AssociateTypeRootEntityId] AND [r1].[Id] = [r2].[AssociateTypeId] +) AS [s] ON [m].[Id] = [s].[RootEntityId] +LEFT JOIN [OptionalRelated_NestedCollection] AS [o] ON CASE + WHEN [r].[OptionalAssociate_Id] IS NOT NULL AND [r].[OptionalAssociate_Int] IS NOT NULL AND [r].[OptionalAssociate_Ints] IS NOT NULL AND [r].[OptionalAssociate_Name] IS NOT NULL AND [r].[OptionalAssociate_String] IS NOT NULL THEN [r].[Id] +END = [o].[AssociateTypeRootEntityId] +LEFT JOIN [RequiredRelated_NestedCollection] AS [r3] ON [r0].[Id] = [r3].[AssociateTypeRootEntityId] +ORDER BY [m].[Id], [r].[Id], [r0].[Id], [s].[RootEntityId], [s].[Id], [s].[AssociateTypeRootEntityId], [s].[AssociateTypeId], [s].[Id0], [o].[AssociateTypeRootEntityId], [o].[Id], [r3].[AssociateTypeRootEntityId] +"""); + } + [ConditionalFact] public virtual void Check_all_tests_overridden() => TestHelpers.AssertAllMethodsOverridden(GetType()); diff --git a/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsCollectionsQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsCollectionsQueryJetTest.cs index e2c8ec26b..4edee0804 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsCollectionsQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsCollectionsQueryJetTest.cs @@ -208,9 +208,9 @@ public override async Task Complex_multi_include_with_order_by_and_paging(bool a """ SELECT `l1`.`Id`, `l1`.`Date`, `l1`.`Name`, `l1`.`OneToMany_Optional_Self_Inverse1Id`, `l1`.`OneToMany_Required_Self_Inverse1Id`, `l1`.`OneToOne_Optional_Self1Id`, `l0`.`Id`, `l0`.`Date`, `l0`.`Level1_Optional_Id`, `l0`.`Level1_Required_Id`, `l0`.`Name`, `l0`.`OneToMany_Optional_Inverse2Id`, `l0`.`OneToMany_Optional_Self_Inverse2Id`, `l0`.`OneToMany_Required_Inverse2Id`, `l0`.`OneToMany_Required_Self_Inverse2Id`, `l0`.`OneToOne_Optional_PK_Inverse2Id`, `l0`.`OneToOne_Optional_Self2Id`, `l2`.`Id`, `l2`.`Level2_Optional_Id`, `l2`.`Level2_Required_Id`, `l2`.`Name`, `l2`.`OneToMany_Optional_Inverse3Id`, `l2`.`OneToMany_Optional_Self_Inverse3Id`, `l2`.`OneToMany_Required_Inverse3Id`, `l2`.`OneToMany_Required_Self_Inverse3Id`, `l2`.`OneToOne_Optional_PK_Inverse3Id`, `l2`.`OneToOne_Optional_Self3Id`, `l3`.`Id`, `l3`.`Level2_Optional_Id`, `l3`.`Level2_Required_Id`, `l3`.`Name`, `l3`.`OneToMany_Optional_Inverse3Id`, `l3`.`OneToMany_Optional_Self_Inverse3Id`, `l3`.`OneToMany_Required_Inverse3Id`, `l3`.`OneToMany_Required_Self_Inverse3Id`, `l3`.`OneToOne_Optional_PK_Inverse3Id`, `l3`.`OneToOne_Optional_Self3Id` FROM ((( - SELECT TOP @p0 `l4`.`Id`, `l4`.`Date`, `l4`.`Name`, `l4`.`OneToMany_Optional_Self_Inverse1Id`, `l4`.`OneToMany_Required_Self_Inverse1Id`, `l4`.`OneToOne_Optional_Self1Id` + SELECT TOP @p1 `l4`.`Id`, `l4`.`Date`, `l4`.`Name`, `l4`.`OneToMany_Optional_Self_Inverse1Id`, `l4`.`OneToMany_Required_Self_Inverse1Id`, `l4`.`OneToOne_Optional_Self1Id` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l4` @@ -231,9 +231,9 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ """ SELECT `l1`.`Id`, `l1`.`Date`, `l1`.`Name`, `l1`.`OneToMany_Optional_Self_Inverse1Id`, `l1`.`OneToMany_Required_Self_Inverse1Id`, `l1`.`OneToOne_Optional_Self1Id`, `l0`.`Id`, `l0`.`Date`, `l0`.`Level1_Optional_Id`, `l0`.`Level1_Required_Id`, `l0`.`Name`, `l0`.`OneToMany_Optional_Inverse2Id`, `l0`.`OneToMany_Optional_Self_Inverse2Id`, `l0`.`OneToMany_Required_Inverse2Id`, `l0`.`OneToMany_Required_Self_Inverse2Id`, `l0`.`OneToOne_Optional_PK_Inverse2Id`, `l0`.`OneToOne_Optional_Self2Id`, `l2`.`Id`, `l3`.`Id`, `l3`.`Level2_Optional_Id`, `l3`.`Level2_Required_Id`, `l3`.`Name`, `l3`.`OneToMany_Optional_Inverse3Id`, `l3`.`OneToMany_Optional_Self_Inverse3Id`, `l3`.`OneToMany_Required_Inverse3Id`, `l3`.`OneToMany_Required_Self_Inverse3Id`, `l3`.`OneToOne_Optional_PK_Inverse3Id`, `l3`.`OneToOne_Optional_Self3Id`, `l2`.`Date`, `l2`.`Level1_Optional_Id`, `l2`.`Level1_Required_Id`, `l2`.`Name`, `l2`.`OneToMany_Optional_Inverse2Id`, `l2`.`OneToMany_Optional_Self_Inverse2Id`, `l2`.`OneToMany_Required_Inverse2Id`, `l2`.`OneToMany_Required_Self_Inverse2Id`, `l2`.`OneToOne_Optional_PK_Inverse2Id`, `l2`.`OneToOne_Optional_Self2Id`, `l4`.`Id`, `l4`.`Level2_Optional_Id`, `l4`.`Level2_Required_Id`, `l4`.`Name`, `l4`.`OneToMany_Optional_Inverse3Id`, `l4`.`OneToMany_Optional_Self_Inverse3Id`, `l4`.`OneToMany_Required_Inverse3Id`, `l4`.`OneToMany_Required_Self_Inverse3Id`, `l4`.`OneToOne_Optional_PK_Inverse3Id`, `l4`.`OneToOne_Optional_Self3Id` FROM (((( - SELECT TOP @p0 `l5`.`Id`, `l5`.`Date`, `l5`.`Name`, `l5`.`OneToMany_Optional_Self_Inverse1Id`, `l5`.`OneToMany_Required_Self_Inverse1Id`, `l5`.`OneToOne_Optional_Self1Id` + SELECT TOP @p1 `l5`.`Id`, `l5`.`Date`, `l5`.`Name`, `l5`.`OneToMany_Optional_Self_Inverse1Id`, `l5`.`OneToMany_Required_Self_Inverse1Id`, `l5`.`OneToOne_Optional_Self1Id` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l5` @@ -255,9 +255,9 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ """ SELECT `l1`.`Id`, `l1`.`Date`, `l1`.`Name`, `l1`.`OneToMany_Optional_Self_Inverse1Id`, `l1`.`OneToMany_Required_Self_Inverse1Id`, `l1`.`OneToOne_Optional_Self1Id`, `l0`.`Id`, `l0`.`Date`, `l0`.`Level1_Optional_Id`, `l0`.`Level1_Required_Id`, `l0`.`Name`, `l0`.`OneToMany_Optional_Inverse2Id`, `l0`.`OneToMany_Optional_Self_Inverse2Id`, `l0`.`OneToMany_Required_Inverse2Id`, `l0`.`OneToMany_Required_Self_Inverse2Id`, `l0`.`OneToOne_Optional_PK_Inverse2Id`, `l0`.`OneToOne_Optional_Self2Id`, `l2`.`Id`, `l2`.`Level2_Optional_Id`, `l2`.`Level2_Required_Id`, `l2`.`Name`, `l2`.`OneToMany_Optional_Inverse3Id`, `l2`.`OneToMany_Optional_Self_Inverse3Id`, `l2`.`OneToMany_Required_Inverse3Id`, `l2`.`OneToMany_Required_Self_Inverse3Id`, `l2`.`OneToOne_Optional_PK_Inverse3Id`, `l2`.`OneToOne_Optional_Self3Id`, `l3`.`Id`, `l3`.`Level3_Optional_Id`, `l3`.`Level3_Required_Id`, `l3`.`Name`, `l3`.`OneToMany_Optional_Inverse4Id`, `l3`.`OneToMany_Optional_Self_Inverse4Id`, `l3`.`OneToMany_Required_Inverse4Id`, `l3`.`OneToMany_Required_Self_Inverse4Id`, `l3`.`OneToOne_Optional_PK_Inverse4Id`, `l3`.`OneToOne_Optional_Self4Id` FROM ((( - SELECT TOP @p0 `l4`.`Id`, `l4`.`Date`, `l4`.`Name`, `l4`.`OneToMany_Optional_Self_Inverse1Id`, `l4`.`OneToMany_Required_Self_Inverse1Id`, `l4`.`OneToOne_Optional_Self1Id` + SELECT TOP @p1 `l4`.`Id`, `l4`.`Date`, `l4`.`Name`, `l4`.`OneToMany_Optional_Self_Inverse1Id`, `l4`.`OneToMany_Required_Self_Inverse1Id`, `l4`.`OneToOne_Optional_Self1Id` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l4` diff --git a/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQueryJetTest.cs index b7fd6fba3..de586007d 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQueryJetTest.cs @@ -2001,9 +2001,9 @@ public override async Task Complex_multi_include_with_order_by_and_paging(bool a """ SELECT `l1`.`Id`, `l1`.`Date`, `l1`.`Name`, `l1`.`OneToMany_Optional_Self_Inverse1Id`, `l1`.`OneToMany_Required_Self_Inverse1Id`, `l1`.`OneToOne_Optional_Self1Id`, `l0`.`Id`, `l0`.`Date`, `l0`.`Level1_Optional_Id`, `l0`.`Level1_Required_Id`, `l0`.`Name`, `l0`.`OneToMany_Optional_Inverse2Id`, `l0`.`OneToMany_Optional_Self_Inverse2Id`, `l0`.`OneToMany_Required_Inverse2Id`, `l0`.`OneToMany_Required_Self_Inverse2Id`, `l0`.`OneToOne_Optional_PK_Inverse2Id`, `l0`.`OneToOne_Optional_Self2Id` FROM ( - SELECT TOP @p0 `l2`.`Id`, `l2`.`Date`, `l2`.`Name`, `l2`.`OneToMany_Optional_Self_Inverse1Id`, `l2`.`OneToMany_Required_Self_Inverse1Id`, `l2`.`OneToOne_Optional_Self1Id` + SELECT TOP @p1 `l2`.`Id`, `l2`.`Date`, `l2`.`Name`, `l2`.`OneToMany_Optional_Self_Inverse1Id`, `l2`.`OneToMany_Required_Self_Inverse1Id`, `l2`.`OneToOne_Optional_Self1Id` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l2` @@ -2016,9 +2016,9 @@ ORDER BY `l2`.`Name` DESC """ SELECT `l2`.`Id`, `l2`.`Level2_Optional_Id`, `l2`.`Level2_Required_Id`, `l2`.`Name`, `l2`.`OneToMany_Optional_Inverse3Id`, `l2`.`OneToMany_Optional_Self_Inverse3Id`, `l2`.`OneToMany_Required_Inverse3Id`, `l2`.`OneToMany_Required_Self_Inverse3Id`, `l2`.`OneToOne_Optional_PK_Inverse3Id`, `l2`.`OneToOne_Optional_Self3Id`, `l1`.`Id`, `l0`.`Id` FROM (( - SELECT TOP @p0 `l4`.`Id`, `l4`.`Name` + SELECT TOP @p1 `l4`.`Id`, `l4`.`Name` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Name` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Name` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l4` @@ -2033,9 +2033,9 @@ ORDER BY `l4`.`Name` DESC """ SELECT `l3`.`Id`, `l3`.`Level2_Optional_Id`, `l3`.`Level2_Required_Id`, `l3`.`Name`, `l3`.`OneToMany_Optional_Inverse3Id`, `l3`.`OneToMany_Optional_Self_Inverse3Id`, `l3`.`OneToMany_Required_Inverse3Id`, `l3`.`OneToMany_Required_Self_Inverse3Id`, `l3`.`OneToOne_Optional_PK_Inverse3Id`, `l3`.`OneToOne_Optional_Self3Id`, `l1`.`Id`, `l0`.`Id` FROM (( - SELECT TOP @p0 `l4`.`Id`, `l4`.`Name` + SELECT TOP @p1 `l4`.`Id`, `l4`.`Name` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Name` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Name` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l4` @@ -2056,9 +2056,9 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ """ SELECT `l1`.`Id`, `l1`.`Date`, `l1`.`Name`, `l1`.`OneToMany_Optional_Self_Inverse1Id`, `l1`.`OneToMany_Required_Self_Inverse1Id`, `l1`.`OneToOne_Optional_Self1Id`, `l0`.`Id`, `l0`.`Date`, `l0`.`Level1_Optional_Id`, `l0`.`Level1_Required_Id`, `l0`.`Name`, `l0`.`OneToMany_Optional_Inverse2Id`, `l0`.`OneToMany_Optional_Self_Inverse2Id`, `l0`.`OneToMany_Required_Inverse2Id`, `l0`.`OneToMany_Required_Self_Inverse2Id`, `l0`.`OneToOne_Optional_PK_Inverse2Id`, `l0`.`OneToOne_Optional_Self2Id`, `l2`.`Id`, `l2`.`Date`, `l2`.`Level1_Optional_Id`, `l2`.`Level1_Required_Id`, `l2`.`Name`, `l2`.`OneToMany_Optional_Inverse2Id`, `l2`.`OneToMany_Optional_Self_Inverse2Id`, `l2`.`OneToMany_Required_Inverse2Id`, `l2`.`OneToMany_Required_Self_Inverse2Id`, `l2`.`OneToOne_Optional_PK_Inverse2Id`, `l2`.`OneToOne_Optional_Self2Id` FROM (( - SELECT TOP @p0 `l3`.`Id`, `l3`.`Date`, `l3`.`Name`, `l3`.`OneToMany_Optional_Self_Inverse1Id`, `l3`.`OneToMany_Required_Self_Inverse1Id`, `l3`.`OneToOne_Optional_Self1Id` + SELECT TOP @p1 `l3`.`Id`, `l3`.`Date`, `l3`.`Name`, `l3`.`OneToMany_Optional_Self_Inverse1Id`, `l3`.`OneToMany_Required_Self_Inverse1Id`, `l3`.`OneToOne_Optional_Self1Id` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l3` @@ -2072,9 +2072,9 @@ ORDER BY `l3`.`Name` DESC """ SELECT `l3`.`Id`, `l3`.`Level2_Optional_Id`, `l3`.`Level2_Required_Id`, `l3`.`Name`, `l3`.`OneToMany_Optional_Inverse3Id`, `l3`.`OneToMany_Optional_Self_Inverse3Id`, `l3`.`OneToMany_Required_Inverse3Id`, `l3`.`OneToMany_Required_Self_Inverse3Id`, `l3`.`OneToOne_Optional_PK_Inverse3Id`, `l3`.`OneToOne_Optional_Self3Id`, `l1`.`Id`, `l0`.`Id`, `l2`.`Id` FROM ((( - SELECT TOP @p0 `l5`.`Id`, `l5`.`Name` + SELECT TOP @p1 `l5`.`Id`, `l5`.`Name` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Name` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Name` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l5` @@ -2090,9 +2090,9 @@ ORDER BY `l5`.`Name` DESC """ SELECT `l4`.`Id`, `l4`.`Level2_Optional_Id`, `l4`.`Level2_Required_Id`, `l4`.`Name`, `l4`.`OneToMany_Optional_Inverse3Id`, `l4`.`OneToMany_Optional_Self_Inverse3Id`, `l4`.`OneToMany_Required_Inverse3Id`, `l4`.`OneToMany_Required_Self_Inverse3Id`, `l4`.`OneToOne_Optional_PK_Inverse3Id`, `l4`.`OneToOne_Optional_Self3Id`, `l1`.`Id`, `l0`.`Id`, `l2`.`Id` FROM ((( - SELECT TOP @p0 `l5`.`Id`, `l5`.`Name` + SELECT TOP @p1 `l5`.`Id`, `l5`.`Name` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Name` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Name` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l5` @@ -2114,9 +2114,9 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ """ SELECT `l1`.`Id`, `l1`.`Date`, `l1`.`Name`, `l1`.`OneToMany_Optional_Self_Inverse1Id`, `l1`.`OneToMany_Required_Self_Inverse1Id`, `l1`.`OneToOne_Optional_Self1Id`, `l0`.`Id`, `l0`.`Date`, `l0`.`Level1_Optional_Id`, `l0`.`Level1_Required_Id`, `l0`.`Name`, `l0`.`OneToMany_Optional_Inverse2Id`, `l0`.`OneToMany_Optional_Self_Inverse2Id`, `l0`.`OneToMany_Required_Inverse2Id`, `l0`.`OneToMany_Required_Self_Inverse2Id`, `l0`.`OneToOne_Optional_PK_Inverse2Id`, `l0`.`OneToOne_Optional_Self2Id`, `l2`.`Id`, `l2`.`Level2_Optional_Id`, `l2`.`Level2_Required_Id`, `l2`.`Name`, `l2`.`OneToMany_Optional_Inverse3Id`, `l2`.`OneToMany_Optional_Self_Inverse3Id`, `l2`.`OneToMany_Required_Inverse3Id`, `l2`.`OneToMany_Required_Self_Inverse3Id`, `l2`.`OneToOne_Optional_PK_Inverse3Id`, `l2`.`OneToOne_Optional_Self3Id` FROM (( - SELECT TOP @p0 `l3`.`Id`, `l3`.`Date`, `l3`.`Name`, `l3`.`OneToMany_Optional_Self_Inverse1Id`, `l3`.`OneToMany_Required_Self_Inverse1Id`, `l3`.`OneToOne_Optional_Self1Id` + SELECT TOP @p1 `l3`.`Id`, `l3`.`Date`, `l3`.`Name`, `l3`.`OneToMany_Optional_Self_Inverse1Id`, `l3`.`OneToMany_Required_Self_Inverse1Id`, `l3`.`OneToOne_Optional_Self1Id` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Date`, `l`.`Name`, `l`.`OneToMany_Optional_Self_Inverse1Id`, `l`.`OneToMany_Required_Self_Inverse1Id`, `l`.`OneToOne_Optional_Self1Id` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l3` @@ -2130,9 +2130,9 @@ ORDER BY `l3`.`Name` DESC """ SELECT `l3`.`Id`, `l3`.`Level3_Optional_Id`, `l3`.`Level3_Required_Id`, `l3`.`Name`, `l3`.`OneToMany_Optional_Inverse4Id`, `l3`.`OneToMany_Optional_Self_Inverse4Id`, `l3`.`OneToMany_Required_Inverse4Id`, `l3`.`OneToMany_Required_Self_Inverse4Id`, `l3`.`OneToOne_Optional_PK_Inverse4Id`, `l3`.`OneToOne_Optional_Self4Id`, `l1`.`Id`, `l0`.`Id`, `l2`.`Id` FROM ((( - SELECT TOP @p0 `l4`.`Id`, `l4`.`Name` + SELECT TOP @p1 `l4`.`Id`, `l4`.`Name` FROM ( - SELECT TOP @p + @p0 `l`.`Id`, `l`.`Name` + SELECT TOP @p + @p1 `l`.`Id`, `l`.`Name` FROM `LevelOne` AS `l` ORDER BY `l`.`Name` ) AS `l4` diff --git a/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsQueryJetTest.cs index 52de03c5c..002d84d17 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/ComplexNavigationsQueryJetTest.cs @@ -2618,9 +2618,9 @@ public override async Task Where_on_multilevel_reference_in_subquery_with_outer_ """ SELECT `s0`.`Name` FROM ( - SELECT TOP @p0 `s`.`Name`, `s`.`Level2_Required_Id` + SELECT TOP @p1 `s`.`Name`, `s`.`Level2_Required_Id` FROM ( - SELECT TOP @p + @p0 `l`.`Name`, `l`.`Level2_Required_Id` + SELECT TOP @p + @p1 `l`.`Name`, `l`.`Level2_Required_Id` FROM (`LevelThree` AS `l` INNER JOIN `LevelTwo` AS `l0` ON `l`.`OneToMany_Required_Inverse3Id` = `l0`.`Id`) LEFT JOIN `LevelOne` AS `l1` ON `l0`.`Level1_Required_Id` = `l1`.`Id` diff --git a/test/EFCore.Jet.FunctionalTests/Query/ComplexTypeQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/ComplexTypeQueryJetTest.cs index 381d1f09e..dedf2282a 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/ComplexTypeQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/ComplexTypeQueryJetTest.cs @@ -1218,7 +1218,7 @@ ORDER BY `c`.`Id` LEFT JOIN ( SELECT DISTINCT `c2`.`Id`, `c2`.`Name`, `c2`.`BillingAddress_AddressLine1`, `c2`.`BillingAddress_AddressLine2`, `c2`.`BillingAddress_Tags`, `c2`.`BillingAddress_ZipCode`, `c2`.`BillingAddress_Country_Code`, `c2`.`BillingAddress_Country_FullName`, `c2`.`OptionalAddress_AddressLine1`, `c2`.`OptionalAddress_AddressLine2`, `c2`.`OptionalAddress_Tags`, `c2`.`OptionalAddress_ZipCode`, `c2`.`OptionalAddress_Country_Code`, `c2`.`OptionalAddress_Country_FullName`, `c2`.`ShippingAddress_AddressLine1`, `c2`.`ShippingAddress_AddressLine2`, `c2`.`ShippingAddress_Tags`, `c2`.`ShippingAddress_ZipCode`, `c2`.`ShippingAddress_Country_Code`, `c2`.`ShippingAddress_Country_FullName` FROM ( - SELECT TOP @p0 `c1`.`Id`, `c1`.`Name`, `c1`.`BillingAddress_AddressLine1`, `c1`.`BillingAddress_AddressLine2`, `c1`.`BillingAddress_Tags`, `c1`.`BillingAddress_ZipCode`, `c1`.`BillingAddress_Country_Code`, `c1`.`BillingAddress_Country_FullName`, `c1`.`OptionalAddress_AddressLine1`, `c1`.`OptionalAddress_AddressLine2`, `c1`.`OptionalAddress_Tags`, `c1`.`OptionalAddress_ZipCode`, `c1`.`OptionalAddress_Country_Code`, `c1`.`OptionalAddress_Country_FullName`, `c1`.`ShippingAddress_AddressLine1`, `c1`.`ShippingAddress_AddressLine2`, `c1`.`ShippingAddress_Tags`, `c1`.`ShippingAddress_ZipCode`, `c1`.`ShippingAddress_Country_Code`, `c1`.`ShippingAddress_Country_FullName` + SELECT TOP @p1 `c1`.`Id`, `c1`.`Name`, `c1`.`BillingAddress_AddressLine1`, `c1`.`BillingAddress_AddressLine2`, `c1`.`BillingAddress_Tags`, `c1`.`BillingAddress_ZipCode`, `c1`.`BillingAddress_Country_Code`, `c1`.`BillingAddress_Country_FullName`, `c1`.`OptionalAddress_AddressLine1`, `c1`.`OptionalAddress_AddressLine2`, `c1`.`OptionalAddress_Tags`, `c1`.`OptionalAddress_ZipCode`, `c1`.`OptionalAddress_Country_Code`, `c1`.`OptionalAddress_Country_FullName`, `c1`.`ShippingAddress_AddressLine1`, `c1`.`ShippingAddress_AddressLine2`, `c1`.`ShippingAddress_Tags`, `c1`.`ShippingAddress_ZipCode`, `c1`.`ShippingAddress_Country_Code`, `c1`.`ShippingAddress_Country_FullName` FROM `Customer` AS `c1` ORDER BY `c1`.`Id` DESC ) AS `c2` diff --git a/test/EFCore.Jet.FunctionalTests/Query/GearsOfWarQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/GearsOfWarQueryJetTest.cs index 46188e8aa..b29969aa4 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/GearsOfWarQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/GearsOfWarQueryJetTest.cs @@ -6244,6 +6244,60 @@ LEFT JOIN ( """); } + public override async Task DefaultIfEmpty_top_level_over_column_with_nullable_value_type(bool async) + { + await base.DefaultIfEmpty_top_level_over_column_with_nullable_value_type(async); + + AssertSql( + """ +SELECT [m0].[Rating] +FROM ( + SELECT 1 AS empty +) AS [e] +LEFT JOIN ( + SELECT [m].[Rating] + FROM [Missions] AS [m] + WHERE [m].[Id] = -1 +) AS [m0] ON 1 = 1 +"""); + } + + public override async Task DefaultIfEmpty_top_level_over_arbitrary_expression_with_nullable_value_type(bool async) + { + await base.DefaultIfEmpty_top_level_over_arbitrary_expression_with_nullable_value_type(async); + + AssertSql( + """ +SELECT [m0].[c] +FROM ( + SELECT 1 AS empty +) AS [e] +LEFT JOIN ( + SELECT [m].[Rating] + 2.0E0 AS [c] + FROM [Missions] AS [m] + WHERE [m].[Id] = -1 +) AS [m0] ON 1 = 1 +"""); + } + + public override async Task DefaultIfEmpty_top_level_over_arbitrary_expression_with_non_nullable_value_type(bool async) + { + await base.DefaultIfEmpty_top_level_over_arbitrary_expression_with_non_nullable_value_type(async); + + AssertSql( + """ +SELECT COALESCE([m0].[c], 0) +FROM ( + SELECT 1 AS empty +) AS [e] +LEFT JOIN ( + SELECT [m].[Id] + 2 AS [c] + FROM [Missions] AS [m] + WHERE [m].[Id] = -1 +) AS [m0] ON 1 = 1 +"""); + } + public override async Task Join_with_inner_being_a_subquery_projecting_single_property(bool isAsync) { await base.Join_with_inner_being_a_subquery_projecting_single_property(isAsync); @@ -8261,9 +8315,9 @@ public override async Task Join_entity_with_itself_grouped_by_key_followed_by_in """ SELECT `s0`.`Nickname`, `s0`.`SquadId`, `s0`.`AssignedCityName`, `s0`.`CityOfBirthName`, `s0`.`Discriminator`, `s0`.`FullName`, `s0`.`HasSoulPatch`, `s0`.`LeaderNickname`, `s0`.`LeaderSquadId`, `s0`.`Rank`, `s0`.`HasSoulPatch0`, `w`.`Id`, `w`.`AmmunitionType`, `w`.`IsAutomatic`, `w`.`Name`, `w`.`OwnerFullName`, `w`.`SynergyWithId` FROM ( - SELECT TOP @p0 `s`.`Nickname`, `s`.`SquadId`, `s`.`AssignedCityName`, `s`.`CityOfBirthName`, `s`.`Discriminator`, `s`.`FullName`, `s`.`HasSoulPatch`, `s`.`LeaderNickname`, `s`.`LeaderSquadId`, `s`.`Rank`, `s`.`HasSoulPatch0` + SELECT TOP @p1 `s`.`Nickname`, `s`.`SquadId`, `s`.`AssignedCityName`, `s`.`CityOfBirthName`, `s`.`Discriminator`, `s`.`FullName`, `s`.`HasSoulPatch`, `s`.`LeaderNickname`, `s`.`LeaderSquadId`, `s`.`Rank`, `s`.`HasSoulPatch0` FROM ( - SELECT TOP @p + @p0 `g`.`Nickname`, `g`.`SquadId`, `g`.`AssignedCityName`, `g`.`CityOfBirthName`, `g`.`Discriminator`, `g`.`FullName`, `g`.`HasSoulPatch`, `g`.`LeaderNickname`, `g`.`LeaderSquadId`, `g`.`Rank`, `g1`.`HasSoulPatch` AS `HasSoulPatch0` + SELECT TOP @p + @p1 `g`.`Nickname`, `g`.`SquadId`, `g`.`AssignedCityName`, `g`.`CityOfBirthName`, `g`.`Discriminator`, `g`.`FullName`, `g`.`HasSoulPatch`, `g`.`LeaderNickname`, `g`.`LeaderSquadId`, `g`.`Rank`, `g1`.`HasSoulPatch` AS `HasSoulPatch0` FROM `Gears` AS `g` LEFT JOIN ( SELECT MIN(IIF(LEN(`g0`.`Nickname`) IS NULL, NULL, CLNG(LEN(`g0`.`Nickname`)))) AS `c`, `g0`.`HasSoulPatch` @@ -8317,11 +8371,11 @@ public override async Task Parameter_used_multiple_times_take_appropriate_inferr """ @place='Ephyra's location' (Size = 255) @place0='Ephyra's location' (Size = 100) -@place='Ephyra's location' (Size = 255) +@place0='Ephyra's location' (Size = 100) SELECT `c`.`Name`, `c`.`Location`, `c`.`Nation` FROM `Cities` AS `c` -WHERE `c`.`Nation` = @place OR `c`.`Location` = @place0 OR `c`.`Location` = @place +WHERE `c`.`Nation` = @place OR `c`.`Location` = @place0 OR `c`.`Location` = @place0 """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindChangeTrackingQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindChangeTrackingQueryJetTest.cs index 74dba8745..7d9f0cee5 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindChangeTrackingQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindChangeTrackingQueryJetTest.cs @@ -122,7 +122,7 @@ ORDER BY `c0`.`CustomerID` FROM ( SELECT TOP 1 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( - SELECT TOP @p0 + 1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` + SELECT TOP @p1 + 1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( SELECT TOP @p `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` @@ -202,7 +202,7 @@ ORDER BY `c0`.`CustomerID` FROM ( SELECT TOP 1 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( - SELECT TOP @p0 + 1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` + SELECT TOP @p1 + 1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( SELECT TOP @p `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindEFPropertyIncludeQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindEFPropertyIncludeQueryJetTest.cs index 6ce347cd7..80aeda79c 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindEFPropertyIncludeQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindEFPropertyIncludeQueryJetTest.cs @@ -2108,9 +2108,9 @@ public override async Task Include_where_skip_take_projection(bool async) """ SELECT `o0`.`CustomerID` FROM ( - SELECT TOP @p0 `o2`.`OrderID`, `o2`.`ProductID` + SELECT TOP @p1 `o2`.`OrderID`, `o2`.`ProductID` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`ProductID` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`ProductID` FROM `Order Details` AS `o` WHERE `o`.`Quantity` = 10 ORDER BY `o`.`OrderID`, `o`.`ProductID` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindGroupByQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindGroupByQueryJetTest.cs index 07a316852..ea4451da9 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindGroupByQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindGroupByQueryJetTest.cs @@ -1165,9 +1165,9 @@ SELECT MAX(`o0`.`OrderID`) FROM ( SELECT `o2`.`OrderID`, `o2`.`CustomerID` FROM ( - SELECT TOP @p0 `o1`.`OrderID`, `o1`.`CustomerID` + SELECT TOP @p1 `o1`.`OrderID`, `o1`.`CustomerID` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`CustomerID` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`CustomerID` FROM `Orders` AS `o` ORDER BY `o`.`OrderID` ) AS `o1` @@ -1264,9 +1264,9 @@ ORDER BY `o`.`OrderDate` INNER JOIN ( SELECT `c2`.`CustomerID` FROM ( - SELECT TOP @p1 `c1`.`CustomerID`, `c1`.`City` + SELECT TOP @p2 `c1`.`CustomerID`, `c1`.`City` FROM ( - SELECT TOP @p0 + @p1 `c`.`CustomerID`, `c`.`City` + SELECT TOP @p1 + @p2 `c`.`CustomerID`, `c`.`City` FROM `Customers` AS `c` WHERE `c`.`CustomerID` NOT IN ('DRACD', 'FOLKO') ORDER BY `c`.`City` @@ -1368,9 +1368,9 @@ public override async Task GroupJoin_complex_GroupBy_Aggregate(bool isAsync) FROM ( SELECT `c2`.`CustomerID` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c1`.`City` + SELECT TOP @p1 `c1`.`CustomerID`, `c1`.`City` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`City` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`City` FROM `Customers` AS `c` WHERE `c`.`CustomerID` NOT IN ('DRACD', 'FOLKO') ORDER BY `c`.`City` @@ -1380,7 +1380,7 @@ ORDER BY `c1`.`City` DESC ORDER BY `c2`.`City` ) AS `c0` INNER JOIN ( - SELECT TOP @p1 `o`.`OrderID`, `o`.`CustomerID` + SELECT TOP @p2 `o`.`OrderID`, `o`.`CustomerID` FROM `Orders` AS `o` WHERE `o`.`OrderID` < 10400 ORDER BY `o`.`OrderDate` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindIncludeNoTrackingQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindIncludeNoTrackingQueryJetTest.cs index 64993cc1a..efcc8c015 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindIncludeNoTrackingQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindIncludeNoTrackingQueryJetTest.cs @@ -626,9 +626,9 @@ public override async Task Include_where_skip_take_projection(bool async) """ SELECT `o0`.`CustomerID` FROM ( - SELECT TOP @p0 `o2`.`OrderID`, `o2`.`ProductID` + SELECT TOP @p1 `o2`.`OrderID`, `o2`.`ProductID` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`ProductID` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`ProductID` FROM `Order Details` AS `o` WHERE `o`.`Quantity` = 10 ORDER BY `o`.`OrderID`, `o`.`ProductID` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindIncludeQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindIncludeQueryJetTest.cs index 4bd210662..634dbb521 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindIncludeQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindIncludeQueryJetTest.cs @@ -801,9 +801,9 @@ public override async Task Include_where_skip_take_projection(bool async) """ SELECT `o0`.`CustomerID` FROM ( - SELECT TOP @p0 `o2`.`OrderID`, `o2`.`ProductID` + SELECT TOP @p1 `o2`.`OrderID`, `o2`.`ProductID` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`ProductID` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`ProductID` FROM `Order Details` AS `o` WHERE `o`.`Quantity` = 10 ORDER BY `o`.`OrderID`, `o`.`ProductID` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindMiscellaneousQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindMiscellaneousQueryJetTest.cs index 19cd5b189..1b19186d7 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindMiscellaneousQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindMiscellaneousQueryJetTest.cs @@ -582,9 +582,9 @@ public override async Task Where_query_composition_is_not_null(bool isAsync) """ SELECT `e1`.`EmployeeID`, `e1`.`City`, `e1`.`Country`, `e1`.`FirstName`, `e1`.`ReportsTo`, `e1`.`Title` FROM ( - SELECT TOP @p0 `e2`.`EmployeeID`, `e2`.`City`, `e2`.`Country`, `e2`.`FirstName`, `e2`.`ReportsTo`, `e2`.`Title` + SELECT TOP @p1 `e2`.`EmployeeID`, `e2`.`City`, `e2`.`Country`, `e2`.`FirstName`, `e2`.`ReportsTo`, `e2`.`Title` FROM ( - SELECT TOP @p + @p0 `e`.`EmployeeID`, `e`.`City`, `e`.`Country`, `e`.`FirstName`, `e`.`ReportsTo`, `e`.`Title` + SELECT TOP @p + @p1 `e`.`EmployeeID`, `e`.`City`, `e`.`Country`, `e`.`FirstName`, `e`.`ReportsTo`, `e`.`Title` FROM `Employees` AS `e` ORDER BY `e`.`EmployeeID` ) AS `e2` @@ -1139,9 +1139,9 @@ public override async Task Skip_Take(bool isAsync) """ SELECT `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( - SELECT TOP @p0 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` + SELECT TOP @p1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` ORDER BY `c`.`ContactName` ) AS `c0` @@ -1159,9 +1159,9 @@ public override async Task Join_Customers_Orders_Skip_Take(bool isAsync) """ SELECT `s0`.`ContactName`, `s0`.`OrderID` FROM ( - SELECT TOP @p0 `s`.`ContactName`, `s`.`OrderID` + SELECT TOP @p1 `s`.`ContactName`, `s`.`OrderID` FROM ( - SELECT TOP @p + @p0 `c`.`ContactName`, `o`.`OrderID` + SELECT TOP @p + @p1 `c`.`ContactName`, `o`.`OrderID` FROM `Customers` AS `c` INNER JOIN `Orders` AS `o` ON `c`.`CustomerID` = `o`.`CustomerID` ORDER BY `o`.`OrderID` @@ -1180,9 +1180,9 @@ public override async Task Join_Customers_Orders_Skip_Take_followed_by_constant_ """ SELECT `s0`.`c` FROM ( - SELECT TOP @p0 `s`.`c`, `s`.`OrderID` + SELECT TOP @p1 `s`.`c`, `s`.`OrderID` FROM ( - SELECT TOP @p + @p0 'Foo' AS `c`, `o`.`OrderID` + SELECT TOP @p + @p1 'Foo' AS `c`, `o`.`OrderID` FROM `Customers` AS `c` INNER JOIN `Orders` AS `o` ON `c`.`CustomerID` = `o`.`CustomerID` ORDER BY `o`.`OrderID` @@ -1201,9 +1201,9 @@ public override async Task Join_Customers_Orders_Projection_With_String_Concat_S """ SELECT `s0`.`Contact`, `s0`.`OrderID` FROM ( - SELECT TOP @p0 `s`.`Contact`, `s`.`OrderID` + SELECT TOP @p1 `s`.`Contact`, `s`.`OrderID` FROM ( - SELECT TOP @p + @p0 (IIF(`c`.`ContactName` IS NULL, '', `c`.`ContactName`) & ' ') & IIF(`c`.`ContactTitle` IS NULL, '', `c`.`ContactTitle`) AS `Contact`, `o`.`OrderID` + SELECT TOP @p + @p1 (IIF(`c`.`ContactName` IS NULL, '', `c`.`ContactName`) & ' ') & IIF(`c`.`ContactTitle` IS NULL, '', `c`.`ContactTitle`) AS `Contact`, `o`.`OrderID` FROM `Customers` AS `c` INNER JOIN `Orders` AS `o` ON `c`.`CustomerID` = `o`.`CustomerID` ORDER BY `o`.`OrderID` @@ -1222,9 +1222,9 @@ public override async Task Join_Customers_Orders_Orders_Skip_Take_Same_Propertie """ SELECT `s0`.`OrderID`, `s0`.`CustomerIDA`, `s0`.`CustomerIDB`, `s0`.`ContactNameA`, `s0`.`ContactNameB` FROM ( - SELECT TOP @p0 `s`.`OrderID`, `s`.`CustomerIDA`, `s`.`CustomerIDB`, `s`.`ContactNameA`, `s`.`ContactNameB` + SELECT TOP @p1 `s`.`OrderID`, `s`.`CustomerIDA`, `s`.`CustomerIDB`, `s`.`ContactNameA`, `s`.`ContactNameB` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `c`.`CustomerID` AS `CustomerIDA`, `c0`.`CustomerID` AS `CustomerIDB`, `c`.`ContactName` AS `ContactNameA`, `c0`.`ContactName` AS `ContactNameB` + SELECT TOP @p + @p1 `o`.`OrderID`, `c`.`CustomerID` AS `CustomerIDA`, `c0`.`CustomerID` AS `CustomerIDB`, `c`.`ContactName` AS `ContactNameA`, `c0`.`ContactName` AS `ContactNameB` FROM (`Orders` AS `o` INNER JOIN `Customers` AS `c` ON `o`.`CustomerID` = `c`.`CustomerID`) INNER JOIN `Customers` AS `c0` ON `o`.`CustomerID` = `c0`.`CustomerID` @@ -2236,9 +2236,9 @@ public override async Task Distinct_Skip_Take(bool isAsync) """ SELECT `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` + SELECT TOP @p1 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( - SELECT TOP @p + @p0 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` + SELECT TOP @p + @p1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( SELECT DISTINCT `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` @@ -2279,9 +2279,9 @@ public override async Task Skip_Take_Distinct(bool isAsync) FROM ( SELECT `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` + SELECT TOP @p1 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` ORDER BY `c`.`ContactName` ) AS `c1` @@ -2301,9 +2301,9 @@ public override async Task Skip_Take_Any(bool isAsync) SELECT EXISTS ( SELECT 1 FROM ( - SELECT TOP @p0 `c0`.`ContactName` + SELECT TOP @p1 `c0`.`ContactName` FROM ( - SELECT TOP @p + @p0 `c`.`ContactName` + SELECT TOP @p + @p1 `c`.`ContactName` FROM `Customers` AS `c` ORDER BY `c`.`ContactName` ) AS `c0` @@ -2325,9 +2325,9 @@ SELECT 1 FROM ( SELECT `c2`.`CustomerID` FROM ( - SELECT TOP @p0 `c1`.`CustomerID` + SELECT TOP @p1 `c1`.`CustomerID` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID` + SELECT TOP @p + @p1 `c`.`CustomerID` FROM `Customers` AS `c` ORDER BY `c`.`CustomerID` ) AS `c1` @@ -2369,9 +2369,9 @@ SELECT 1 FROM ( SELECT `c2`.`CustomerID` FROM ( - SELECT TOP @p0 `c1`.`CustomerID` + SELECT TOP @p1 `c1`.`CustomerID` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID` + SELECT TOP @p + @p1 `c`.`CustomerID` FROM `Customers` AS `c` ORDER BY `c`.`CustomerID` ) AS `c1` @@ -3609,9 +3609,9 @@ public override async Task OrderBy_skip_take(bool isAsync) """ SELECT `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( - SELECT TOP @p0 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` + SELECT TOP @p1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` ORDER BY `c`.`ContactTitle`, `c`.`ContactName` ) AS `c0` @@ -3651,11 +3651,11 @@ public override async Task OrderBy_skip_take_take(bool isAsync) AssertSql( """ -SELECT TOP @p1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` +SELECT TOP @p2 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` + SELECT TOP @p1 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` ORDER BY `c`.`ContactTitle`, `c`.`ContactName` ) AS `c1` @@ -3673,13 +3673,13 @@ public override async Task OrderBy_skip_take_take_take_take(bool isAsync) """ SELECT TOP @p `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` FROM ( - SELECT TOP @p2 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` + SELECT TOP @p3 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( - SELECT TOP @p1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` + SELECT TOP @p2 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( - SELECT TOP @p0 `c3`.`CustomerID`, `c3`.`Address`, `c3`.`City`, `c3`.`CompanyName`, `c3`.`ContactName`, `c3`.`ContactTitle`, `c3`.`Country`, `c3`.`Fax`, `c3`.`Phone`, `c3`.`PostalCode`, `c3`.`Region` + SELECT TOP @p1 `c3`.`CustomerID`, `c3`.`Address`, `c3`.`City`, `c3`.`CompanyName`, `c3`.`ContactName`, `c3`.`ContactTitle`, `c3`.`Country`, `c3`.`Fax`, `c3`.`Phone`, `c3`.`PostalCode`, `c3`.`Region` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` ORDER BY `c`.`ContactTitle`, `c`.`ContactName` ) AS `c3` @@ -3734,9 +3734,9 @@ public override async Task OrderBy_skip_take_distinct(bool isAsync) FROM ( SELECT `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` + SELECT TOP @p1 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` ORDER BY `c`.`ContactTitle`, `c`.`ContactName` ) AS `c1` @@ -3772,9 +3772,9 @@ public override async Task OrderBy_coalesce_skip_take_distinct(bool isAsync) FROM ( SELECT `p2`.`ProductID`, `p2`.`Discontinued`, `p2`.`ProductName`, `p2`.`SupplierID`, `p2`.`UnitPrice`, `p2`.`UnitsInStock` FROM ( - SELECT TOP @p0 `p1`.`ProductID`, `p1`.`Discontinued`, `p1`.`ProductName`, `p1`.`SupplierID`, `p1`.`UnitPrice`, `p1`.`UnitsInStock`, `p1`.`c` + SELECT TOP @p1 `p1`.`ProductID`, `p1`.`Discontinued`, `p1`.`ProductName`, `p1`.`SupplierID`, `p1`.`UnitPrice`, `p1`.`UnitsInStock`, `p1`.`c` FROM ( - SELECT TOP @p + @p0 `p3`.`ProductID`, `p3`.`Discontinued`, `p3`.`ProductName`, `p3`.`SupplierID`, `p3`.`UnitPrice`, `p3`.`UnitsInStock`, `p3`.`c` + SELECT TOP @p + @p1 `p3`.`ProductID`, `p3`.`Discontinued`, `p3`.`ProductName`, `p3`.`SupplierID`, `p3`.`UnitPrice`, `p3`.`UnitsInStock`, `p3`.`c` FROM ( SELECT `p`.`ProductID`, `p`.`Discontinued`, `p`.`ProductName`, `p`.`SupplierID`, `p`.`UnitPrice`, `p`.`UnitsInStock`, IIF(`p`.`UnitPrice` IS NULL, 0.0, `p`.`UnitPrice`) AS `c` FROM `Products` AS `p` @@ -3798,9 +3798,9 @@ public override async Task OrderBy_coalesce_skip_take_distinct_take(bool isAsync FROM ( SELECT `p2`.`ProductID`, `p2`.`Discontinued`, `p2`.`ProductName`, `p2`.`SupplierID`, `p2`.`UnitPrice`, `p2`.`UnitsInStock` FROM ( - SELECT TOP @p0 `p1`.`ProductID`, `p1`.`Discontinued`, `p1`.`ProductName`, `p1`.`SupplierID`, `p1`.`UnitPrice`, `p1`.`UnitsInStock`, `p1`.`c` + SELECT TOP @p1 `p1`.`ProductID`, `p1`.`Discontinued`, `p1`.`ProductName`, `p1`.`SupplierID`, `p1`.`UnitPrice`, `p1`.`UnitsInStock`, `p1`.`c` FROM ( - SELECT TOP @p + @p0 `p3`.`ProductID`, `p3`.`Discontinued`, `p3`.`ProductName`, `p3`.`SupplierID`, `p3`.`UnitPrice`, `p3`.`UnitsInStock`, `p3`.`c` + SELECT TOP @p + @p1 `p3`.`ProductID`, `p3`.`Discontinued`, `p3`.`ProductName`, `p3`.`SupplierID`, `p3`.`UnitPrice`, `p3`.`UnitsInStock`, `p3`.`c` FROM ( SELECT `p`.`ProductID`, `p`.`Discontinued`, `p`.`ProductName`, `p`.`SupplierID`, `p`.`UnitPrice`, `p`.`UnitsInStock`, IIF(`p`.`UnitPrice` IS NULL, 0.0, `p`.`UnitPrice`) AS `c` FROM `Products` AS `p` @@ -3820,15 +3820,15 @@ public override async Task OrderBy_skip_take_distinct_orderby_take(bool isAsync) AssertSql( """ -SELECT TOP @p1 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` +SELECT TOP @p2 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region` FROM ( SELECT DISTINCT `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( SELECT `c3`.`CustomerID`, `c3`.`Address`, `c3`.`City`, `c3`.`CompanyName`, `c3`.`ContactName`, `c3`.`ContactTitle`, `c3`.`Country`, `c3`.`Fax`, `c3`.`Phone`, `c3`.`PostalCode`, `c3`.`Region` FROM ( - SELECT TOP @p0 `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` + SELECT TOP @p1 `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` ORDER BY `c`.`ContactTitle`, `c`.`ContactName` ) AS `c2` @@ -4220,9 +4220,9 @@ public override async Task Include_with_orderby_skip_preserves_ordering(bool isA """ SELECT `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region`, `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate` FROM ( - SELECT TOP @p0 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` + SELECT TOP @p1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` + SELECT TOP @p + @p1 `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` WHERE `c`.`CustomerID` NOT IN ('VAFFE', 'DRACD') ORDER BY `c`.`City`, `c`.`CustomerID` @@ -4886,9 +4886,9 @@ public override async Task OrderBy_Dto_projection_skip_take(bool isAsync) """ SELECT `c1`.`Id` FROM ( - SELECT TOP @p0 `c0`.`Id` + SELECT TOP @p1 `c0`.`Id` FROM ( - SELECT TOP @p + @p0 `c`.`CustomerID` AS `Id` + SELECT TOP @p + @p1 `c`.`CustomerID` AS `Id` FROM `Customers` AS `c` ORDER BY `c`.`CustomerID` ) AS `c0` @@ -5113,9 +5113,9 @@ public override async Task OrderBy_object_type_server_evals(bool isAsync) """ SELECT `s0`.`OrderID`, `s0`.`CustomerID`, `s0`.`EmployeeID`, `s0`.`OrderDate` FROM ( - SELECT TOP @p0 `s`.`OrderID`, `s`.`CustomerID`, `s`.`EmployeeID`, `s`.`OrderDate`, `s`.`CustomerID0`, `s`.`City` + SELECT TOP @p1 `s`.`OrderID`, `s`.`CustomerID`, `s`.`EmployeeID`, `s`.`OrderDate`, `s`.`CustomerID0`, `s`.`City` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`, `c`.`CustomerID` AS `CustomerID0`, `c`.`City` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`, `c`.`CustomerID` AS `CustomerID0`, `c`.`City` FROM `Orders` AS `o` LEFT JOIN `Customers` AS `c` ON `o`.`CustomerID` = `c`.`CustomerID` ORDER BY `o`.`OrderID`, `o`.`OrderDate`, `c`.`CustomerID`, `c`.`City` @@ -5276,9 +5276,9 @@ public override async Task Projection_skip_take_projection(bool async) """ SELECT `c`.`City` FROM ( - SELECT TOP @p0 `o1`.`OrderID`, `o1`.`CustomerID` + SELECT TOP @p1 `o1`.`OrderID`, `o1`.`CustomerID` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`CustomerID` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`CustomerID` FROM `Orders` AS `o` WHERE `o`.`OrderID` < 10300 ORDER BY `o`.`OrderID` @@ -5337,9 +5337,9 @@ public override async Task Collection_projection_skip_take(bool async) """ SELECT `o2`.`OrderID`, `o2`.`CustomerID`, `o2`.`EmployeeID`, `o2`.`OrderDate`, `o0`.`OrderID`, `o0`.`ProductID`, `o0`.`Discount`, `o0`.`Quantity`, `o0`.`UnitPrice` FROM ( - SELECT TOP @p0 `o1`.`OrderID`, `o1`.`CustomerID`, `o1`.`EmployeeID`, `o1`.`OrderDate` + SELECT TOP @p1 `o1`.`OrderID`, `o1`.`CustomerID`, `o1`.`EmployeeID`, `o1`.`OrderDate` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate` FROM `Orders` AS `o` WHERE `o`.`OrderID` < 10300 ORDER BY `o`.`OrderID` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindSelectQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindSelectQueryJetTest.cs index ce8c2c0e4..d9ea12a68 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindSelectQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindSelectQueryJetTest.cs @@ -1415,7 +1415,7 @@ public override async Task Select_with_multiple_Take(bool async) AssertSql( """ -SELECT TOP @p0 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` +SELECT TOP @p1 `c0`.`CustomerID`, `c0`.`Address`, `c0`.`City`, `c0`.`CompanyName`, `c0`.`ContactName`, `c0`.`ContactTitle`, `c0`.`Country`, `c0`.`Fax`, `c0`.`Phone`, `c0`.`PostalCode`, `c0`.`Region` FROM ( SELECT TOP @p `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindSetOperationsQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindSetOperationsQueryJetTest.cs index c5f052111..6018f9bc8 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindSetOperationsQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindSetOperationsQueryJetTest.cs @@ -363,9 +363,9 @@ public override async Task Select_Union_different_fields_in_anonymous_with_subqu """ SELECT `u0`.`Foo`, `u0`.`CustomerID`, `u0`.`Address`, `u0`.`City`, `u0`.`CompanyName`, `u0`.`ContactName`, `u0`.`ContactTitle`, `u0`.`Country`, `u0`.`Fax`, `u0`.`Phone`, `u0`.`PostalCode`, `u0`.`Region` FROM ( - SELECT TOP @p0 `u1`.`Foo`, `u1`.`CustomerID`, `u1`.`Address`, `u1`.`City`, `u1`.`CompanyName`, `u1`.`ContactName`, `u1`.`ContactTitle`, `u1`.`Country`, `u1`.`Fax`, `u1`.`Phone`, `u1`.`PostalCode`, `u1`.`Region` + SELECT TOP @p1 `u1`.`Foo`, `u1`.`CustomerID`, `u1`.`Address`, `u1`.`City`, `u1`.`CompanyName`, `u1`.`ContactName`, `u1`.`ContactTitle`, `u1`.`Country`, `u1`.`Fax`, `u1`.`Phone`, `u1`.`PostalCode`, `u1`.`Region` FROM ( - SELECT TOP @p + @p0 `u`.`Foo`, `u`.`CustomerID`, `u`.`Address`, `u`.`City`, `u`.`CompanyName`, `u`.`ContactName`, `u`.`ContactTitle`, `u`.`Country`, `u`.`Fax`, `u`.`Phone`, `u`.`PostalCode`, `u`.`Region` + SELECT TOP @p + @p1 `u`.`Foo`, `u`.`CustomerID`, `u`.`Address`, `u`.`City`, `u`.`CompanyName`, `u`.`ContactName`, `u`.`ContactTitle`, `u`.`Country`, `u`.`Fax`, `u`.`Phone`, `u`.`PostalCode`, `u`.`Region` FROM ( SELECT `c`.`City` AS `Foo`, `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQueryJetTest.cs index 91197c49d..7f576fb48 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQueryJetTest.cs @@ -313,7 +313,7 @@ public override async Task Include_duplicate_collection_result_operator(bool asy AssertSql( """ -SELECT TOP @p0 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region`, `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` +SELECT TOP @p2 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region`, `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` FROM ( SELECT TOP @p `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` @@ -334,7 +334,7 @@ ORDER BY `c3`.`CustomerID` DESC """ SELECT `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`, `s`.`CustomerID`, `s`.`CustomerID0` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` + SELECT TOP @p2 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` FROM ( SELECT TOP @p `c`.`CustomerID` FROM `Customers` AS `c` @@ -358,7 +358,7 @@ ORDER BY `c3`.`CustomerID` DESC """ SELECT `o0`.`OrderID`, `o0`.`CustomerID`, `o0`.`EmployeeID`, `o0`.`OrderDate`, `s0`.`CustomerID`, `s0`.`CustomerID0` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` + SELECT TOP @p2 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` FROM ( SELECT TOP @p `c`.`CustomerID` FROM `Customers` AS `c` @@ -534,9 +534,9 @@ public override async Task Include_where_skip_take_projection(bool async) """ SELECT `o0`.`CustomerID` FROM ( - SELECT TOP @p0 `o2`.`OrderID`, `o2`.`ProductID` + SELECT TOP @p1 `o2`.`OrderID`, `o2`.`ProductID` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`ProductID` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`ProductID` FROM `Order Details` AS `o` WHERE `o`.`Quantity` = 10 ORDER BY `o`.`OrderID`, `o`.`ProductID` @@ -2222,7 +2222,7 @@ public override async Task Include_duplicate_collection_result_operator2(bool as AssertSql( """ -SELECT TOP @p0 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region`, `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` +SELECT TOP @p2 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region`, `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` FROM ( SELECT TOP @p `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` @@ -2243,7 +2243,7 @@ ORDER BY `c3`.`CustomerID` DESC """ SELECT `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`, `s`.`CustomerID`, `s`.`CustomerID0` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` + SELECT TOP @p2 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` FROM ( SELECT TOP @p `c`.`CustomerID` FROM `Customers` AS `c` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindSplitIncludeQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindSplitIncludeQueryJetTest.cs index e35a33578..37171d92c 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindSplitIncludeQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindSplitIncludeQueryJetTest.cs @@ -995,7 +995,7 @@ public override async Task Include_duplicate_collection_result_operator(bool asy AssertSql( """ -SELECT TOP @p0 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region`, `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` +SELECT TOP @p2 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region`, `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` FROM ( SELECT TOP @p `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` @@ -1016,7 +1016,7 @@ ORDER BY `c3`.`CustomerID` DESC """ SELECT `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`, `s`.`CustomerID`, `s`.`CustomerID0` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` + SELECT TOP @p2 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` FROM ( SELECT TOP @p `c`.`CustomerID` FROM `Customers` AS `c` @@ -1040,7 +1040,7 @@ ORDER BY `c3`.`CustomerID` DESC """ SELECT `o0`.`OrderID`, `o0`.`CustomerID`, `o0`.`EmployeeID`, `o0`.`OrderDate`, `s0`.`CustomerID`, `s0`.`CustomerID0` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` + SELECT TOP @p2 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` FROM ( SELECT TOP @p `c`.`CustomerID` FROM `Customers` AS `c` @@ -1143,9 +1143,9 @@ public override async Task Include_where_skip_take_projection(bool async) """ SELECT `o0`.`CustomerID` FROM ( - SELECT TOP @p0 `o2`.`OrderID`, `o2`.`ProductID` + SELECT TOP @p1 `o2`.`OrderID`, `o2`.`ProductID` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`ProductID` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`ProductID` FROM `Order Details` AS `o` WHERE `o`.`Quantity` = 10 ORDER BY `o`.`OrderID`, `o`.`ProductID` @@ -1163,7 +1163,7 @@ public override async Task Include_duplicate_collection_result_operator2(bool as AssertSql( """ -SELECT TOP @p0 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region`, `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` +SELECT TOP @p2 `c1`.`CustomerID`, `c1`.`Address`, `c1`.`City`, `c1`.`CompanyName`, `c1`.`ContactName`, `c1`.`ContactTitle`, `c1`.`Country`, `c1`.`Fax`, `c1`.`Phone`, `c1`.`PostalCode`, `c1`.`Region`, `c2`.`CustomerID`, `c2`.`Address`, `c2`.`City`, `c2`.`CompanyName`, `c2`.`ContactName`, `c2`.`ContactTitle`, `c2`.`Country`, `c2`.`Fax`, `c2`.`Phone`, `c2`.`PostalCode`, `c2`.`Region` FROM ( SELECT TOP @p `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` @@ -1184,7 +1184,7 @@ ORDER BY `c3`.`CustomerID` DESC """ SELECT `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`, `s`.`CustomerID`, `s`.`CustomerID0` FROM ( - SELECT TOP @p0 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` + SELECT TOP @p2 `c1`.`CustomerID`, `c2`.`CustomerID` AS `CustomerID0` FROM ( SELECT TOP @p `c`.`CustomerID` FROM `Customers` AS `c` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindStringIncludeQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindStringIncludeQueryJetTest.cs index 06a2b5250..a5d923303 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindStringIncludeQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindStringIncludeQueryJetTest.cs @@ -2070,9 +2070,9 @@ public override async Task Include_where_skip_take_projection(bool async) """ SELECT `o0`.`CustomerID` FROM ( - SELECT TOP @p0 `o2`.`OrderID`, `o2`.`ProductID` + SELECT TOP @p1 `o2`.`OrderID`, `o2`.`ProductID` FROM ( - SELECT TOP @p + @p0 `o`.`OrderID`, `o`.`ProductID` + SELECT TOP @p + @p1 `o`.`OrderID`, `o`.`ProductID` FROM `Order Details` AS `o` WHERE `o`.`Quantity` = 10 ORDER BY `o`.`OrderID`, `o`.`ProductID` diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindWhereQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindWhereQueryJetTest.cs index 1306c2414..7ab75708d 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindWhereQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindWhereQueryJetTest.cs @@ -1691,11 +1691,11 @@ public override async Task Two_parameters_with_same_name_get_uniquified(bool asy AssertSql( """ @customerId='ANATR' (Size = 5) -@customerId0='ALFKI' (Size = 5) +@customerId1='ALFKI' (Size = 5) SELECT `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region` FROM `Customers` AS `c` -WHERE `c`.`CustomerID` = @customerId OR `c`.`CustomerID` = @customerId0 +WHERE `c`.`CustomerID` = @customerId OR `c`.`CustomerID` = @customerId1 """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/OwnedQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/OwnedQueryJetTest.cs index 44149daf6..9599217a1 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/OwnedQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/OwnedQueryJetTest.cs @@ -462,9 +462,9 @@ public override async Task Preserve_includes_when_applying_skip_take_after_anony """ SELECT `o4`.`Id`, `o4`.`Discriminator`, `o4`.`Name`, `s`.`ClientId`, `s`.`Id`, `s`.`OrderDate`, `s`.`OrderClientId`, `s`.`OrderId`, `s`.`Id0`, `s`.`Detail`, `o4`.`PersonAddress_AddressLine`, `o4`.`PersonAddress_PlaceType`, `o4`.`PersonAddress_ZipCode`, `o4`.`PersonAddress_Country_Name`, `o4`.`PersonAddress_Country_PlanetId`, `o4`.`BranchAddress_BranchName`, `o4`.`BranchAddress_PlaceType`, `o4`.`BranchAddress_Country_Name`, `o4`.`BranchAddress_Country_PlanetId`, `o4`.`LeafBAddress_LeafBType`, `o4`.`LeafBAddress_PlaceType`, `o4`.`LeafBAddress_Country_Name`, `o4`.`LeafBAddress_Country_PlanetId`, `o4`.`LeafAAddress_LeafType`, `o4`.`LeafAAddress_PlaceType`, `o4`.`LeafAAddress_Country_Name`, `o4`.`LeafAAddress_Country_PlanetId`, `o4`.`c` FROM ( - SELECT TOP @p0 `o3`.`Id`, `o3`.`Discriminator`, `o3`.`Name`, `o3`.`PersonAddress_AddressLine`, `o3`.`PersonAddress_PlaceType`, `o3`.`PersonAddress_ZipCode`, `o3`.`PersonAddress_Country_Name`, `o3`.`PersonAddress_Country_PlanetId`, `o3`.`BranchAddress_BranchName`, `o3`.`BranchAddress_PlaceType`, `o3`.`BranchAddress_Country_Name`, `o3`.`BranchAddress_Country_PlanetId`, `o3`.`LeafBAddress_LeafBType`, `o3`.`LeafBAddress_PlaceType`, `o3`.`LeafBAddress_Country_Name`, `o3`.`LeafBAddress_Country_PlanetId`, `o3`.`LeafAAddress_LeafType`, `o3`.`LeafAAddress_PlaceType`, `o3`.`LeafAAddress_Country_Name`, `o3`.`LeafAAddress_Country_PlanetId`, `o3`.`c` + SELECT TOP @p1 `o3`.`Id`, `o3`.`Discriminator`, `o3`.`Name`, `o3`.`PersonAddress_AddressLine`, `o3`.`PersonAddress_PlaceType`, `o3`.`PersonAddress_ZipCode`, `o3`.`PersonAddress_Country_Name`, `o3`.`PersonAddress_Country_PlanetId`, `o3`.`BranchAddress_BranchName`, `o3`.`BranchAddress_PlaceType`, `o3`.`BranchAddress_Country_Name`, `o3`.`BranchAddress_Country_PlanetId`, `o3`.`LeafBAddress_LeafBType`, `o3`.`LeafBAddress_PlaceType`, `o3`.`LeafBAddress_Country_Name`, `o3`.`LeafBAddress_Country_PlanetId`, `o3`.`LeafAAddress_LeafType`, `o3`.`LeafAAddress_PlaceType`, `o3`.`LeafAAddress_Country_Name`, `o3`.`LeafAAddress_Country_PlanetId`, `o3`.`c` FROM ( - SELECT TOP @p + @p0 `o`.`Id`, `o`.`Discriminator`, `o`.`Name`, `o`.`PersonAddress_AddressLine`, `o`.`PersonAddress_PlaceType`, `o`.`PersonAddress_ZipCode`, `o`.`PersonAddress_Country_Name`, `o`.`PersonAddress_Country_PlanetId`, `o`.`BranchAddress_BranchName`, `o`.`BranchAddress_PlaceType`, `o`.`BranchAddress_Country_Name`, `o`.`BranchAddress_Country_PlanetId`, `o`.`LeafBAddress_LeafBType`, `o`.`LeafBAddress_PlaceType`, `o`.`LeafBAddress_Country_Name`, `o`.`LeafBAddress_Country_PlanetId`, `o`.`LeafAAddress_LeafType`, `o`.`LeafAAddress_PlaceType`, `o`.`LeafAAddress_Country_Name`, `o`.`LeafAAddress_Country_PlanetId`, ( + SELECT TOP @p + @p1 `o`.`Id`, `o`.`Discriminator`, `o`.`Name`, `o`.`PersonAddress_AddressLine`, `o`.`PersonAddress_PlaceType`, `o`.`PersonAddress_ZipCode`, `o`.`PersonAddress_Country_Name`, `o`.`PersonAddress_Country_PlanetId`, `o`.`BranchAddress_BranchName`, `o`.`BranchAddress_PlaceType`, `o`.`BranchAddress_Country_Name`, `o`.`BranchAddress_Country_PlanetId`, `o`.`LeafBAddress_LeafBType`, `o`.`LeafBAddress_PlaceType`, `o`.`LeafBAddress_Country_Name`, `o`.`LeafBAddress_Country_PlanetId`, `o`.`LeafAAddress_LeafType`, `o`.`LeafAAddress_PlaceType`, `o`.`LeafAAddress_Country_Name`, `o`.`LeafAAddress_Country_PlanetId`, ( SELECT COUNT(*) FROM `OwnedPerson` AS `o2`) AS `c` FROM `OwnedPerson` AS `o` diff --git a/test/EFCore.Jet.FunctionalTests/Query/PrimitiveCollectionsQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/PrimitiveCollectionsQueryJetTest.cs index 9497cb8de..357f9067b 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/PrimitiveCollectionsQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/PrimitiveCollectionsQueryJetTest.cs @@ -492,6 +492,23 @@ FROM OPENJSON(@__p_0) WITH ([value] int '$') AS [p0] """); } + public override async Task Inline_collection_Contains_with_IEnumerable_EF_Parameter() + { + await base.Inline_collection_Contains_with_IEnumerable_EF_Parameter(); + + AssertSql( + """ +@Select='["10","a","aa"]' (Size = 4000) + +SELECT [p].[Id], [p].[Bool], [p].[Bools], [p].[DateTime], [p].[DateTimes], [p].[Enum], [p].[Enums], [p].[Int], [p].[Ints], [p].[NullableInt], [p].[NullableInts], [p].[NullableString], [p].[NullableStrings], [p].[NullableWrappedId], [p].[NullableWrappedIdWithNullableComparer], [p].[String], [p].[Strings], [p].[WrappedId] +FROM [PrimitiveCollectionsEntity] AS [p] +WHERE [p].[NullableString] IN ( + SELECT [s].[value] + FROM OPENJSON(@Select) WITH ([value] nvarchar(max) '$') AS [s] +) +"""); + } + public override async Task Inline_collection_Count_with_column_predicate_with_EF_Parameter() { await base.Inline_collection_Count_with_column_predicate_with_EF_Parameter(); @@ -817,6 +834,34 @@ WHERE FALSE """); } + public override async Task Parameter_collection_empty_Contains() + { + await base.Parameter_collection_empty_Contains(); + + AssertSql( + """ +SELECT `p`.`Id`, `p`.`Bool`, `p`.`Bools`, `p`.`DateTime`, `p`.`DateTimes`, `p`.`Enum`, `p`.`Enums`, `p`.`Int`, `p`.`Ints`, `p`.`NullableInt`, `p`.`NullableInts`, `p`.`NullableString`, `p`.`NullableStrings`, `p`.`NullableWrappedId`, `p`.`NullableWrappedIdWithNullableComparer`, `p`.`String`, `p`.`Strings`, `p`.`WrappedId` +FROM `PrimitiveCollectionsEntity` AS `p` +WHERE FALSE +"""); + } + + public override async Task Parameter_collection_empty_Join() + { + await base.Parameter_collection_empty_Join(); + + AssertSql( + """ +SELECT `p`.`Id`, `p`.`Bool`, `p`.`Bools`, `p`.`DateTime`, `p`.`DateTimes`, `p`.`Enum`, `p`.`Enums`, `p`.`Int`, `p`.`Ints`, `p`.`NullableInt`, `p`.`NullableInts`, `p`.`NullableString`, `p`.`NullableStrings`, `p`.`NullableWrappedId`, `p`.`NullableWrappedIdWithNullableComparer`, `p`.`String`, `p`.`Strings`, `p`.`WrappedId` +FROM `PrimitiveCollectionsEntity` AS `p` +INNER JOIN ( + SELECT CVar(NULL) AS `Value` + FROM (SELECT COUNT(*) FROM `#Dual`) + WHERE FALSE +) AS `p0` ON `p`.`Id` = IIF(`p0`.`Value` IS NULL, NULL, CLNG(`p0`.`Value`)) +"""); + } + public override async Task Parameter_collection_Contains_with_EF_Constant() { await base.Parameter_collection_Contains_with_EF_Constant(); @@ -881,6 +926,74 @@ public override async Task Parameter_collection_Count_with_huge_number_of_values Assert.Contains("VALUES", Fixture.TestSqlLoggerFactory.SqlStatements[0], StringComparison.Ordinal); } + [ConditionalFact(Skip = "Crashes - too large")] + public override async Task Parameter_collection_Count_with_huge_number_of_values_over_2_operations_same_parameter_different_type_mapping() + { + await base.Parameter_collection_Count_with_huge_number_of_values_over_2_operations_same_parameter_different_type_mapping(); + } + + [ConditionalFact(Skip = "Crashes - too large")] + public override async Task Parameter_collection_Count_with_huge_number_of_values_over_5_operations() + { + await base.Parameter_collection_Count_with_huge_number_of_values_over_5_operations(); + } + + [ConditionalFact(Skip = "Crashes - too large")] + public override async Task Parameter_collection_Count_with_huge_number_of_values_over_5_operations_forced_constants() + { + await base.Parameter_collection_Count_with_huge_number_of_values_over_5_operations_forced_constants(); + } + + [ConditionalFact(Skip = "Crashes - too large")] + public override async Task Parameter_collection_Count_with_huge_number_of_values_over_5_operations_mixed_parameters_constants() + { + await base.Parameter_collection_Count_with_huge_number_of_values_over_5_operations_mixed_parameters_constants(); + } + + [ConditionalFact(Skip = "Crashes - too large")] + public override async Task Parameter_collection_Count_with_huge_number_of_values_over_5_operations_same_parameter() + { + await base.Parameter_collection_Count_with_huge_number_of_values_over_5_operations_same_parameter(); + } + + [ConditionalFact(Skip = "Crashes - too large")] + public override async Task Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_5_operations() + { + await base.Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_5_operations(); + } + + public override async Task Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_5_operations_same_parameter() + { + await base.Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_5_operations_same_parameter(); + + Assert.Contains("@ints1=", Fixture.TestSqlLoggerFactory.SqlStatements[0], StringComparison.Ordinal); + Assert.Contains("@ints2=", Fixture.TestSqlLoggerFactory.SqlStatements[0], StringComparison.Ordinal); + Assert.Contains("@ints1=", Fixture.TestSqlLoggerFactory.SqlStatements[1], StringComparison.Ordinal); + Assert.Contains("@ints2=", Fixture.TestSqlLoggerFactory.SqlStatements[1], StringComparison.Ordinal); + } + + public override async Task Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_2_operations_same_parameter_different_type_mapping() + { + await base.Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_2_operations_same_parameter_different_type_mapping(); + + Assert.Contains("OPENJSON(@ints) WITH ([Value] int '$')", Fixture.TestSqlLoggerFactory.SqlStatements[0], StringComparison.Ordinal); + Assert.Contains("OPENJSON(@ints) WITH ([Value] int '$')", Fixture.TestSqlLoggerFactory.SqlStatements[1], StringComparison.Ordinal); + } + + [ConditionalFact(Skip = "Crashes - too large")] + public override async Task Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_5_operations_forced_constants() + { + await base.Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_5_operations_forced_constants(); + } + + public override async Task Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_5_operations_mixed_parameters_constants() + { + await base.Parameter_collection_of_ints_Contains_int_with_huge_number_of_values_over_5_operations_mixed_parameters_constants(); + + Assert.Contains("OPENJSON(@ints) WITH ([Value] int '$')", Fixture.TestSqlLoggerFactory.SqlStatements[0], StringComparison.Ordinal); + Assert.Contains("OPENJSON(@ints) WITH ([Value] int '$')", Fixture.TestSqlLoggerFactory.SqlStatements[1], StringComparison.Ordinal); + } + public override async Task Parameter_collection_of_ints_Contains_int_with_huge_number_of_values() { await base.Parameter_collection_of_ints_Contains_int_with_huge_number_of_values(); @@ -971,6 +1084,42 @@ public virtual async Task Json_representation_of_bool_array() await context.Database.SqlQuery($"SELECT [Bools] AS [Value] FROM [PrimitiveCollectionsEntity] WHERE [Id] = 1").SingleAsync()); } + public override async Task Contains_on_Enumerable() + { + await base.Contains_on_Enumerable(); + + AssertSql( + """ +SELECT `p`.`Id`, `p`.`Bool`, `p`.`Bools`, `p`.`DateTime`, `p`.`DateTimes`, `p`.`Enum`, `p`.`Enums`, `p`.`Int`, `p`.`Ints`, `p`.`NullableInt`, `p`.`NullableInts`, `p`.`NullableString`, `p`.`NullableStrings`, `p`.`NullableWrappedId`, `p`.`NullableWrappedIdWithNullableComparer`, `p`.`String`, `p`.`Strings`, `p`.`WrappedId` +FROM `PrimitiveCollectionsEntity` AS `p` +WHERE `p`.`Int` IN (10, 999) +"""); + } + + public override async Task Contains_on_MemoryExtensions() + { + await base.Contains_on_MemoryExtensions(); + + AssertSql( + """ +SELECT `p`.`Id`, `p`.`Bool`, `p`.`Bools`, `p`.`DateTime`, `p`.`DateTimes`, `p`.`Enum`, `p`.`Enums`, `p`.`Int`, `p`.`Ints`, `p`.`NullableInt`, `p`.`NullableInts`, `p`.`NullableString`, `p`.`NullableStrings`, `p`.`NullableWrappedId`, `p`.`NullableWrappedIdWithNullableComparer`, `p`.`String`, `p`.`Strings`, `p`.`WrappedId` +FROM `PrimitiveCollectionsEntity` AS `p` +WHERE `p`.`Int` IN (10, 999) +"""); + } + + public override async Task Contains_with_MemoryExtensions_with_null_comparer() + { + await base.Contains_with_MemoryExtensions_with_null_comparer(); + + AssertSql( + """ +SELECT `p`.`Id`, `p`.`Bool`, `p`.`Bools`, `p`.`DateTime`, `p`.`DateTimes`, `p`.`Enum`, `p`.`Enums`, `p`.`Int`, `p`.`Ints`, `p`.`NullableInt`, `p`.`NullableInts`, `p`.`NullableString`, `p`.`NullableStrings`, `p`.`NullableWrappedId`, `p`.`NullableWrappedIdWithNullableComparer`, `p`.`String`, `p`.`Strings`, `p`.`WrappedId` +FROM `PrimitiveCollectionsEntity` AS `p` +WHERE `p`.`Int` IN (10, 999) +"""); + } + public override Task Column_collection_Count_method() => AssertTranslationFailedWithDetails(() => base.Column_collection_Count_method(), JetStrings.QueryingIntoJsonCollectionsNotSupported()); diff --git a/test/EFCore.Jet.FunctionalTests/Query/QueryFilterFuncletizationJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/QueryFilterFuncletizationJetTest.cs index 2e6fd5985..e2ecd5af5 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/QueryFilterFuncletizationJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/QueryFilterFuncletizationJetTest.cs @@ -184,29 +184,29 @@ public override void DbContext_complex_expression_is_parameterized() AssertSql( """ @ef_filter__Property='False' -@ef_filter__p0='True' +@ef_filter__p2='True' SELECT `c`.`Id`, `c`.`IsEnabled` FROM `ComplexFilter` AS `c` -WHERE `c`.`IsEnabled` = @ef_filter__Property AND @ef_filter__p0 +WHERE `c`.`IsEnabled` = @ef_filter__Property AND @ef_filter__p2 """, // """ @ef_filter__Property='True' -@ef_filter__p0='True' +@ef_filter__p2='True' SELECT `c`.`Id`, `c`.`IsEnabled` FROM `ComplexFilter` AS `c` -WHERE `c`.`IsEnabled` = @ef_filter__Property AND @ef_filter__p0 +WHERE `c`.`IsEnabled` = @ef_filter__Property AND @ef_filter__p2 """, // """ @ef_filter__Property='True' -@ef_filter__p0='False' +@ef_filter__p2='False' SELECT `c`.`Id`, `c`.`IsEnabled` FROM `ComplexFilter` AS `c` -WHERE `c`.`IsEnabled` = @ef_filter__Property AND @ef_filter__p0 +WHERE `c`.`IsEnabled` = @ef_filter__Property AND @ef_filter__p2 """); } @@ -216,29 +216,29 @@ public override void DbContext_property_based_filter_does_not_short_circuit() AssertSql( """ -@ef_filter__p0='False' +@ef_filter__p2='False' @ef_filter__IsModerated='True' (Nullable = true) SELECT `s`.`Id`, `s`.`IsDeleted`, `s`.`IsModerated` FROM `ShortCircuitFilter` AS `s` -WHERE NOT (`s`.`IsDeleted`) AND (@ef_filter__p0 OR @ef_filter__IsModerated = `s`.`IsModerated`) +WHERE NOT (`s`.`IsDeleted`) AND (@ef_filter__p2 OR @ef_filter__IsModerated = `s`.`IsModerated`) """, // """ -@ef_filter__p0='False' +@ef_filter__p2='False' @ef_filter__IsModerated='False' (Nullable = true) SELECT `s`.`Id`, `s`.`IsDeleted`, `s`.`IsModerated` FROM `ShortCircuitFilter` AS `s` -WHERE NOT (`s`.`IsDeleted`) AND (@ef_filter__p0 OR @ef_filter__IsModerated = `s`.`IsModerated`) +WHERE NOT (`s`.`IsDeleted`) AND (@ef_filter__p2 OR @ef_filter__IsModerated = `s`.`IsModerated`) """, // """ -@ef_filter__p0='True' +@ef_filter__p2='True' SELECT `s`.`Id`, `s`.`IsDeleted`, `s`.`IsModerated` FROM `ShortCircuitFilter` AS `s` -WHERE NOT (`s`.`IsDeleted`) AND @ef_filter__p0 +WHERE NOT (`s`.`IsDeleted`) AND @ef_filter__p2 """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/TPCGearsOfWarQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/TPCGearsOfWarQueryJetTest.cs index 24471860f..8dd28b6f5 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/TPCGearsOfWarQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/TPCGearsOfWarQueryJetTest.cs @@ -8431,6 +8431,60 @@ LEFT JOIN ( """); } + public override async Task DefaultIfEmpty_top_level_over_column_with_nullable_value_type(bool async) + { + await base.DefaultIfEmpty_top_level_over_column_with_nullable_value_type(async); + + AssertSql( + """ +SELECT [m0].[Rating] +FROM ( + SELECT 1 AS empty +) AS [e] +LEFT JOIN ( + SELECT [m].[Rating] + FROM [Missions] AS [m] + WHERE [m].[Id] = -1 +) AS [m0] ON 1 = 1 +"""); + } + + public override async Task DefaultIfEmpty_top_level_over_arbitrary_expression_with_nullable_value_type(bool async) + { + await base.DefaultIfEmpty_top_level_over_arbitrary_expression_with_nullable_value_type(async); + + AssertSql( + """ +SELECT [m0].[c] +FROM ( + SELECT 1 AS empty +) AS [e] +LEFT JOIN ( + SELECT [m].[Rating] + 2.0E0 AS [c] + FROM [Missions] AS [m] + WHERE [m].[Id] = -1 +) AS [m0] ON 1 = 1 +"""); + } + + public override async Task DefaultIfEmpty_top_level_over_arbitrary_expression_with_non_nullable_value_type(bool async) + { + await base.DefaultIfEmpty_top_level_over_arbitrary_expression_with_non_nullable_value_type(async); + + AssertSql( + """ +SELECT COALESCE([m0].[c], 0) +FROM ( + SELECT 1 AS empty +) AS [e] +LEFT JOIN ( + SELECT [m].[Id] + 2 AS [c] + FROM [Missions] AS [m] + WHERE [m].[Id] = -1 +) AS [m0] ON 1 = 1 +"""); + } + public override async Task Join_with_inner_being_a_subquery_projecting_single_property(bool async) { await base.Join_with_inner_being_a_subquery_projecting_single_property(async); @@ -10794,9 +10848,9 @@ public override async Task Join_entity_with_itself_grouped_by_key_followed_by_in """ SELECT `s0`.`Nickname`, `s0`.`SquadId`, `s0`.`AssignedCityName`, `s0`.`CityOfBirthName`, `s0`.`FullName`, `s0`.`HasSoulPatch`, `s0`.`LeaderNickname`, `s0`.`LeaderSquadId`, `s0`.`Rank`, `s0`.`Discriminator`, `s0`.`HasSoulPatch0`, `w`.`Id`, `w`.`AmmunitionType`, `w`.`IsAutomatic`, `w`.`Name`, `w`.`OwnerFullName`, `w`.`SynergyWithId` FROM ( - SELECT TOP @p0 `s`.`Nickname`, `s`.`SquadId`, `s`.`AssignedCityName`, `s`.`CityOfBirthName`, `s`.`FullName`, `s`.`HasSoulPatch`, `s`.`LeaderNickname`, `s`.`LeaderSquadId`, `s`.`Rank`, `s`.`Discriminator`, `s`.`HasSoulPatch0` + SELECT TOP @p1 `s`.`Nickname`, `s`.`SquadId`, `s`.`AssignedCityName`, `s`.`CityOfBirthName`, `s`.`FullName`, `s`.`HasSoulPatch`, `s`.`LeaderNickname`, `s`.`LeaderSquadId`, `s`.`Rank`, `s`.`Discriminator`, `s`.`HasSoulPatch0` FROM ( - SELECT TOP @p + @p0 `u`.`Nickname`, `u`.`SquadId`, `u`.`AssignedCityName`, `u`.`CityOfBirthName`, `u`.`FullName`, `u`.`HasSoulPatch`, `u`.`LeaderNickname`, `u`.`LeaderSquadId`, `u`.`Rank`, `u`.`Discriminator`, `u1`.`HasSoulPatch` AS `HasSoulPatch0` + SELECT TOP @p + @p1 `u`.`Nickname`, `u`.`SquadId`, `u`.`AssignedCityName`, `u`.`CityOfBirthName`, `u`.`FullName`, `u`.`HasSoulPatch`, `u`.`LeaderNickname`, `u`.`LeaderSquadId`, `u`.`Rank`, `u`.`Discriminator`, `u1`.`HasSoulPatch` AS `HasSoulPatch0` FROM ( SELECT `g`.`Nickname`, `g`.`SquadId`, `g`.`AssignedCityName`, `g`.`CityOfBirthName`, `g`.`FullName`, `g`.`HasSoulPatch`, `g`.`LeaderNickname`, `g`.`LeaderSquadId`, `g`.`Rank`, 'Gear' AS `Discriminator` FROM `Gears` AS `g` @@ -10876,11 +10930,11 @@ public override async Task Parameter_used_multiple_times_take_appropriate_inferr """ @place='Ephyra's location' (Size = 255) @place0='Ephyra's location' (Size = 100) -@place='Ephyra's location' (Size = 255) +@place0='Ephyra's location' (Size = 100) SELECT `c`.`Name`, `c`.`Location`, `c`.`Nation` FROM `Cities` AS `c` -WHERE `c`.`Nation` = @place OR `c`.`Location` = @place0 OR `c`.`Location` = @place +WHERE `c`.`Nation` = @place OR `c`.`Location` = @place0 OR `c`.`Location` = @place0 """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/TPTGearsOfWarQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/TPTGearsOfWarQueryJetTest.cs index 401b4f1bd..c77f01d39 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/TPTGearsOfWarQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/TPTGearsOfWarQueryJetTest.cs @@ -6791,6 +6791,60 @@ LEFT JOIN ( """); } + public override async Task DefaultIfEmpty_top_level_over_column_with_nullable_value_type(bool async) + { + await base.DefaultIfEmpty_top_level_over_column_with_nullable_value_type(async); + + AssertSql( + """ +SELECT [m0].[Rating] +FROM ( + SELECT 1 AS empty +) AS [e] +LEFT JOIN ( + SELECT [m].[Rating] + FROM [Missions] AS [m] + WHERE [m].[Id] = -1 +) AS [m0] ON 1 = 1 +"""); + } + + public override async Task DefaultIfEmpty_top_level_over_arbitrary_expression_with_nullable_value_type(bool async) + { + await base.DefaultIfEmpty_top_level_over_arbitrary_expression_with_nullable_value_type(async); + + AssertSql( + """ +SELECT [m0].[c] +FROM ( + SELECT 1 AS empty +) AS [e] +LEFT JOIN ( + SELECT [m].[Rating] + 2.0E0 AS [c] + FROM [Missions] AS [m] + WHERE [m].[Id] = -1 +) AS [m0] ON 1 = 1 +"""); + } + + public override async Task DefaultIfEmpty_top_level_over_arbitrary_expression_with_non_nullable_value_type(bool async) + { + await base.DefaultIfEmpty_top_level_over_arbitrary_expression_with_non_nullable_value_type(async); + + AssertSql( + """ +SELECT COALESCE([m0].[c], 0) +FROM ( + SELECT 1 AS empty +) AS [e] +LEFT JOIN ( + SELECT [m].[Id] + 2 AS [c] + FROM [Missions] AS [m] + WHERE [m].[Id] = -1 +) AS [m0] ON 1 = 1 +"""); + } + public override async Task Join_with_inner_being_a_subquery_projecting_single_property(bool async) { await base.Join_with_inner_being_a_subquery_projecting_single_property(async); @@ -8609,9 +8663,9 @@ public override async Task Join_entity_with_itself_grouped_by_key_followed_by_in """ SELECT `s1`.`Nickname`, `s1`.`SquadId`, `s1`.`AssignedCityName`, `s1`.`CityOfBirthName`, `s1`.`FullName`, `s1`.`HasSoulPatch`, `s1`.`LeaderNickname`, `s1`.`LeaderSquadId`, `s1`.`Rank`, `s1`.`Discriminator`, `s1`.`HasSoulPatch0`, `w`.`Id`, `w`.`AmmunitionType`, `w`.`IsAutomatic`, `w`.`Name`, `w`.`OwnerFullName`, `w`.`SynergyWithId` FROM ( - SELECT TOP @p0 `s0`.`Nickname`, `s0`.`SquadId`, `s0`.`AssignedCityName`, `s0`.`CityOfBirthName`, `s0`.`FullName`, `s0`.`HasSoulPatch`, `s0`.`LeaderNickname`, `s0`.`LeaderSquadId`, `s0`.`Rank`, `s0`.`Discriminator`, `s0`.`HasSoulPatch0` + SELECT TOP @p1 `s0`.`Nickname`, `s0`.`SquadId`, `s0`.`AssignedCityName`, `s0`.`CityOfBirthName`, `s0`.`FullName`, `s0`.`HasSoulPatch`, `s0`.`LeaderNickname`, `s0`.`LeaderSquadId`, `s0`.`Rank`, `s0`.`Discriminator`, `s0`.`HasSoulPatch0` FROM ( - SELECT TOP @p + @p0 `g`.`Nickname`, `g`.`SquadId`, `g`.`AssignedCityName`, `g`.`CityOfBirthName`, `g`.`FullName`, `g`.`HasSoulPatch`, `g`.`LeaderNickname`, `g`.`LeaderSquadId`, `g`.`Rank`, IIF(`o`.`Nickname` IS NOT NULL, 'Officer', NULL) AS `Discriminator`, `s`.`HasSoulPatch` AS `HasSoulPatch0` + SELECT TOP @p + @p1 `g`.`Nickname`, `g`.`SquadId`, `g`.`AssignedCityName`, `g`.`CityOfBirthName`, `g`.`FullName`, `g`.`HasSoulPatch`, `g`.`LeaderNickname`, `g`.`LeaderSquadId`, `g`.`Rank`, IIF(`o`.`Nickname` IS NOT NULL, 'Officer', NULL) AS `Discriminator`, `s`.`HasSoulPatch` AS `HasSoulPatch0` FROM (`Gears` AS `g` LEFT JOIN `Officers` AS `o` ON `g`.`Nickname` = `o`.`Nickname` AND `g`.`SquadId` = `o`.`SquadId`) LEFT JOIN ( @@ -8670,11 +8724,11 @@ public override async Task Parameter_used_multiple_times_take_appropriate_inferr """ @place='Ephyra's location' (Size = 255) @place0='Ephyra's location' (Size = 100) -@place='Ephyra's location' (Size = 255) +@place0='Ephyra's location' (Size = 100) SELECT `c`.`Name`, `c`.`Location`, `c`.`Nation` FROM `Cities` AS `c` -WHERE `c`.`Nation` = @place OR `c`.`Location` = @place0 OR `c`.`Location` = @place +WHERE `c`.`Nation` = @place OR `c`.`Location` = @place0 OR `c`.`Location` = @place0 """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/Translations/MathTranslationsJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Translations/MathTranslationsJetTest.cs index b637118bb..3fae07d81 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Translations/MathTranslationsJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Translations/MathTranslationsJetTest.cs @@ -476,7 +476,7 @@ public override async Task Sign() """ SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` FROM `BasicTypesEntities` AS `b` -WHERE SGN(`b`.`Double`) > 0.0 +WHERE SGN(`b`.`Double`) > 0 """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/Translations/MiscellaneousTranslationsJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Translations/MiscellaneousTranslationsJetTest.cs index 9aacb5c13..3537f0261 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Translations/MiscellaneousTranslationsJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Translations/MiscellaneousTranslationsJetTest.cs @@ -539,70 +539,70 @@ public override async Task Convert_ToString() await base.Convert_ToString(); AssertSql( - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[Bool]) <> N'' +""" +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`Bool` & '') <> '' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[Byte]) = N'8' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`Byte` & '') = '8' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[Decimal]) <> N'' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`Decimal` & '') <> '' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[Double]) <> N'' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`Double` & '') <> '' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[Float]) <> N'' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`Float` & '') <> '' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[Short]) = N'8' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`Short` & '') = '8' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[Int]) = N'8' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`Int` & '') = '8' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[Long]) = N'8' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`Long` & '') = '8' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[String]) = N'Seattle' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`String` & '') = 'Seattle' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[String]) = N'Seattle' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`String` & '') = 'Seattle' """, - // - """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE CONVERT(nvarchar(max), [b].[DateTime]) LIKE N'%1998%' + // + """ +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE (`b`.`DateTime` & '') LIKE '%1998%' """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsJetTest.cs index 936721a57..b8c7fe302 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/Translations/Temporal/DateTimeTranslationsJetTest.cs @@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore.Query.Translations.Temporal; using Microsoft.EntityFrameworkCore.TestUtilities; +using System.Globalization; using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; @@ -197,13 +198,14 @@ public override Task subtract_and_TotalDays() public override async Task Parse_with_constant() { + var t = CultureInfo.CurrentCulture; await base.Parse_with_constant(); AssertSql( """ -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE [b].[DateTime] = '1998-05-04T15:30:10.0000000' +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE `b`.`DateTime` = #1998-05-04 15:30:10# """); } @@ -213,11 +215,11 @@ public override async Task Parse_with_parameter() AssertSql( """ -@Parse='1998-05-04T15:30:10.0000000' +@Parse='1998-05-04T15:30:10.0000000' (DbType = DateTime) -SELECT [b].[Id], [b].[Bool], [b].[Byte], [b].[ByteArray], [b].[DateOnly], [b].[DateTime], [b].[DateTimeOffset], [b].[Decimal], [b].[Double], [b].[Enum], [b].[FlagsEnum], [b].[Float], [b].[Guid], [b].[Int], [b].[Long], [b].[Short], [b].[String], [b].[TimeOnly], [b].[TimeSpan] -FROM [BasicTypesEntities] AS [b] -WHERE [b].[DateTime] = @Parse +SELECT `b`.`Id`, `b`.`Bool`, `b`.`Byte`, `b`.`ByteArray`, `b`.`DateOnly`, `b`.`DateTime`, `b`.`DateTimeOffset`, `b`.`Decimal`, `b`.`Double`, `b`.`Enum`, `b`.`FlagsEnum`, `b`.`Float`, `b`.`Guid`, `b`.`Int`, `b`.`Long`, `b`.`Short`, `b`.`String`, `b`.`TimeOnly`, `b`.`TimeSpan` +FROM `BasicTypesEntities` AS `b` +WHERE `b`.`DateTime` = CDATE(@Parse) """); } diff --git a/test/EFCore.Jet.FunctionalTests/Scaffolding/JetDatabaseModelFactoryTest.cs b/test/EFCore.Jet.FunctionalTests/Scaffolding/JetDatabaseModelFactoryTest.cs index d1bc73f65..7b7e1027e 100644 --- a/test/EFCore.Jet.FunctionalTests/Scaffolding/JetDatabaseModelFactoryTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Scaffolding/JetDatabaseModelFactoryTest.cs @@ -1457,6 +1457,31 @@ rowversionColumn varbinary(8) NULL }, "DROP TABLE ValueGeneratedProperties;"); + [ConditionalFact] + public void Identity_columns_are_not_nullable() + => Test( + """ + + CREATE TABLE IdentityTable ( + Id counter CONSTRAINT PK_IdentityTable PRIMARY KEY, + Name varchar(255) NULL + ); + """, + [], + [], + dbModel => + { + var table = dbModel.Tables.Single(t => t.Name == "IdentityTable"); + var idColumn = table.Columns.Single(c => c.Name == "Id"); + + // Identity (AutoNumber/counter) must be non-nullable + Assert.False(idColumn.IsNullable); + + // And still marked as value-generated + Assert.Equal(ValueGenerated.OnAdd, idColumn.ValueGenerated); + }, + "DROP TABLE IdentityTable;"); + [ConditionalFact] public void ConcurrencyToken_is_set_for_rowVersion() => Test( diff --git a/test/EFCore.Jet.FunctionalTests/TPTTableSplittingJetTest.cs b/test/EFCore.Jet.FunctionalTests/TPTTableSplittingJetTest.cs index 033210b1e..b43a4bc8a 100644 --- a/test/EFCore.Jet.FunctionalTests/TPTTableSplittingJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/TPTTableSplittingJetTest.cs @@ -1,6 +1,3 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - using System.Threading.Tasks; using EntityFrameworkCore.Jet.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore; diff --git a/test/EFCore.Jet.Tests/EFCore.Jet.Tests.csproj b/test/EFCore.Jet.Tests/EFCore.Jet.Tests.csproj index 4a803236f..8f06624c2 100644 --- a/test/EFCore.Jet.Tests/EFCore.Jet.Tests.csproj +++ b/test/EFCore.Jet.Tests/EFCore.Jet.Tests.csproj @@ -34,7 +34,7 @@ - + @@ -43,12 +43,12 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/test/Shared/ModuleInitializer.cs b/test/Shared/ModuleInitializer.cs new file mode 100644 index 000000000..2777f3aae --- /dev/null +++ b/test/Shared/ModuleInitializer.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Globalization; +using System.Runtime.CompilerServices; +using System.Threading; + +internal static class ModuleInitializer +{ + [ModuleInitializer] + internal static void Initialize() + => InitializeLocale(); + + private static void InitializeLocale() + { + var culture = new CultureInfo("en-US"); + CultureInfo.DefaultThreadCurrentCulture = culture; + CultureInfo.DefaultThreadCurrentUICulture = culture; + Thread.CurrentThread.CurrentCulture = culture; + Thread.CurrentThread.CurrentUICulture = culture; + } +} diff --git a/test/Shared/TestUtilities/Xunit/JetXunitTestRunner.cs b/test/Shared/TestUtilities/Xunit/JetXunitTestRunner.cs index 32ec867fd..94e4fa2af 100644 --- a/test/Shared/TestUtilities/Xunit/JetXunitTestRunner.cs +++ b/test/Shared/TestUtilities/Xunit/JetXunitTestRunner.cs @@ -173,14 +173,14 @@ protected virtual bool SkipFailedTest(Exception exception) foreach (var innerException in aggregateException.Flatten().InnerExceptions.SelectMany(e => e.FlattenHierarchy())) { - if (innerException is InvalidOperationException or OleDbException or OdbcException) + if (innerException is InvalidOperationException or OleDbException or OdbcException or NotSupportedException) { var message = innerException.Message; - if (message.StartsWith("Jet does not support ")) + if (message.ToLower().StartsWith("jet does not support ")) { var expectedUnsupportedTranslation = message.Contains("APPLY statements") || - message.Contains("skipping rows"); + message.Contains("skipping rows") || message.Contains("sequences"); skip = expectedUnsupportedTranslation; unexpectedUnsupportedTranslation = !expectedUnsupportedTranslation; From f74b2d9d5117fd88715358f6826c571ae5b0ff62 Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Fri, 3 Apr 2026 12:32:55 +0800 Subject: [PATCH 7/9] Update dependencies and set version to 10.0.5 RTM Raised minimum dependency versions to 10.0.5, updated Microsoft.SourceLink.GitHub and test packages, switched prerelease label to "rtm", and bumped .NET SDK to 10.0.201. --- Dependencies.targets | 16 ++++++++-------- Version.props | 4 ++-- global.json | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dependencies.targets b/Dependencies.targets index 53015f1d9..ebab4e47a 100644 --- a/Dependencies.targets +++ b/Dependencies.targets @@ -1,8 +1,8 @@ - [10.0.0,10.0.999] - [10.0.0,10.0.999] - [10.0.0,10.0.999] + [10.0.5,10.0.999] + [10.0.5,10.0.999] + [10.0.5,10.0.999] @@ -14,7 +14,7 @@ - + @@ -28,10 +28,10 @@ - - - - + + + + diff --git a/Version.props b/Version.props index 4e3ad44a2..cb7abfa9c 100644 --- a/Version.props +++ b/Version.props @@ -16,8 +16,8 @@ correctly. --> 10.0.0 - beta - 1 + rtm + 0