From 94cabdea74e43a738fe749a82514b52539bc6908 Mon Sep 17 00:00:00 2001 From: Rafael Almeida Date: Wed, 8 Jan 2020 00:31:41 -0300 Subject: [PATCH 1/2] =?UTF-8?q?Cleanup:=20Extra=20line=20=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/EFCore.Relational/Query/QuerySqlGenerator.cs | 2 +- .../Query/NorthwindWhereQuerySqlServerTest.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/EFCore.Relational/Query/QuerySqlGenerator.cs b/src/EFCore.Relational/Query/QuerySqlGenerator.cs index 0e94e805dc5..5e9f7314ffe 100644 --- a/src/EFCore.Relational/Query/QuerySqlGenerator.cs +++ b/src/EFCore.Relational/Query/QuerySqlGenerator.cs @@ -637,7 +637,7 @@ protected override Expression VisitIn(InExpression inExpression) Visit(inExpression.Subquery); } - _relationalCommandBuilder.AppendLine().AppendLine(")"); + _relationalCommandBuilder.AppendLine().Append(")"); } return inExpression; diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs index 431b8c44d90..97d1ad1b1e9 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs @@ -1969,7 +1969,6 @@ SELECT [o0].[OrderID] FROM [Orders] AS [o0] WHERE [c].[CustomerID] = [o0].[CustomerID] ) - ORDER BY [c].[CustomerID], [o].[OrderID]"); } From 1f811fdfb3150af4bea5012e74c2807261d21c64 Mon Sep 17 00:00:00 2001 From: Rafael Almeida Date: Wed, 8 Jan 2020 01:35:39 -0300 Subject: [PATCH 2/2] =?UTF-8?q?Cleanup:=20Extra=20line=20=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...NorthwindAggregateOperatorsQuerySqlServerTest.cs | 9 +++------ .../Query/NorthwindWhereQuerySqlServerTest.cs | 13 +++---------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindAggregateOperatorsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindAggregateOperatorsQuerySqlServerTest.cs index 71fdcd5636e..b41bed1b4b7 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindAggregateOperatorsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindAggregateOperatorsQuerySqlServerTest.cs @@ -965,8 +965,7 @@ SELECT CASE WHEN @__p_0 IN ( SELECT [c].[CustomerID] FROM [Customers] AS [c] - ) - THEN CAST(1 AS bit) + ) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END"); } @@ -1084,8 +1083,7 @@ WHEN @__entity_equality_p_0_OrderID IN ( SELECT [o].[OrderID] FROM [Orders] AS [o] WHERE [o].[CustomerID] = N'VINET' - ) - THEN CAST(1 AS bit) + ) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END"); } @@ -1178,8 +1176,7 @@ WHEN @__entity_equality_p_0_OrderID IN ( SELECT [o].[OrderID] FROM [Orders] AS [o] WHERE [o].[CustomerID] = N'VINET' - ) - THEN CAST(1 AS bit) + ) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END"); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs index 97d1ad1b1e9..75122f85881 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs @@ -1563,8 +1563,7 @@ WHERE [o].[ProductID] IN ( SELECT TOP(1) [p].[ProductID] FROM [Products] AS [p] ORDER BY [p].[ProductID] -) - OR [o].[OrderID] IN ( +) OR [o].[OrderID] IN ( SELECT TOP(1) [o0].[OrderID] FROM [Orders] AS [o0] ORDER BY [o0].[OrderID] @@ -1582,8 +1581,7 @@ WHERE [o].[ProductID] IN ( SELECT TOP(20) [p].[ProductID] FROM [Products] AS [p] ORDER BY [p].[ProductID] -) - AND [o].[OrderID] IN ( +) AND [o].[OrderID] IN ( SELECT TOP(10) [o0].[OrderID] FROM [Orders] AS [o0] ORDER BY [o0].[OrderID] @@ -1604,8 +1602,7 @@ WHERE [o].[OrderID] IN ( SELECT [o0].[OrderID] FROM [Orders] AS [o0] WHERE [c].[CustomerID] = [o0].[CustomerID] - ) -)"); + ))"); } public override async Task Where_subquery_FirstOrDefault_is_null(bool async) @@ -1793,7 +1790,6 @@ SELECT [o0].[CustomerID] FROM [Orders] AS [o0] WHERE [o0].[CustomerID] = [c].[CustomerID] ) - ORDER BY [c].[CustomerID], [o].[OrderID]"); } @@ -1825,7 +1821,6 @@ SELECT [o0].[CustomerID] FROM [Orders] AS [o0] WHERE [o0].[CustomerID] = [c].[CustomerID] ) - ORDER BY [c].[CustomerID], [o].[OrderID]"); } @@ -1857,7 +1852,6 @@ SELECT [o0].[CustomerID] FROM [Orders] AS [o0] WHERE [o0].[CustomerID] = [c].[CustomerID] ) - ORDER BY [c].[CustomerID], [o].[OrderID]"); } @@ -1913,7 +1907,6 @@ SELECT [o0].[OrderID] FROM [Orders] AS [o0] WHERE [c].[CustomerID] = [o0].[CustomerID] ) - ORDER BY [c].[CustomerID], [o].[OrderID]"); }